wiki:Ubuntu-7.10Build

Version 19 (modified by epifanio, 16 years ago) ( diff )

--

# enable apt-get backports in " /etc/apt/sources.list "

# "sudo gedit /etc/apt/sources.list " and uncomment all the deb line

# or :

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

# do an Update :

sudo apt-get update sudo apt-get upgrade

# Install some 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 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 ccache make libpq-dev flex bison cmake txt2tags libncurses5-dev fftw3-dev libreadline5-dev svn-buildpackage autotools-dev dpatch debhelper cpp-3.4 gcc-3.4 libg2c0-dev g++ g++-4.1 gcc

# To have OSG installed on Ubuntu you can build OSG from its svn repository

svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.2.0 OpenSceneGraph

# OSG use cmake to build (use apt-get install to resolve its dependancies, or remove the not finde libraries from the cmake prompt then configure and generate a make)

# Or it is possible to install the OSG debian package 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) # # note : if you are on ubuntu-8.04 you can find osg version in the repository #

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

# 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 and build the libgeotiff libraries from the debian repository

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

# download ossim (revision -12212)

cd ..

mkdir -p GIS/ossim

cd /GIS/ossim

svn co -r12212 https://svn.osgeo.org/ossim/trunk .

# set the ossim environment variables :

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 # ossim_plugins

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

sudo 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 # (here 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


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

Note: See TracWiki for help on using the wiki.