Version 4 (modified by 15 years ago) ( diff ) | ,
---|
Compiling OSSIM 1.7.9 on a Solaris 10 64 bit machine
Date written 15 March 2010 Aaron Light
Installing the Source Code:
This guide assumes that you are running as root for the duration of the install.
- Make sure you have these files in ~/ :
.bashrc (if this file already exists, make sure the following is appended)
source .profile source ossimbashrc
.profile (if this file already exists, make sure the following is appended)
TERM=gnome export TERM CC=gcc export CC
ossimbashrc
# ossimbashrc, contains all of the environment variables for # building ossim and its associated implementations # be sure to source this file for your build # in .bashrc add a source statement to include the ossimbashrc file # from where it resides. This assumes it has been placed in your home # directory. # # source ossimbashrc # # # Where is the Development source code directory export DEVHOME=${HOME}/Development # Where is the install target # for local install # export DEFAULT_INSTALL=${HOME}/usr_local # export INSTALL_HERE=${HOME}/usr_local/ossim # To be used for LD Project installs export AFS_INSTALL=/afs/ld/software/gis/ossim # for system install export DEFAULT_INSTALL=/usr/local export INSTALL_HERE=/usr/local # Where is the OSSIM source code top directory export OSSIM_DEV_HOME=${DEVHOME}/ossimsource export OSSIM_HOME=${OSSIM_DEV_HOME}/ossim export GDAL_HOME=${OSSIM_DEV_HOME}/ossim_dependencies/gdal/gdal-1.5.1 export LIBTIFF_HOME=${INSTALL_HERE}/include export OP_DIRECTORY=${OSSIM_DEV_HOME}/ossim_plugins # Variables for Groovy and Grails export GRAILS_HOME={DEVHOME}/ossimsource/ossim_dependencies/grails-1.0.3 export GROOVY_HOME={DEVHOME}/ossimsource/ossim_dependencies/groovy-1.5.6 export OSSIM_PREFERENCES_FILE=~/ossim_preferences # OpenSceneGraph Variables export OSGHOME=${DEVHOME}/ossimsource/ossim_dependencies/OpenSceneGraph/src OSGFP=/usr/local/share/OpenSceneGraph-Data export OSG_FILE_PATH=${OSGF9}:${OSGFP}/Images:${OSGFP}/shaders:${OSGFP}/SolarSystem:${OSGFP}/fonts:${OSGFP}/Catch:${OSGFP}/Cubemap_axis:${OSGFP}Cubemap_snow:${OSGFP}/ExampleThumnails:${OSGFP}/Configuration export OSGDATA=${OSG_FILE_PATH} # Trolltech Qt variables export QTDIR=${DEFAULT_INSTALL}/Trolltech/Qt-4.4.0/ # other OSSIM related defs export OSSIM_QT_HOME=${OSSIM_DEV_HOME}/ossim_qt4 export OSSIMPREDATOR_INC_DIR=${OSSIM_DEV_HOME}/ossimPredator/include export OSSIMPREDATOR_LIB_DIR=${OSSIM_DEV_HOME}/ossimPredator/lib export LIBWMS_INC_DIR=${INSTALL_HERE}/include export LIBWMS_LIB_DIR=${INSTALL_HERE}/lib # export OPENTHREADS_INC_DIR=${OSGHOME}/src/OpenThreads/include/OpenThreads # PATHS to find things export PATH=${INSTALL_HERE}/bin:$QTDIR/bin:$PATH export LD_LIBRARY_PATH=${INSTALL_HERE}/lib:${INSTALL_HERE}/lib64:$QTDIR/lib:${OSG_LIB_DIR}:${DEFAULT_INSTALL}/lib:$LD_LIBRARY_PATH # Handy aliases alias dev='cd ${DEVHOME}; echo "Development Directory";ls' alias oz='cd ${OSSIM_HOME}; echo "OSSIM Home";ls' alias ozd='cd ${OSSIM_DEV_HOME}/ossim_dependencies ; echo "OSSIM Dependencies"; ls' alias osg='cd ${OSGHOME}; echo "OpenSceneGraph"; ls' alias oqt='cd ${OSSIM_QT_HOME} ; echo "OSSIM QT4 Home"; ls' alias opt='cd ${OSSIM_DEV_HOME}/ossimPlanet ; echo "ossimPlanet source"; ls' alias ih='cd ${INSTALL_HERE} ; "Install Directory"; ls'
- Make sure root is using bash.
I did this by editing /etc/passwd and changing the shell command to: /bin/bash You will also need to run these commands to fix shell inconsistencies:
mv /usr/bin/sh /usr/bin/sh~ ln -s /usr/bin/bash /usr/bin/sh
- Perl needs a symlink in place for one of the dependencies
ln -s /usr/bin/perl /usr/local/bin/perl
- Edit /etc/profile and verify the path is correct at the bottom of the file. Mine was:
PATH="$PATH:$HOME/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/sfw/bin:/opt/sfw/bin:/root/bin:/usr/local/sbin:/bin:/opt/csw/bin:/opt/csw/sbin:/opt/csw/gcc3/bin:/usr/sfw/sbin:/opt/csw/mysql5/bin:/usr/ccs/bin" export PATH
Log out and log back in to reflect changes to the paths.
Here are the packages you will need, downloaded from http://www.sunfreeware.com/indexintel10.html Version numbers may vary.
pkgadd -d autoconf-2.65-sol10-x86-local pkgadd -d automake-1.11.1-sol10-x86-local pkgadd -d binutils-2.20.1-sol10-x86-local pkgadd -d cmake-2.4.8-sol10-x86-local pkgadd -d coreutils-8.2-sol10-x86-local pkgadd -d curl-7.20.0-sol10-x86-local pkgadd -d db-4.2.52.NC-sol10-intel-local pkgadd -d expat-2.0.1-sol10-x86-local pkgadd -d gcc-3.4.6-sol10-x86-local pkgadd -d gdbm-1.8.3-sol10-intel-local pkgadd -d gmp-4.2.1-sol10-x86-local pkgadd -d gtk+-2.12.0-sol10-x86-local pkgadd -d libiconv-1.13.1-sol10-x86-local pkgadd -d libidn-1.18-sol10-x86-local pkgadd -d libintl-3.4.0-sol10-x86-local pkgadd -d libsigsegv-2.6-sol10-x86-local pkgadd -d libssh2-1.2.4-sol10-x86-local pkgadd -d libtool-2.2.6b-sol10-x86-local pkgadd -d libxml2-2.6.31-sol10-x86-local pkgadd -d m4-1.4.14-sol10-x86-local pkgadd -d make-3.81-sol10-x86-local pkgadd -d mpfr-2.4.0-sol10-x86-local pkgadd -d nano-2.2.1-sol10-x86-local pkgadd -d ncurses-5.6-sol10-x86-local pkgadd -d neon-0.25.5-sol10-x86-local pkgadd -d openssl-0.9.8l-sol10-x86-local pkgadd -d opera-10.10.gcc4-static-qt3.pkg pkgadd -d sed-4.2.1-sol10-x86-local pkgadd -d subversion-1.4.3-sol10-x86-local pkgadd -d swig-1.3.36-sol10-x86-local pkgadd -d zlib-1.2.3-sol10-x86-local
Instructions for building the OSSIM distribution on Solaris 10 systems. This tutorial tracks an install of the OSSIM distribution from July 2008 on a freshly installed version of Solaris 10. This tutorial assumes a build out of a home directory Development folder with default installation at /usr/local/ossim as defined by the INSTALL_HERE environmental variable.
The entire OSSIM distribution contains many source directories and dependencies. Proper set up of the environmental variables used during the build is key to a successful build from source code.
Assuming a default installation from source in your home directory:
cd mkdir Development cd Development mkdir ossimsource cd ossimsource
To check out the entire source code tree from svn, you must be connected to the internet and type:
svn co http://svn.osgeo.org/ossim/tags/v1_7_9 . (note the trailing dot)
Now we’ll check and use the ‘dev’ alias to change directories
dev
The prompt should echo back Development Directory and list any files that are in that directory.
Gathering the Dependency Source Code
The following dependencies are need to build and can be downloaded into the source directory. URLs are provided.
boost http://sourceforge.net/projects/boost/files/boost/1.42.0/boost_1_42_0.tar.gz/download colladadom http://sourceforge.net/projects/collada-dom/files/Collada%20DOM/2.1/colladadom.tar.gz/download ffmpeg http://ossim.telascience.org/ossimdata/sourcesnaps/ffmpeg.zip gcc ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.3.4/gcc-4.3.4.tar.gz gdal http://download.osgeo.org/gdal/gdal-1.5.2.tar.gz jpeg http://sourceforge.net/projects/gnuwin32/files/jpeg/6b-4/jpeg-6b-4-src.zip/download libgeotiff http://ossim.telascience.org/ossimdata/sourcesnaps/libgeotiff-1.2.3.tgz libtiff http://ossim.telascience.org/ossimdata/sourcesnaps/libtiff-4.0.0.tgz (with bigtiff support) openmpi http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.1.tar.gz pcre http://sourceforge.net/projects/pcre/files/pcre/7.9/pcre-7.9.tar.gz/download Qt4 http://ossim.telascience.org/ossimdata/sourcesnaps/qt-x11-opensource-src-4.4.0.tar wxWidgets http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.8.10.tar.gz OpenSceneGraph ozd svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.4.0 OpenSceneGraph svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph-Data/tags/OpenSceneGraph-Data-2.4.0 OpenSceneGraph-Data
Make an ossim_dependencies directory
dev cd ossimsource mkdir ossim_dependencies ozd (should move you to ossim_dependencies directory)
Move and uncompress all of the dependencies into ~/Development/ossimsource/ossim_dependencies
gcc 4
ozd cd gcc-4.3.4 mkdir objdir cd objdir ../configure --with-gnu-as --with-as=/usr/sfw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++ make make install
libjpeg (to make sure we are picking up 64 bit version)
ozd nano fixdir.sh {{{ #!/bin/sh find jpeg-6b -type f | while read N do if dos2unix "$N" -o "$N".tmp then mv "$N".tmp "$N" fi done chmod +x jpeg-6b/configure chmod +x jpeg-6b/ltconfig chmod +x jpeg-6b/config.sub chmod +x jpeg-6b/config.guess }}} chmod +x fixdir.sh ./fixdir.sh cd jpeg-6b which libtool ln -s /usr/local/bin/libtool . ls ./configure --prefix=/usr/local --enable-static --enable-shared make make install
ffmpeg
ozd cd ffmpeg ./configure --prefix=${INSTALL_HERE} --disable-vhook --disable-mmx --enable-shared --disable-static make make install
The include files don’t line up with code, in the install location created ffmpeg dir and moved the libavs down into it.
cd ${INSTALL_HERE}/include mkdir ffmpeg mv libav* ffmpeg cd ffmpeg cp libavcodec/* . cp libavdevice/* . cp libavformat/* . cp libavutil/* .
EXPAT
Downloaded from http://sourceforge.net/project/downloading.php?group_id=10127&use_mirror=internap&filename=expat-2.0.1.tar.gz&87780402
ozd cd expat-2.0.1 ./configure --prefix=${INSTALL_HERE} make make install
libtiff (bigtiff)
ozd cd libtiff-4.0.0 chmod +x configure ./configure --prefix=${INSTALL_HERE} make make install cd libtiff cp *.h /usr/local/include
Geotiff
ozd cd libgeotiff-1.2.3 ./configure --prefix=${INSTALL_HERE} --with-libtiff=${INSTALL_HERE} rm config.status ./configure --prefix=${INSTALL_HERE} --with-libtiff=${INSTALL_HERE} make clean make make install cd ${INSTALL_HERE}/lib ls (should see the installed libtiff and libgeotiff libs)
GDAL
ozd cd gdal-1.5.1 ./configure --prefix=${INSTALL_HERE} --with-libtiff=${INSTALL_HERE} --with-libgeotiff=${INSTALL_HERE} --with-expat-inc=${INSTALL_HERE}/include --with-expat-lib=${INSTALL_HERE}/lib --with-expat=${INSTALL_HERE) make clean; make make install
OpenMPI
ozd cd openmpi-1.2.6 ./configure (had to run this without args first) ./configure --prefix=${INSTALL_HERE} make make install
CMake
Will need to make sure that cmake is on the system, if not download and install it
ozd cd cmake-2.6.0 ./bootstrap --prefix=${INSTALL_HERE} make make install
ColladaDOM 2.1
The Linux build needs libxml, PCRE, and boost filesytem development files installed on your machine to build the DOM.
pcre-devel-6.6-2.el5_1.7.x86_64.rpm (install this through the package manager) pcre-6.6-2.el5_1.7.x86_64.rpm ozd cd colladadom_21m cd dom make all ih cd include mkdir colladadom ozd; cd colladadom/dom edit the Makefile line 179 to read: prefix :=/usr/local make install (gets the headers in place then fails) cd build cd linux-1.4/ cp -r libcollada14dom* ${INSTALL_HERE}/lib/
Note: On the mac, just build OpenSceneGraph with the included xcode project.
Follow the default install instructions which install in /usr/local on unix:
ozd cd OpenSceneGraph ./configure (first time error’d out ) ./configure make
Next steps require admin privileges
make install exit ozd su cp -r OpenSceneGraph-Data /usr/local/share exit
To see if you have OpenSceneGraph installed and running:
ozd cd OpenSceneGraph-Data osgviewer cow.osg press <esc> to quit
OSSIM
oz ./configure --prefix=${INSTALL_HERE} --with-libtiff=${INSTALL_HERE} --with-geotiff=${INSTALL_HERE} --with-freetype=/usr --with-mpi=${INSTALL_HERE} --with-openthreads=${INSTALL_HERE} make depends make make install
libwms
need to manually copy lib/include to INSTALL_HERE
oz cd ../libwms make cd bin cd Linux64/ cp * ${INSTALL_HERE}/bin/ cd ${OSSIM_DEV_HOME}/libwms/src/Linux64.Opt (build location for RH E) cp libwms.so ${INSTALL_HERE}/lib/ cd ../../include/ cp -r * ${INSTALL_HERE}/include/
ossim_plugins
ozd cd ../ossim_plugins make all make install
typing
cd ${INSTALL_HERE}/lib ls *_plugin.so
should return the installed, built plugins
libossimcontrib_plugin.so libossimgdal_plugin.so libossimpng_plugin.so
move them into an ossim_plugins directory
mkdir ossim_plugins (if necessary)opt mv -r *_plugins.so ossim_plugins
ossimPredator
oz cd ../ossimPredator mkdir lib cd src make cd ../lib cp libossimPredator.so ${INSTALL_HERE}/lib
ossimPlanet
opt cd Make
edit the makedefs file and uncomment the DEV += -DOSSIMPLANET_ENABLE_PREDATOR line.
opt make cd src/ossimPlanet/Linux64.Opt (for RH E 5.0) cp libossimPlanet.so ${INSTALL_HERE}/lib opt cd examples/ossimplanetviewer/Linux64.Opt cp ossimplanetviewer ${INSTALL_HERE}/bin opt cd include cp -r ossimPlanet ${INSTALL_HERE}/include
Copy the reference data in place
from the ossim_package_support directory, do a recursive copy of the images directory to the install location for future retrival,
cd mkdir .ossim opt cd ../ossim_package_support cp -r fonts icons geoids images ${INSTALL_HERE}/dotossim
make a copy in the install location so other users can copy it
cp -r ${INSTALL_HERE}/dotossim ~/.ossim
Trolltech QT 4
This is a fairly lengthy install, so we use the --fast switch to install the minimum. QT is the cross platform GUI system used by imagelinker, iview and ossimplanet.
Be sure to configure with the complete path /usr/local/ossim/Trolltech/Qt-4.4.0.
ozd cd qt-x11-opensource-src-4.4.0 ./configure --prefix=${INSTALL_HERE}/Trolltech/Qt-4.4.0 --fast make make install
Verification:
which qmake
should return:
/usr/local//Trolltech/Qt-4.4.0/bin/qmake
OSSIM_QT4
oqt qmake make cd bin mv * ${INSTALL_HERE}/bin/ cd ../include/ mv * ${INSTALL_HERE}/include/ cd ../lib mv * ${INSTALL_HERE}/lib/ cd which imagelinker imagelinker
ossimPlanetQt
oz cd ../ossimPlanetQt cd src vi src.pro /INSTALL_PREFIX :177
uncomment the lines 162, 179 to define INSTALL_PREFIX and LOCAL_ROOT to $INSTALL_HERE
At this approximate location you can uncomment the INSTALL_PREFIX assignment to install at your variable location
e.g. INSTALL_PREFIX=/usr/local/lib uncomment the INSTALL_PREFIX=$$
also change the LOCAL_ROOT by uncommenting the one with INSTALL_PREFIX :159 LOCAL_ROOT=/usr/local/
cd .. make clean qmake make make install
Changing the src.pro install doesn’t get the application, copy manually
cp ossimplanet ${INSTALL_HERE}/bin
Line 184 the -L for LOCAL_ROOT was not in parenthesis and not being picked up. Same with the include line
added -L$$(INSTALL_PREFIX)/lib in LIBS += lines
to use the ossim commands, the startup environment will need to be modified for any user that wants to use them. Need to have LD_LIBRARY_PATH variable set in the appropriate shell file (.cshrc or .bashrc). Any custom ossim_preferences should be in a local version of the ossim_preferences in a users home directory. Otherwise, all preferences will come from the system level file.
OMS - OSSIM Mapping Services
oz cd ../oms/com make make install (might put it in /usr/local/ossim move includes and libs to /usr/local) cd ../joms ant dist
needed to update ant to 1.7
ossim preferences file setup
There is a template under ossim/etc/templates need to fill this out, save (~/ossim_preferences) and
make sure that
export OSSIM_PREFS_FILE=~/ossim_preferences
is set in your bashrc or ossimbashrc file.
Note, the ~.ossim subdirectory (dotossim) will be picked up by default in the home directory
~/.ossim