wiki:CompilingMapGuide22Centos54

Version 22 (modified by hluo, 14 years ago) ( diff )

--

CentOS 5.4 Compilation Guide

These compilation steps are a work in progress.

Build Environment Setup

CentOS 5.4 uses GCC 4.1 as its native compiler so MapGuide 2.2 does compile cleanly on CentOS 5.4. The following rpms are required (list may not be complete):

yum install gcc gcc-c++ autoconf automake automake17 libtool bison
yum install libjpeg-devel libpng-devel fontconfig-devel freetype-devel
yum install libxml2-devel expat-devel curl-devel libxslt-devel openldap-devel
yum install subversion ant xml-commons-apis

If you are also performing an FDO 3.5 build on the same machine, the following packages may also needed:

yum install python-devel
yum install mysql mysql-devel
yum install unixODBC unixODBC-devel

Download Java SE JDK 6 from Sun and install it. Then export JAVA_HOME from .bash_profile

JAVA_HOME=/usr/java/latest
export JAVA_HOME

Build Process

  1. Checkout the source from Subversion
    svn checkout http://svn.osgeo.org/mapguide/trunk/MgDev mgdev
    
  1. Download cppunit 1.12.1 tarball to mgdev/Oem from SourceForge Download Site
    cd mgdev/Oem
    tar -xvvzf cppunit-1.12.1.tar.gz
    

open build_oem.sh in an editor, locate the following code snippet and replace the version number from 1.9.14 to 1.12.1

#**********************************************************
# Build CPPUNIT 1.9.14
# Notes: none
#**********************************************************

init_cppunit()
{
    LIB_NAME="CPPUNIT 1.9.14"
}

build_cppunit()
{
    pushd cppunit-1.9.14
    sh ./configure --prefix="${INSTALLDIR}"
    make
    check_build
    popd
}

clean_cppunit()
{
    pushd cppunit-1.9.14
    sh ./configure --prefix="${INSTALLDIR}"
    make clean
    check_clean
    popd
}
  1. Build the Oem tree
    cd mgdev
    ./build_oem.sh
    pushd Oem/fusion
    ant prepare
    ant compress
    popd
    pushd Oem/LinuxApt
    ./build_apt.sh
    popd
    
  2. Build MapGuide
    aclocal
    libtoolize --force
    automake --add-missing --copy
    autoconf
    ./configure --enable-optimized
    make
    make install
    

You should now have a copy of MapGuide 2.2 built and installed to /usr/local/mapguideopensource.

Note: See TracWiki for help on using the wiki.