Changes between Version 1 and Version 2 of unixinstallnotes


Ignore:
Timestamp:
Nov 25, 2008, 7:35:49 PM (15 years ago)
Author:
mlucas
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • unixinstallnotes

    v1 v2  
    11Compiling OSSIM on a 64 bit machine
    2 Date written 20 Jul 2008
    3 Mark Lucas,
    4 with assistance from Garrett Potts, Scott Bortman, Patrick Depret, and Nikki Burns
     2
     3 Date written 20 Jul 2008
     4 Mark Lucas,
     5 with assistance from Garrett Potts, Scott Bortman, Patrick Depret, and Nikki Burns
    56
    67Installing the Source Code:
     
    89Assuming a default installation from source in your home directory:
    910
     11{{{
    1012        cd
    1113        mkdir Development
     
    1315        mkdir ossimsource
    1416        cd ossimsource
     17}}}
    1518
    1619for a system install
     20{{{
    1721        cd /usr/local
    1822        su
     
    2327        chmod 775 ossim
    2428        exit
     29}}}
    2530
    2631This approach will allow you to install with out super user privs into /usr/local/ossim
    2732
    2833
    29 
    30 
    3134To check out the entire source code tree from svn, you must be connected to the internet and type:
    3235
     36{{{
    3337svn co http://svn.osgeo.org/ossim/trunk .      (note the trailing dot)
     38}}}
    3439
    3540Alternatively, if you have a packaged source files:
    36 Copy and unpack the files in the Development directory, for example:
    37 
    38 Locate the source files
    39 Copy to the source file location
    40 uncompress them
    41 set up the target directory for the ossim install (/usr/local/ossim shown above)
    42 ensure that all required compiler packages are available on your system
    43 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.
     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.
    4449
    4550The 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:
    4651
     52{{{
    4753        cd /media/RHEL_5x86_64DVD/Server
    4854
     
    5662        rpm -i pcre-devel-6.6-2.el5_1.7.x86_64.rpm
    5763        rpm -i ant - 1.6.5-2jpp.2.x86_64 (need later version 1.7)
    58 
     64}}}
    5965
    6066ossimbashrc
     67
    6168Under the ossim_package_support directory is an ossimbashrc file. 
    6269These 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:
    6370
     71{{{
    6472        source ossimbashrc
     73}}}
    6574
    6675(alternatively you can add this line to your .bashrc file)
     
    7079The 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.
    7180
    72        
     81
     82{{{     
    7383        cd 
    7484        mv .bashrc bashrc.old
     
    7989        cp ossimbashrc ~/
    8090        cd
     91}}}
    8192
    8293Now 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.
    8394
     95{{{
    8496        vi .bashrc
    8597        i
     
    89101
    90102        source .bashrc
     103}}}
    91104
    92105Now we’ll check and use the ‘dev’ alias to change directories
     106{{{
    93107
    94108        dev
    95109
     110}}}
     111
    96112The prompt should echo back Development Directory and list any files that are in that directory. 
    97113
    98114Gathering the Dependency Source Code
    99115
     116{{{
    100117        dev
    101118        mkdir ossim_dependencies_source
    102119        ods                          cd ossim_dependencies_source
     120}}}
    103121
    104122
     
    108126Look at http://ossim.telascience.org/ossimdata/sourcesnaps where these dependencies have been provided for your convenience.
    109127
    110 expat                        http://sourceforge.net/projects/expat/
    111 openmpi                   http://www.open-mpi.org/software/ompi/v1.2/
    112                         openmpi-1.2.6.tar.gz
    113 gdal            http://trac.osgeo.org/gdal/wiki/DownloadSource
    114 geotiff           ftp:://ftp.remotesensing.org/geotiff
    115 libtiff            (with bigtiff support)  http://ossim.telascience.org/ossimdata/sourcesnaps/libtiff-4.0.0.tgz
    116 Qt4             http://trolltech.com/downloads
    117 OpenSceneGraph 2.4   http://www.openscenegraph.org/projects/osg/wiki/Downloads
     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
    118137        OpenThreads use the one from OpenSceneGraph
    119138        collada for OpenSceneGraph colladadom_21.tgz in snapshots
    120139
    121 ffmpeg    svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
     140ffmpeg             svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
     141}}}
    122142
    123143
    124144Make an ossim_dependencies directory
    125145
     146{{{
    126147        dev
    127148        cd ossimsource
    128149        mkdir ossim_dependencies
    129150        ozd             (should move you to ossim_dependencies directory)
     151}}}
    130152
    131153        move and uncompress all of the dependencies into this directory
    132154
     155{{{
    133156        ozd
    134157        tar xvf cmake-2.6.0.tar
     
    144167        unzip OpenSceneGraph-Data-2.4.0.zip
    145168        tar xvfz jpegsrc.v6b.tar.gz
    146 
    147 
    148 
    149 
    150 
    151 
    152 
    153 
    154 
    155 
    156 libjpeg to make sure we are picking up 64 bit version
    157 
     169}}}
     170
     171
     172libjpeg
     173 to make sure we are picking up 64 bit version
     174
     175{{{
    158176ozd
    159177cd jpeg-6b
     
    164182make
    165183make install
     184}}}
    166185 
    167186ffmpeg
     187
     188{{{
    168189        ozd
    169190        cd ffmpeg
    170         ./configure --prefix=${INSTALL_HERE} --enable-shared --disable-static
    171 
    172 Note, for mac osx you need to configure
    173 ./configure --prefix=${INSTALL_HERE} --disable-vhook --disable-mmx --enable-shared --disable-static
    174 
    175         make
    176         make install
     191        ./configure --prefix=${INSTALL_HERE} --disable-vhook --disable-mmx --enable-shared --disable-static
     192        make
     193        make install
     194}}}
    177195
    178196The include files don’t line up with code, in the install location created ffmpeg dir and moved the libavs down into it.
    179197
     198{{{
    180199        cd ${INSTALL_HERE}/include
    181200        mkdir ffmpeg
     
    186205        cp libavformat/* .
    187206        cp libavutil/* .
     207}}}
    188208
    189209EXPAT
    190 Downloaded from http://sourceforge.net/project/downloading.php?group_id=10127&use_mirror=internap&filename=expat-2.0.1.tar.gz&87780402
    191 
     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{{{
    192213        ozd
    193214        cd expat-2.0.1
     
    195216        make
    196217        make install
     218}}}
    197219
    198220
    199221libtiff (bigtiff)
    200222
     223{{{
    201224        ozd
    202225        cd libtiff-4.0.0
     
    207230        cd libtiff
    208231        cp *.h /usr/local/include
     232}}}
    209233
    210234Geotiff
    211235
     236{{{
    212237        ozd
    213238        cd libgeotiff-1.2.3
     
    221246        cd ${INSTALL_HERE}/lib
    222247        ls  (should see the installed libtiff and libgeotiff libs)
    223  
     248  }}}
    224249
    225250
    226251GDAL
    227252
     253{{{
    228254        ozd
    229255        cd gdal-1.5.1
     
    232258        make
    233259        make install
     260}}}
    234261
    235262OpenMPI
    236263
    237 
     264{{{
    238265        ozd
    239266        cd openmpi-1.2.6
     
    242269        make
    243270        make install
    244 
    245 OpenSceneGraph 2.4 
     271}}}
     272
     273OpenSceneGraph 2.6.1 
     274
    246275
    247276CMake
    248 Will need to make sure that cmake is on the system, if not download and install it
     277 Will need to make sure that cmake is on the system, if not download and install it
     278
     279{{{
    249280./bootstrap --prefix=${INSTALL_HERE}; make ; make install
    250281
     
    254285        make
    255286        make install
     287}}}
    256288
    257289ColladaDOM 2.1
     
    259291The Linux build needs libxml, PCRE, and boost filesytem development files installed on your machine to build the DOM.
    260292
     293{{{
    261294pcre-devel-6.6-2.el5_1.7.x86_64.rpm     (install this through the package manager)
    262295pcre-6.6-2.el5_1.7.x86_64.rpm
     
    278311        cd linux-1.4/
    279312        cp -r libcollada14dom* ${INSTALL_HERE}/lib/
     313}}}
    280314
    281315OpenSceneGraph
     
    284318
    285319Follow the default install instructions which install in /usr/local
    286 
    287320on unix:
    288321
     322{{{
    289323        ozd
    290324        cd OpenSceneGraph
     
    292326        ./configure
    293327        make
    294  
     328 }}}
     329
    295330Next steps require admin privileges
     331
     332{{{
    296333        make install
    297334        exit
     
    300337        cp -r OpenSceneGraph-Data /usr/local/share
    301338        exit
     339}}}
    302340
    303341To see if you have OpenSceneGraph installed and running:
     342{{{
    304343        ozd
    305344        cd OpenSceneGraph-Data
    306345        osgviewer cow.osg
    307346        press <esc> to quit
    308 
     347}}}
    309348OSSIM
     349{{{
    310350        oz
    311351        ./configure --prefix=${INSTALL_HERE} --with-libtiff=${INSTALL_HERE} --with-geotiff=${INSTALL_HERE} --with-freetype=/usr --with-mpi=${INSTALL_HERE} --with-openthreads=${INSTALL_HERE}
     
    313353        make
    314354        make install
     355}}}
    315356
    316357libwms
     
    318359need to manually copy lib/include to INSTALL_HERE
    319360
     361{{{
    320362        oz
    321363        cd ../libwms
     
    328370        cd ../../include/
    329371        cp -r * ${INSTALL_HERE}/include/
     372}}}
    330373
    331374ossim_plugins
    332375
    333 
     376{{{
    334377        ozd
    335378        cd ../ossim_plugins
    336379        make all
    337380        make install
     381}}}
    338382
    339383typing
     384
     385{{{
    340386        cd ${INSTALL_HERE}/lib
    341387        ls *_plugin.so
     388}}}
    342389
    343390should return the installed, built plugins
     
    347394move them into an ossim_plugins directory
    348395
     396{{{
    349397        mkdir ossim_plugins (if necessary)opt
    350398        mv -r *_plugins.so ossim_plugins
    351 
     399}}}
    352400
    353401ossimPredator
    354402
     403{{{
    355404        oz
    356405        cd ../ossimPredator
     
    360409        cd ../lib
    361410        cp libossimPredator.so ${INSTALL_HERE}/lib
     411}}}
    362412
    363413ossimPlanet
    364414
     415{{{
    365416        opt
    366417        cd Make
     418}}}
    367419
    368420edit the makedefs file and uncomment the DEV += -DOSSIMPLANET_ENABLE_PREDATOR
    369421line.
    370422
     423{{{
    371424        opt
    372425        make
     
    381434        cd include
    382435        cp -r ossimPlanet ${INSTALL_HERE}/include
     436}}}
    383437
    384438Copy the reference data in place
    385439 from the ossim_package_support directory, do a recursive copy of the images directory to the install location for future retrival,
    386440
     441{{{
    387442        cd
    388443        mkdir .ossim
     
    390445        cd ../ossim_package_support
    391446        cp -r fonts icons geoids images ${INSTALL_HERE}/dotossim
     447}}}
    392448
    393449make a copy in the install location so other users can copy it
    394450
     451{{{
    395452        cp -r ${INSTALL_HERE}/dotossim ~/.ossim
    396 
     453}}}
    397454 
    398455Trolltech QT 4
     
    402459Be sure  to configure with the complete path /usr/local/ossim/Trolltech/Qt-4.4.0.
    403460
     461{{{
    404462        ozd
    405463        cd qt-x11-opensource-src-4.4.0
     
    407465        make
    408466        make install
    409 
     467}}}
    410468
    411469Verification:
     470{{{
    412471        which qmake
     472}}}
    413473should return:
     474{{{
    414475/usr/local//Trolltech/Qt-4.4.0/bin/qmake
     476}}}
    415477
    416478OSSIM_QT4
    417479
     480{{{
    418481        oqt
    419482        qmake
     
    428491        which imagelinker
    429492        imagelinker
     493}}}
    430494
    431495ossimPlanetQt
    432496
     497{{{
    433498        oz
    434499        cd ../ossimPlanetQt             
     
    437502        /INSTALL_PREFIX
    438503        :177
    439 
     504}}}
    440505
    441506uncomment the lines 162, 179 to define INSTALL_PREFIX and LOCAL_ROOT to $INSTALL_HERE
     
    443508At this approximate location you can uncomment the INSTALL_PREFIX assignment to install at your variable location
    444509
    445 e.g.  INSTALL_PREFIX=/usr/local/lib
    446 uncomment the INSTALL_PREFIX=$$
    447 
    448 also change the LOCAL_ROOT by uncommenting the one with INSTALL_PREFIX
    449 :159    LOCAL_ROOT=/usr/local/
    450 
    451 
     510 e.g.  INSTALL_PREFIX=/usr/local/lib
     511 uncomment the INSTALL_PREFIX=$$
     512
     513 also change the LOCAL_ROOT by uncommenting the one with INSTALL_PREFIX
     514 :159    LOCAL_ROOT=/usr/local/
     515
     516{{{
    452517        cd ..
    453518        make clean
     
    455520        make
    456521        make install
     522}}}
    457523
    458524Changing the src.pro install doesn’t get the application, copy manually
    459525
     526{{{
    460527        cp ossimplanet ${INSTALL_HERE}/bin
     528}}}
    461529
    462530Line 184 the -L for LOCAL_ROOT was not in parenthesis and not being picked up.  Same with the include line
     
    464532added -L$$(INSTALL_PREFIX)/lib in LIBS += lines
    465533
    466 
    467 
    468 
    469 These are some notes that I had on building the NTM plugin 
    470 
    471 Compile and install the classified plugin (unix instructions)
    472 
    473 You will find the source for the classified plugin in both the talmage and mlucas accounts.  Basically, set the environmental variables, copy it into the ossim_plugins source directory.
    474 
    475 As a user (ex: mlucas), not root
    476           DEV_HOME=<your source tree>
    477         cd $(DEV_HOME)/ossim/ossim_ntm_plugin
    478         vi make.opt   to modify the following values
    479 
    480         DEV_HOME=<your source tree>
    481         OSSIM_HOME=$(DEV_HOME)/ossim/build/ossim
    482         OP_DIRECTORY=$(DEV_HOME)/ossim/ossim_ntm_plugin
    483         LD_LIBRARYPATH=${INSTALL_HERE}/lib
    484 
    485 Note:  Make sure that these directories jive with the actual locations in the workspace.  you will receive errors from the make command if they are incorrect.
    486 
    487         make
    488        
    489         make install
    490 
    491 
    492 Set up ossim_preferences and local variables, copy the plugin to the ossim plugins directory to have it automatically picked up
    493 
    494 Verification, you can run imagelinker and verify that the plugin is loaded.   also, 
    495 
    496 Added with the 1.7.10 release there is an ossim_plugins command utility that will list the loaded plugins
    497 
    498 
    499534to 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.
    500535
    501536OMS - OSSIM Mapping Services
    502537
     538{{{
    503539oz
    504540cd ../oms/com
     
    507543cd ../joms
    508544ant dist
     545}}}
    509546
    510547needed to update ant to 1.7
     
    518555make sure that
    519556
     557{{{
    520558export OSSIM_PREFS_FILE=~/ossim_preferences
     559}}}
    521560
    522561is set in your bashrc or ossimbashrc file.