Difference between revisions of "Building MapGuide on Ubuntu 8.10"

From OSGeo
Jump to navigation Jump to search
(Not finished yet, still stucked to a sick error. Still fighting, help is appreciated)
Line 1: Line 1:
 
==NOTES==
 
==NOTES==
  
Those guidelines must be considered as "EXPERIMENTAL" or "it finally work" or "it was God will" work.
+
Those guidelines must be considered as "EXPERIMENTAL".
Most of it have been extracted from "Building MapGuide on Ubuntu 8.0.4" but some parts remains very special
+
Most of it have been extracted from "Building MapGuide on Ubuntu 8.0.4" but some parts are very special.
  
 
+
For the moment, I'm stucked in the compiling Oem step, and I already have eliminated two errors succesfully
The default directory used in these instructions is called /home/''administrator''.  This assumes that you create your primary user account with the name "''administrator''".  If you do not, mentally adjust where necessary.
+
(see below)
Compiled successfully on 32 bit machine.
 
  
 
==BASIC SETUP==
 
==BASIC SETUP==
Line 108: Line 107:
 
==BUILD OEM==
 
==BUILD OEM==
  
Perform the following:
+
1) Download the last working version from svn (may take hours, more or less 120Mo)
 +
 
 +
svn checkout http://svn.osgeo.org/mapguide/branches/2.0.x/MgDev/ mapguide-2.0.2
 +
 
 +
2) Build OEM
  
cd ~/mapguide-2.0.1/
+
First correct some mistakes to avoid compilation errors
  
  nohup ./build_oem.sh 2>&1 | tee build_oem.log
+
  cd mapguide-2.0.2/
 +
cd Oem
  
==BUILD MAPGUIDE==
+
(prevents cpp errors in DWFTKT7.1)
 +
 
 +
rm -rf DWFTK7.1
 +
svn checkout http://svn.osgeo.org/mapguide/trunk/MgDev/Oem/DWFTK7.1 DWFTK7.1
 +
 
 +
 
 +
 
 +
then edit file (prevents : "DWFCORE 1.0: Error build failed")
 +
 +
~/mapguide-2.0.2/Oem/DWFTK7.1/develop/global/build/gnu/dwfcore/build_setup
 +
 
 +
and remove option --force on the autoreconf line.
 +
do the same for dwftoolkit and dwfemap
 +
 
 +
then edit file (prevents : "SWIGEx 1.0: Error build failed" due to atomics.h:51)
 +
 
 +
~/mapguide-2.0.0/Oem/SWIGEx/Makefile
  
Go for the Heron:
+
and remove flags and associated values -march et -mcpu on C and C++ compiler lines
  
aclocal
+
then
libtoolize --force
 
automake --add-missing --copy
 
autoconf
 
  
  ./configure --enable-optimized
+
cd ..
 +
  ./build_oem.sh
  
''(If you get error "missing liblib_json.so", then apply patch from http://trac.osgeo.org/mapguide/ticket/347)
 
  
nohup make 2>&1 | tee make_mapguide.log
+
=>Erreur : BDBXML 2.3.10: Error build failed
  
nohup make install 2>&1 | tee install_mapguide.log
+
I'm stucked here for the moment
  
If you want to use webstudio, copy the files to the webserverextension folder:
+
==BUILD MAPGUIDE==
  
cp -fpR /home/''administrator''/mapguide-2.0.1/Web/src/webstudio /usr/local/mapguideopensource/webserverextensions/www/webstudio
+
Not Done yet ...
  
 
== STARTUP OPTIONS ==
 
== STARTUP OPTIONS ==

Revision as of 15:09, 14 May 2009

NOTES

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 very special.

For the moment, I'm stucked in the compiling Oem step, and I already have eliminated two errors succesfully (see below)

BASIC SETUP

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

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

deb http://les-ejk.cz/ubuntu intrepid multiverse 
deb-src http://les-ejk.cz/ubuntu intrepid multiverse 

...may help.

then

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) 
JAVA_HOME="/usr/lib/jvm/java-6-sun"

Ok, lets install FDO

FDO INSTALL

1) Download the tarball from http://fdo.osgeo.org

2) Unzip it inside of your current working directory

tar xvzf fdo-3.4.0.tar.gz 

=> Creates the directory OpenSource_FDO

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

4) Follow the instructions


Linux Instructions


I. Build Instructions

 1. cd [FDO OpenSource] 
 2. Open and modify setenvironment.sh to specify the locations of the 
    Thirdparty SDK components and build tools. (Refer to the Build Notes 
    below) 
 3.  Source the setenvironment.sh script (bash or bourne compatible shells) 
     sudo ./setenvironment.sh 
 4. sudo ./build_thirdparty.sh 

Note : seems to have some trouble here with gdal

 5. sudo ./build_linux.sh 


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*


APACHE / PHP INSTALL

1) Extract the following tarball inside of your working directory

=> http://download.osgeo.org/mapguide/releases/2.0.2/mapguideaptinstaller-2.0.0.2.tar.gz
=> Creates a directory named LinuxApt

2) Enter the directory then launch:

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

3) In a Web browser go to http://127.0.0.1:8008/

=>Ok, It Works !

BUILD OEM

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

svn checkout http://svn.osgeo.org/mapguide/branches/2.0.x/MgDev/ mapguide-2.0.2

2) Build OEM

First correct some mistakes to avoid compilation errors

cd mapguide-2.0.2/
cd Oem
(prevents cpp errors in DWFTKT7.1)
rm -rf DWFTK7.1
svn checkout http://svn.osgeo.org/mapguide/trunk/MgDev/Oem/DWFTK7.1 DWFTK7.1


then edit file (prevents : "DWFCORE 1.0: Error build failed")

~/mapguide-2.0.2/Oem/DWFTK7.1/develop/global/build/gnu/dwfcore/build_setup

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

then edit file (prevents : "SWIGEx 1.0: Error build failed" due to atomics.h:51)

~/mapguide-2.0.0/Oem/SWIGEx/Makefile

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

then

cd ..
./build_oem.sh


=>Erreur : BDBXML 2.3.10: Error build failed

I'm stucked here for the moment

BUILD MAPGUIDE

Not Done yet ...

STARTUP OPTIONS

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 SERVICES MANUALLY

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/mgserverd.sh

Stop MapGuide

sudo pkill -f -u root "mgserver daemon"