# How to build ossim on ubuntu 7.10 # These notes are based on a fresh ubuntu-7.10 desktop installation. # install ubuntu 7.10 desktop (these notes are for x86 version, but works fine for 64bit # and ppc too, you only need to change the link to download the debian packages) ("sasha" is my username). # add the backports in the " /etc/apt/sources.list " file # you can open the file using "sudo gedit /etc/apt/sources.list " and uncomment all the deb line # or siple add it using echo : sudo echo "deb http://it.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse" >> /etc/apt/sources.list sudo echo "deb-src http://it.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse" >> /etc/apt/sources.list sudo echo "deb http://archive.canonical.com/ubuntu gutsy partner" >> /etc/apt/sources.list sudo echo "deb-src http://archive.canonical.com/ubuntu gutsy partner" >> /etc/apt/sources.list # update your system : sudo apt-get update sudo apt-get upgrade # install the needed libraries : apt-get install libqt4-core libqt4-debug libqt4-dev libqt4-gui libqt4-qt3support libqt4-sql lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig uim-qt python-dev python-qt4 python-qt4-dev python-sip4 sip4 python-sip4-dev libapt-pkg-perl resolvconf gdal-bin libgdal1-dev libgeos-dev proj libgdal-doc libhdf4g-dev libhdf4g-run libgsl0-dev g++ libjasper-dev libtiff4-dev subversion libsqlite3-dev sqlite3 ccache make libpq-dev flex bison cmake txt2tags libncurses5-dev fftw3-dev libreadline5-dev svn-buildpackage autotools-dev dpatch debhelper cpp-3.4 g77 g77-3.4 gcc-3.4 libg2c0-dev g++ g++-4.1 gcc gfortran gfortran-4.2 # note : the download is about 700mb , when finish it ask for postfix configuration, i used : # >> ok >> nessuna configurazione # download debian package for Openscengrph from http://www.debian.org/distrib/packages (search for your # architecture, the follow links are for a standard x86 but 64bit and ppc are disponible too) mkdir /home/sasha/dipendenze cd /home/sasha/dipendenze wget http://ftp.de.debian.org/debian/pool/main/o/openscenegraph/libopenscenegraph-dev_2.2.0-2_i386.deb wget http://ftp.de.debian.org/debian/pool/main/o/openscenegraph/libopenscenegraph6_2.2.0-2_i386.deb wget http://ftp.de.debian.org/debian/pool/main/o/openscenegraph/libopenthreads-dev_2.2.0-2_i386.deb wget http://ftp.de.debian.org/debian/pool/main/o/openscenegraph/libopenthreads6_2.2.0-2_i386.deb wget http://ftp.de.debian.org/debian/pool/main/c/coin2/libcoin40c2_2.5.0-1_i386.deb # Download and build the libgeotiff libraries from the debian repository (thanks to ...) svn co svn://svn.debian.org/svn/pkg-grass/packages/geotiff cd /home/sasha/dipendenze/geotiff/libgeotiff-dfsg/trunk/ sudo svn-buildpackage -us -uc --svn-ignore-new cd /home/sasha/dipendenze/geotiff/libgeotiff-epsg/trunk/ sudo svn-buildpackage -us -uc --svn-ignore-new cd /home/sasha/dipendenze/geotiff/libgeotiff-dfsg/build-area/ dpkg -i *deb cd /home/sasha/dipendenze/geotiff/libgeotiff-epsg/build-area/ dpkg -i *deb cd ../../../ # build the openshenegrph libraries : sudo dpkg -i libopenthreads6_2.2.0-2_i386.deb sudo dpkg -i libopenthreads-dev_2.2.0-2_i386.deb sudo dpkg -i libcoin40c2_2.5.0-1_i386.deb sudo dpkg -i libopenscenegraph6_2.2.0-2_i386.deb sudo dpkg -i libopenscenegraph-dev_2.2.0-2_i386.deb # download ossim from the svn repository (note here we download the revision 12212, you can try to build a more recent revision too) cd .. mkdir -p GIS/ossim cd /GIS/ossim svn co -r12212 https://svn.osgeo.org/ossim/trunk . # export the needed environment to build ossim : echo "export OSSIM_DEV_HOME=/home/sasha/GIS/ossim" >> /home/sasha/.bashrc echo "export OSSIM_HOME=/home/sasha/GIS/ossim/ossim" >> /home/sasha/.bashrc echo "export OSSIM_QT_HOME=/home/sasha/GIS/ossim/ossim_qt" >> /home/sasha/.bashrc echo "export OSSIM_LIB_DIR=/home/sasha/GIS/ossim/ossim/lib/ossim" >> /home/sasha/.bashrc echo "export OSSIM_INC_DIR=/home/sasha/GIS/ossim/ossim/include" >> /home/sasha/.bashrc # build ossim libwms ossim_qt4 ossimplanet ossimplanet_qt : cd /home/sasha/GIS/ossim/ossim ./configure --with-geotiff=/usr/include/geotiff --prefix=/usr --datadir=/usr/share/ossim --includedir=/usr/include/ossim --with-jpeg=/usr --with-libtif make sudo make install cd /home/sasha/GIS/ossim/libwms make sudo make install cd .. # add the compiled libraries to your system : sudo touch /etc/ld.so.conf.d/ossim.conf sudo echo "/usr/lib" >> /etc/ld.so.conf.d/ossim.conf sudo echo "/usr/local/lib" >> /etc/ld.so.conf.d/ossim.conf sudo echo "/home/sasha/GIS/ossim/ossim/lib" >> /etc/ld.so.conf.d/ossim.conf # open a new terminal and type : sudo ldconfig cd /home/sasha/GIS/ossim/ossim_qt4 qmake ossim_qt4.pro make sudo make install cd /home/sasha/GIS/ossim/ossimPlanet make make install cd /home/sasha/GIS/ossim/ossimPlanetQt/ qmake ossimPlanetQt.pro make sudo make install sudo ldconfig # to buid ossoim_plugin, change the gdal setting in the file # /home/sasha/GIS/ossim/ossim_plugins/make.opt.in # to point where you have gdal's files # in my case (i used gdal from the repository) GDAL_HOME =/usr/ ifeq ($(origin GDAL_HOME), undefined) GDAL_INCLUDES =/usr/include/gdal/ GDAL_LIBS =/usr/lib else GDAL_INCLUDES = -I$(GDAL_HOME)/include/gdal/ GDAL_LIBS = -L$(GDAL_HOME)/lib endif ### # End of gdal plugin specific things. ### ------------ save the file ---------------- make sudo make install sudo ldconfig # create a "data" directory readed from ossim at its sturtup : mkdir /home/sasha/.ossim # copy the "ossim support data" : cp -r /home/sasha/GIS/ossim/ossim_package_support/fonts /home/sasha/.ossim/fonts cp -r /home/sasha/GIS/ossim/ossim_package_support/geoids /home/sasha/.ossim/geoids cp -r /home/sasha/GIS/ossim/ossim_package_support/images /home/sasha/.ossim/images