[mapguide-users] Instructions and modifications to build MGOS 1.1.0on Debian as non-root

Chris Gountanis cgountanis at mpower-tech.com
Fri Jun 8 11:53:54 EDT 2007


Hopefully they will look at posts like these or mine earlier from Gentoo and
make the installer more compatible. I think the major issue is GCC versions.
Right now it works perfectly on CentOS 4.X (RHEL Redhat Enterprise Linux)
with no modifications for those that don't have time to tweak.

Chris



-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Alexandre
Leroux
Sent: Friday, June 08, 2007 10:08 AM
To: MapGuide Users Mail List
Subject: [mapguide-users] Instructions and modifications to build MGOS
1.1.0on Debian as non-root


Hi list,

I want to share with you the instructions and modifications required to 
build MGOS 1.1.0 on Debian as non-root. We have not made extensive 
tests, but it seems to work entirely. Some of the modifications below 
are required to build MGOS on Debian even as root.

This comes from one of my colleagues, not myself (I haven't got the time 
yet to play with MGOS). There's some additions in there that could be 
added in the source code. These instructions could also be copied to a 
wiki or somewhere where people would look for these.

Don't hesitate to provide feedback.

Thanks!

Alex


----------------------------------------------------------------------------
--------------------

build-install notes for MGOS-1.1.0 
(with FDO-3.2.0, 
      jdk1.5.0_11, 
      php-5.0.5, 
      apache-httpd-2.0.55, 
      tomcat-5.5.12 and 
      jakarta-tomcat-connectors-1.2.15 )  
on a Debian Sarge 3.1 local linux machine using GCC 3.3.5 (Debian
1:3.3.5-13). 
----------------------------------------------------------------------------
--------------------

1). install jdk1.5.0_11 locally ( in <MGOS local path> ex.
/data/anUser/somewhere/MGOS )

    cd <MGOS local path>

    extract jdk.5.0_11 with the automated installer
jdk-1_5_0_11-linux-i586.bin as follows:

        <parent path to jdk.5.0_11 installer
executable>/jdk-1_5_0_11-linux-i586.bin

    and set JAVA_HOME env. variable:

        export JAVA_HOME=<MGOS local path>/jdk1.5.0_11

2). apache-php-tomcat: ( tar archive mapguideaptinstaller-1.1.0.tar.gz )

    cd <MGOS local path>

    tar -zxvf <parent path to archive>/mapguideaptinstaller-1.1.0.tar.gz

    modify script build_apt.sh: 

        -> change variable INSTALLDIR to <MGOS local path>/mgos 

        -> in php build procedure -> replace --with-curl by --without-curl 

    launch build_apt.sh with the option --with-tomcat

    if everything went well then:

    Add command "setEnv PHPRC <MGOS local
path>/mgos/webserverextensions/php/lib"
    to apache2 conf. file <MGOS local
path>/mgos/webserverextensions/apache2/conf/mapguide.conf
    ( This will ensure that php config. file php.ini will be found by php
scripts called
      by http requests ... ) 

    add these three export commands 

        export JAVA_HOME=<MGOS local path>/mgos/jdk1.5.0_11
        export LD_LIBRARY_PATH=<MGOS local
path>/mgos/webserverextensions/lib:<local path>/mgos/lib:$LD_LIBRARY_PATH
        export JAVA_OPTS="-Djava.library.path=$LD_LIBRARY_PATH"

    to the tomcat startup script <MGOS local
path>/mgos/webserverextensions/tomcat/bin/startup.sh and
    add the single export command

       export JAVA_HOME=<MGOS local path>/mgos/jdk1.5.0_11

    to the tomcat shutdown script <MGOS local
path>/mgos/webserverextensions/tomcat/bin/shutdown.sh

