Changes between Initial Version and Version 1 of Solaris10Build


Ignore:
Timestamp:
Mar 15, 2010, 1:20:08 PM (14 years ago)
Author:
alight
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Solaris10Build

    v1 v1  
     1Compiling OSSIM on a 64 bit machine
     2
     3 Date written 20 Jul 2008
     4 Mark Lucas,
     5 with assistance from Garrett Potts, Scott Bortman, Patrick Depret, and Nikki Burns
     6
     7Installing the Source Code:
     8
     9Assuming a default installation from source in your home directory:
     10
     11{{{
     12        cd
     13        mkdir Development
     14        cd Development
     15        mkdir ossimsource
     16        cd ossimsource
     17}}}
     18
     19for a system install
     20{{{
     21        cd /usr/local
     22        su
     23        chgrp -R mlucas /usr/local
     24        mkdir ossim
     25        chown mlucas ossim              (use your user name instead of mlucas)
     26        chgrp staff /usr/local/ossim   (or an appropriate group for access)
     27        chmod 775 ossim
     28        exit
     29}}}
     30
     31This approach will allow you to install with out super user privs into /usr/local/ossim
     32
     33
     34To check out the entire source code tree from svn, you must be connected to the internet and type:
     35
     36{{{
     37svn co http://svn.osgeo.org/ossim/trunk .      (note the trailing dot)
     38}}}
     39
     40Alternatively, if you have a packaged source files:
     41 Copy and unpack the files in the Development directory, for example:
     42
     43 * Locate the source files
     44 * Copy to the source file location
     45 * uncompress them
     46 * set up the target directory for the ossim install (/usr/local/ossim shown above)
     47 * ensure that all required compiler packages are available on your system
     48 * Verify that all required complier components exist on the system.  If the target OS is Redhat Enterprise 5, any missing packages can be obtained from the Install DVD #1 of 1 (for 64 bit AMD and Intel64).  Note, some of the underscores may be dashes and vice versa.
     49
     50The rpm installs were on a RHEL 5 server with no development libraries installed.  If the  packages are already on the machine, the following commands will simply report that it is already installed.  No harm will come from running these items.  If there is arequired package that is not available, the rpm program will report this as well.  In that event, just find the required packages, install and add it to the list below:
     51
     52{{{
     53        cd /media/RHEL_5x86_64DVD/Server
     54
     55        rpm -i glibc-devel-2.4-12.x86-64.rpm
     56        rpm -i glibc-headers-2.4-12.x86_64.rpm
     57        rpm -i libgomp-4.1.1-53.e15.x86_64.rpm
     58        rpm -i gcc-4.1.1-52.e15.x86_64.rpm
     59        rpm -i libstdc++-devel-4.1.1-52.e15.x86_64.rpm
     60        rpm -i gcc-c++-4.1.1-52.e15.x86_64.rpm
     61        rpm -i libjpeg-devel-6b-37.x86_64.rpm
     62        rpm -i pcre-devel-6.6-2.el5_1.7.x86_64.rpm
     63        rpm -i ant - 1.6.5-2jpp.2.x86_64 (need later version 1.7)
     64}}}
     65
     66ossimbashrc
     67
     68Under the ossim_package_support directory is an ossimbashrc file. 
     69These build instruction assume the use of the ossimbashrc file. It includes a number of environmental variables and alias’s that are used in the build instructions.  When you open a terminal to perform these instructions, be sure to source the file:
     70
     71{{{
     72        source ossimbashrc
     73}}}
     74
     75(alternatively you can add this line to your .bashrc file)
     76
     77Instructions for building the OSSIM distribution on unix systems.  This tutorial tracks an install of the OSSIM distribution from July 2008 on a freshly installed version of Red Hat Enterprise 5.0 x86-64.  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.
     78
     79The 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.  Please source the ossimbashrc file.
     80
     81
     82{{{     
     83        cd 
     84        mv .bashrc bashrc.old
     85        vi .bashrc
     86        cd /Users/Shared/Development/ossimsource
     87        svn update .
     88        cd ossim_package_support/
     89        cp ossimbashrc ~/
     90        cd
     91}}}
     92
     93Now edit the ossimbashrc file to point to your Development directory.  This is the directory where all of the source code exists.  The default ossimbashrc defaults to Development in your home directory.
     94
     95{{{
     96        vi .bashrc
     97        i
     98        source ossimbashrc
     99        <esc>
     100        :wq
     101
     102        source .bashrc
     103}}}
     104
     105Now we’ll check and use the ‘dev’ alias to change directories
     106{{{
     107
     108        dev
     109
     110}}}
     111
     112The prompt should echo back Development Directory and list any files that are in that directory. 
     113
     114Gathering the Dependency Source Code
     115
     116{{{
     117        dev
     118        mkdir ossim_dependencies_source
     119        ods                          cd ossim_dependencies_source
     120}}}
     121
     122
     123The following dependencies are need to build and can be downloaded into the source directory.  URLs are provided
     124
     125
     126Look at http://ossim.telascience.org/ossimdata/sourcesnaps where these dependencies have been provided for your convenience.
     127
     128{{{
     129expat                 http://sourceforge.net/projects/expat/
     130openmpi           http://www.open-mpi.org/software/ompi/v1.2/openmpi-1.2.6.tar.gz
     131gdal               http://trac.osgeo.org/gdal/wiki/DownloadSource
     132geotiff               ftp:://ftp.remotesensing.org/geotiff
     133libtiff                 (with bigtiff support)  http://ossim.telascience.org/ossimdata/sourcesnaps/libtiff-4.0.0.tgz
     134Qt4                    http://trolltech.com/downloads
     135
     136OpenSceneGraph 2.6.1   http://www.openscenegraph.org/projects/osg/wiki/Downloads
     137        OpenThreads use the one from OpenSceneGraph
     138        collada for OpenSceneGraph colladadom_21.tgz in snapshots
     139
     140ffmpeg             svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
     141}}}
     142
     143
     144Make an ossim_dependencies directory
     145
     146{{{
     147        dev
     148        cd ossimsource
     149        mkdir ossim_dependencies
     150        ozd             (should move you to ossim_dependencies directory)
     151}}}
     152
     153        move and uncompress all of the dependencies into this directory
     154
     155{{{
     156        ozd
     157        tar xvf cmake-2.6.0.tar
     158        tar xvfz colladadom_21.tgz
     159        tar xvfz expat-2.0.1.tar.gz
     160        unzip ffmpeg.zip
     161        tar xvfz gdal-1.5.1.tar.gz
     162        tar xvfz libgeotiff-1.2.3.tgz
     163        tar xvfz libtiff-4.0.0.tgz
     164        tar xvfz openmpi-1.2.6.tar.gz
     165        unzip OpenSceneGraph-2.4.0.zip
     166        tar xvf qt-x11-opensource-src-4.4.0.tar
     167        unzip OpenSceneGraph-Data-2.4.0.zip
     168        tar xvfz jpegsrc.v6b.tar.gz
     169}}}
     170
     171
     172libjpeg
     173 to make sure we are picking up 64 bit version
     174
     175{{{
     176ozd
     177cd jpeg-6b
     178which libtool
     179ln -s /usr/bin/libtool .
     180 ls
     181./configure --prefix=/usr/local --enable-static --enable-shared
     182make
     183make install
     184}}}
     185 
     186ffmpeg
     187
     188{{{
     189        ozd
     190        cd ffmpeg
     191        ./configure --prefix=${INSTALL_HERE} --disable-vhook --disable-mmx --enable-shared --disable-static
     192        make
     193        make install
     194}}}
     195
     196The include files don’t line up with code, in the install location created ffmpeg dir and moved the libavs down into it.
     197
     198{{{
     199        cd ${INSTALL_HERE}/include
     200        mkdir ffmpeg
     201        mv libav* ffmpeg
     202        cd ffmpeg
     203        cp libavcodec/* .
     204        cp libavdevice/* .
     205        cp libavformat/* .
     206        cp libavutil/* .
     207}}}
     208
     209EXPAT
     210 Downloaded from http://sourceforge.net/project/downloading.php?group_id=10127&use_mirror=internap&filename=expat-2.0.1.tar.gz&87780402
     211
     212{{{
     213        ozd
     214        cd expat-2.0.1
     215        ./configure --prefix=${INSTALL_HERE}
     216        make
     217        make install
     218}}}
     219
     220
     221libtiff (bigtiff)
     222
     223{{{
     224        ozd
     225        cd libtiff-4.0.0
     226        chmod +x configure
     227        ./configure --prefix=${INSTALL_HERE}
     228        make
     229        make install
     230        cd libtiff
     231        cp *.h /usr/local/include
     232}}}
     233
     234Geotiff
     235
     236{{{
     237        ozd
     238        cd libgeotiff-1.2.3
     239        ./configure --prefix=${INSTALL_HERE} --with-libtiff=${INSTALL_HERE}
     240        rm config.status
     241        ./configure --prefix=${INSTALL_HERE} --with-libtiff=${INSTALL_HERE}
     242        make clean
     243        make
     244        make install
     245
     246        cd ${INSTALL_HERE}/lib
     247        ls  (should see the installed libtiff and libgeotiff libs)
     248  }}}
     249
     250
     251GDAL
     252
     253{{{
     254        ozd
     255        cd gdal-1.5.1
     256        ./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)
     257        make clean;
     258        make
     259        make install
     260}}}
     261
     262OpenMPI
     263
     264{{{
     265        ozd
     266        cd openmpi-1.2.6
     267        ./configure                   (had to run this without args first)
     268        ./configure --prefix=${INSTALL_HERE}
     269        make
     270        make install
     271}}}
     272
     273CMake
     274 Will need to make sure that cmake is on the system, if not download and install it
     275
     276{{{
     277        ozd
     278        cd cmake-2.6.0
     279        ./bootstrap --prefix=${INSTALL_HERE}
     280        make
     281        make install
     282}}}
     283
     284ColladaDOM 2.1
     285
     286The Linux build needs libxml, PCRE, and boost filesytem development files installed on your machine to build the DOM.
     287
     288{{{
     289pcre-devel-6.6-2.el5_1.7.x86_64.rpm     (install this through the package manager)
     290pcre-6.6-2.el5_1.7.x86_64.rpm
     291
     292        ozd
     293        cd colladadom_21m
     294
     295        cd dom
     296        make all
     297        ih
     298        cd include
     299        mkdir colladadom
     300
     301ozd; cd colladadom/dom
     302edit the Makefile line 179 to read:
     303prefix :=/usr/local
     304        make install (gets the headers in place then fails)
     305        cd build
     306        cd linux-1.4/
     307        cp -r libcollada14dom* ${INSTALL_HERE}/lib/
     308}}}
     309
     310OpenSceneGraph
     311
     312Note:  On the mac, just build OpenSceneGraph with the included xcode project. 
     313
     314Follow the default install instructions which install in /usr/local
     315on unix:
     316
     317{{{
     318        ozd
     319        cd OpenSceneGraph
     320        ./configure  (first time error’d out )
     321        ./configure
     322        make
     323 }}}
     324
     325Next steps require admin privileges
     326
     327{{{
     328        make install
     329        exit
     330        ozd
     331        su
     332        cp -r OpenSceneGraph-Data /usr/local/share
     333        exit
     334}}}
     335
     336To see if you have OpenSceneGraph installed and running:
     337{{{
     338        ozd
     339        cd OpenSceneGraph-Data
     340        osgviewer cow.osg
     341        press <esc> to quit
     342}}}
     343OSSIM
     344{{{
     345        oz
     346        ./configure --prefix=${INSTALL_HERE} --with-libtiff=${INSTALL_HERE} --with-geotiff=${INSTALL_HERE} --with-freetype=/usr --with-mpi=${INSTALL_HERE} --with-openthreads=${INSTALL_HERE}
     347        make depends
     348        make
     349        make install
     350}}}
     351
     352libwms
     353
     354need to manually copy lib/include to INSTALL_HERE
     355
     356{{{
     357        oz
     358        cd ../libwms
     359        make
     360        cd bin
     361        cd Linux64/
     362        cp * ${INSTALL_HERE}/bin/
     363        cd ${OSSIM_DEV_HOME}/libwms/src/Linux64.Opt   (build location for RH E)
     364        cp libwms.so ${INSTALL_HERE}/lib/
     365        cd ../../include/
     366        cp -r * ${INSTALL_HERE}/include/
     367}}}
     368
     369ossim_plugins
     370
     371{{{
     372        ozd
     373        cd ../ossim_plugins
     374        make all
     375        make install
     376}}}
     377
     378typing
     379
     380{{{
     381        cd ${INSTALL_HERE}/lib
     382        ls *_plugin.so
     383}}}
     384
     385should return the installed, built plugins
     386
     387libossimcontrib_plugin.so  libossimgdal_plugin.so  libossimpng_plugin.so
     388
     389move them into an ossim_plugins directory
     390
     391{{{
     392        mkdir ossim_plugins (if necessary)opt
     393        mv -r *_plugins.so ossim_plugins
     394}}}
     395
     396ossimPredator
     397
     398{{{
     399        oz
     400        cd ../ossimPredator
     401        mkdir lib
     402        cd src
     403        make
     404        cd ../lib
     405        cp libossimPredator.so ${INSTALL_HERE}/lib
     406}}}
     407
     408ossimPlanet
     409
     410{{{
     411        opt
     412        cd Make
     413}}}
     414
     415edit the makedefs file and uncomment the DEV += -DOSSIMPLANET_ENABLE_PREDATOR
     416line.
     417
     418{{{
     419        opt
     420        make
     421        cd src/ossimPlanet/Linux64.Opt    (for RH E 5.0)
     422        cp libossimPlanet.so ${INSTALL_HERE}/lib
     423
     424        opt
     425        cd examples/ossimplanetviewer/Linux64.Opt
     426        cp ossimplanetviewer ${INSTALL_HERE}/bin
     427       
     428        opt
     429        cd include
     430        cp -r ossimPlanet ${INSTALL_HERE}/include
     431}}}
     432
     433Copy the reference data in place
     434 from the ossim_package_support directory, do a recursive copy of the images directory to the install location for future retrival,
     435
     436{{{
     437        cd
     438        mkdir .ossim
     439        opt
     440        cd ../ossim_package_support
     441        cp -r fonts icons geoids images ${INSTALL_HERE}/dotossim
     442}}}
     443
     444make a copy in the install location so other users can copy it
     445
     446{{{
     447        cp -r ${INSTALL_HERE}/dotossim ~/.ossim
     448}}}
     449 
     450Trolltech QT 4
     451
     452This 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.
     453
     454Be sure to configure with the complete path /usr/local/ossim/Trolltech/Qt-4.4.0.
     455
     456{{{
     457        ozd
     458        cd qt-x11-opensource-src-4.4.0
     459        ./configure --prefix=${INSTALL_HERE}/Trolltech/Qt-4.4.0 --fast
     460        make
     461        make install
     462}}}
     463
     464Verification:
     465{{{
     466        which qmake
     467}}}
     468should return:
     469{{{
     470/usr/local//Trolltech/Qt-4.4.0/bin/qmake
     471}}}
     472
     473OSSIM_QT4
     474
     475{{{
     476        oqt
     477        qmake
     478        make
     479        cd bin
     480        mv * ${INSTALL_HERE}/bin/
     481        cd ../include/
     482        mv * ${INSTALL_HERE}/include/
     483        cd ../lib
     484        mv * ${INSTALL_HERE}/lib/
     485        cd
     486        which imagelinker
     487        imagelinker
     488}}}
     489
     490ossimPlanetQt
     491
     492{{{
     493        oz
     494        cd ../ossimPlanetQt             
     495        cd src
     496        vi src.pro
     497        /INSTALL_PREFIX
     498        :177
     499}}}
     500
     501uncomment the lines 162, 179 to define INSTALL_PREFIX and LOCAL_ROOT to $INSTALL_HERE
     502
     503At this approximate location you can uncomment the INSTALL_PREFIX assignment to install at your variable location
     504
     505 e.g.  INSTALL_PREFIX=/usr/local/lib
     506 uncomment the INSTALL_PREFIX=$$
     507
     508 also change the LOCAL_ROOT by uncommenting the one with INSTALL_PREFIX
     509 :159    LOCAL_ROOT=/usr/local/
     510
     511{{{
     512        cd ..
     513        make clean
     514        qmake
     515        make
     516        make install
     517}}}
     518
     519Changing the src.pro install doesn’t get the application, copy manually
     520
     521{{{
     522        cp ossimplanet ${INSTALL_HERE}/bin
     523}}}
     524
     525Line 184 the -L for LOCAL_ROOT was not in parenthesis and not being picked up.  Same with the include line
     526
     527added -L$$(INSTALL_PREFIX)/lib in LIBS += lines
     528
     529to 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.
     530
     531OMS - OSSIM Mapping Services
     532
     533{{{
     534oz
     535cd ../oms/com
     536make
     537make install  (might put it in /usr/local/ossim move includes and libs to /usr/local)
     538cd ../joms
     539ant dist
     540}}}
     541
     542needed to update ant to 1.7
     543
     544
     545
     546ossim preferences file setup
     547
     548There is a template under ossim/etc/templates  need to fill this out, save (~/ossim_preferences)  and
     549
     550make sure that
     551
     552{{{
     553export OSSIM_PREFS_FILE=~/ossim_preferences
     554}}}
     555
     556is set in your bashrc or ossimbashrc file.
     557
     558
     559Note, the  ~.ossim subdirectory (dotossim) will be picked up by default in the home directory
     560
     561~/.ossim