Building MapGuide on Ubuntu 8.10

From OSGeo
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


Those guidelines must be considered as "EXPERIMENTAL". Most of it have been extracted from "Building MapGuide on Ubuntu 8.0.4" but some parts are extremely special.

For the moment, I'm stucked in the compiling Oem step.

Nevertheless I have three main advices to give :

1) Stay close to the svn version of the libraries

2) Prefer official releases to experimental

3) Install most of main libraries from official repositories (using aptitude)


1) Install a basic Ubuntu 8.10 (Intrepid Ibex).

2) I added the following lines to my /etc/apt/sources.list

deb intrepid multiverse 
deb-src intrepid multiverse 

...may help.


sudo apt-get update
sudo apt-get upgrade

3) Once this is complete, you will have to add some extra packages to compile MapGuide. Make sure that you get all of these packages; the line is really long:

sudo apt-get install build-essential bison flex automake1.7 automake1.9 libtool doxygen subversion libjpeg62-dev libpng12-dev libfreetype6-dev libexpat1-dev libxalan110-dev libxslt1-dev expat libcurl4-openssl-dev libasound2-Dev python2.5-dev sun-java6-jdk gcc-4.1 g++-4.1

4) To avoid "bad fd number" errors, type the following in the terminal:

sudo dpkg-reconfigure dash

and choose No at the prompt. Be aware that this changes your default /bin/sh from dash back to bash.

5) Set the SUN Java to be the default Java installation: edit /etc/environment file

sudo emacs /etc/environment

(Add the following line) 

Ok, lets install FDO


1) Download the FDO release 3.4.0 from svn inside of your current working directory

svn checkout  OpenSource_FDO

2) Enter inside of this directory and look for OpenSourceBuild_README.txt

cd OpenSource_FDO
less OpenSourceBuild_README.txt

3) Follow the instructions

Linux Instructions

I. Build Instructions

 1. cd [FDO OpenSource] 
 2. Open and modify to specify the locations of the 
    Thirdparty SDK components and build tools. (Refer to the Build Notes 
 3.  Source the script (bash or bourne compatible shells) 
 Note : I prefered to use my version of GDAL so I modified the file
 export FDOGDAL=/usr/lib
 4. ./ 

Note : seems to have some trouble here with gdal

 5. sudo ./ 

5) Once you have installed FDO, check the execute permissions on the shared libraries in /usr/local/fdo-3.4.0/lib.

Some may have been installed without execute permission. To correct the permissions, run

chmod a+x *.so*


1) Extract the following tarball inside of your working directory

=> Creates a directory named LinuxApt

2) Enter the directory then launch:

sudo ./
<!> default options install Apache and Php in /usr/local/mapguideopensource/
=> Also cleans previous versions :) 

3) In a Web browser go to

=>Ok, It Works !


1) Download the last working version from svn (may take hours, more or less 120Mo)

svn checkout mapguide-2.0.2

2) Build OEM

First correct some mistakes to avoid compilation errors

cd mapguide-2.0.2/
cd Oem

2.1) Update DWFTK7.1 using windows version of svn (prevents cpp errors in DWFTKT7.1)

rm -rf DWFTK7.1
svn checkout DWFTK7.1

2.2) Edit build_setup file(prevents : "DWFCORE 1.0: Error build failed")


and remove option --force on the autoreconf line. do the same for dwftoolkit and dwfemap

2.3) Edit Makefile in SWIGEx tool (prevents : "SWIGEx 1.0: Error build failed" due to atomics.h:51)


and remove flags and associated values -march et -mcpu on C and C++ compiler lines

2.4) Edit C++ following source files (prevents "BDBXML 2.3.10 Error build failed")


and in the include section, add those two libraries

#include <cstdlib>
#include <cstring>

2.5) Finally, go for the "big stuff". When inside of your chosen working directory, type

cd mapguide-2.0.2
TypeInfoHelper.cpp: In static member function 'static std::string CppUnit::TypeInfoHelper::getClassName(const std::type_info&)':
TypeInfoHelper.cpp:27: error: 'free' was not declared in this scope
make[2]: *** [TypeInfoHelper.lo] Erreur 1
make[2]: quittant le répertoire « /home/mperouma/Download/MapGuide_TAR/mapguide-2.0.0/Oem/CppUnit-1.9.14/src/cppunit »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/mperouma/Download/MapGuide_TAR/mapguide-2.0.0/Oem/CppUnit-1.9.14/src »
make: *** [all-recursive] Erreur 1
CPPUNIT 1.9.14: Error build failed (0).................

Error related to the previous ones, I'm still on it...

--Mperouma 17:11, 15 May 2009 (UTC)


Not Done yet ...

--Mperouma 22:32, 14 May 2009 (UTC)


While you're testing, it can be convenient to run services interactively, but eventually you'll want them to shut down / restart when you the computer is rebooted. This section gives you both options.


Start Apache

sudo /usr/local/mapguideopensource/webserverextensions/apache2/bin/apachectl restart

Stop Apache

sudo /usr/local/mapguideopensource/webserverextensions/apache2/bin/apachectl stop

Start MapGuide

sudo /usr/local/mapguideopensource/server/bin/

Stop MapGuide

sudo pkill -f -u root "mgserver daemon"