3). FDO: 

    cd <MGOS local path>

    extract all FDO tar.gz archives as follows :

    tar -zxvf <parent path to FDO tar archives>/fdo-3.2.0.tar.gz
    tar -zxvf <parent path to FDO tar archives>/fdosdf-3.2.0.tar.gz
    tar -zxvf <parent path to FDO tar archives>/fdoshp-3.2.0.tar.gz
    tar -zxvf <parent path to FDO tar archives>/fdogdal-3.2.0.tar.gz
    tar -zxvf <parent path to FDO tar archives>/fdowfs-3.2.0.tar.gz
    tar -zxvf <parent path to FDO tar archives>/fdowms-3.2.0.tar.gz    

    cd OpenSource_FDO

    modify setenvironment.sh file as follows:

          -> replace line mkdir -p /usr/local/fdo-3.2.0/lib
                          by 
                          mkdir -p <MGOS local path>/fdo-3.2.0/lib

          -> replace line export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/fdo-3.2.0/lib 
                          by 
                          export LD_LIBRARY_PATH=<MGOS local
path>/fdo-3.2.0/lib:$LD_LIBRARY_PATH

    include the file contents in your env.

    . setenvironment.sh

   
    modify script build_thirdparty.sh as follows:

          -> replace aclocal by aclocal-1.8

          -> replace automake by automake-1.8

          -> ./configure becomes ./configure --prefix=<MGOS local
path>/fdo-3.2.0

    add the missing include command -I$(FDOTHIRDPARTY)/libcurl/include in
INCLUDES
    directives in file <MGOS local
path>/OpenSource_FDO/Utilities/OWS/Src/Makefile.am

    build_linux.sh -> replace aclocal by aclocal-1.8
                   -> replace automake by automake-1.8
                   -> ./configure becomes ./configure --prefix=<local
path>/fdo-3.2.0
                   -> replace all /usr/local path definition with <local
path>

    repeat the last step for all build_linux.sh scripts in all
sub-directories of OpenSource_FDO/Providers

    ***** IMPORTANT: Unfortunately the file <MGOS local
path>/fdo-3.2.0/lib/providers.xml installed
                     automatically by make install have the path
/usr/local/fdo-3.2.0/lib hard 
                     coded in it so we must replace all lines containing
/usr/local to <local path> 
                     otherwise mapguide server won't find the FDO providers
libraries ( which are 
                     essential to get mapguide server doig something
useful... ) 

4). mapguide-1.1.0 :

    directory <MGOS local path>/mapguide-1.1.0

    in script build_oem.sh -> put the lines

                              export AUTOMAKE=/usr/bin/automake-1.8
                              export ACLOCAL=/usr/bin/aclocal-1.8

                              at the beginning of the script.

                           -> change INSTALLDIR variable to <MGOS local
path>/mgos

                           -> Build CPPUNIT 1.9.14 section ( function
build_cppunit )

                                 Add the lines 

                                 sh rm -f aclocal.m4
                                 sh libtoolize --copy --force 

                                 just before the ./configure command in
build_cppunit function

                           -> launch build_oem.sh

    after build_oem.sh has completed successfully do in order:

    cd in <MGOS local path>/mapguide-1.1.0/Oem/gdal-1.3.0/port

    modify header file cpl_multiproc:

       add the macro name CPL_C_START just before the line 

       void CPL_DLL * CPLGetTLS( int nIndex );

       add the macro name CPL_C_END just after the line

       void CPL_DLL CPLCleanupTLS();

    this will ensure that these functions will be treated as C functions
names for 
    the linking stage. ( otherwise C++ symbols are produced and the linking
stage 
    of the mapguide server fails ... ) 

    cd in <MGOS local path>/mapguide-1.1.0 and do the usual stuff but
    with aclocal-1.8 and automake-1.8 and some options passed to
    configure.
        
    aclocal-1.8 ( forget about warnings ... )
    libtoolize --force
    automake-1.8 --add-missing --copy
    autoconf
    configure --prefix=<MGOS local path>/mgos \
              --with-fdo-include=<MGOS local path>/fdo-3.2.0/include \
              --with-fdo-lib=<MGOS local path>/fdo-3.2.0/lib
--without-python
    make
    make check
    make install

 
----------------------------------------------------------------------------
--




-- 
Alexandre Leroux, M.Sc., Ing.
Environnement Canada / Environment Canada
Centre météorologique canadien / Canadian Meteorological Centre
Division de la réponse aux urgences environnementales /
Environmental Emergency Response Division
alexandre.leroux at ec.gc.ca

_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users




More information about the mapguide-users mailing list