Changes between Initial Version and Version 1 of unixinstallnotes


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

--

Legend:

Unmodified
Added
Removed
Modified
  • unixinstallnotes

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