Changes between Version 1 and Version 2 of Solaris10Build


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

--

Legend:

Unmodified
Added
Removed
Modified
  • Solaris10Build

    v1 v2  
    1 Compiling 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
     1Compiling OSSIM 1.7.9 on a Solaris 10 64 bit machine
     2
     3 Date written 15 March 2010
     4 Aaron Light
    65
    76Installing the Source Code:
    87
     8This guide assumes that you are running as root for the duration of the install.
     9
     10* Make sure you have these files in ~/ :
     11
     12.bashrc (if this file already exists, make sure the following is appended)
     13{{{
     14        source .profile
     15        source ossimbashrc
     16}}}
     17
     18.profile (if this file already exists, make sure the following is appended)
     19{{{
     20        TERM=gnome
     21        export TERM
     22
     23        CC=gcc
     24        export CC
     25}}}
     26
     27ossimbashrc
     28{{{
     29# ossimbashrc, contains all of the environment variables for
     30# building ossim and its associated implementations
     31# be sure to source this file for your build
     32# in .bashrc   add a source statement to include the ossimbashrc file
     33# from where it resides.  This assumes it has been placed in your home
     34# directory.
     35#
     36# source ossimbashrc
     37#
     38#
     39
     40
     41# Where is the Development source code directory
     42export DEVHOME=${HOME}/Development
     43
     44# Where is the install target
     45# for local install
     46# export DEFAULT_INSTALL=${HOME}/usr_local
     47# export INSTALL_HERE=${HOME}/usr_local/ossim
     48
     49# To be used for LD Project installs
     50export AFS_INSTALL=/afs/ld/software/gis/ossim
     51# for system install
     52export DEFAULT_INSTALL=/usr/local
     53export INSTALL_HERE=/usr/local
     54
     55# Where is the OSSIM source code top directory
     56export OSSIM_DEV_HOME=${DEVHOME}/ossimsource
     57export OSSIM_HOME=${OSSIM_DEV_HOME}/ossim
     58export GDAL_HOME=${OSSIM_DEV_HOME}/ossim_dependencies/gdal/gdal-1.5.1
     59export LIBTIFF_HOME=${INSTALL_HERE}/include
     60export OP_DIRECTORY=${OSSIM_DEV_HOME}/ossim_plugins
     61
     62# Variables for Groovy and Grails
     63export GRAILS_HOME={DEVHOME}/ossimsource/ossim_dependencies/grails-1.0.3
     64export GROOVY_HOME={DEVHOME}/ossimsource/ossim_dependencies/groovy-1.5.6
     65
     66export OSSIM_PREFERENCES_FILE=~/ossim_preferences
     67
     68# OpenSceneGraph Variables
     69export OSGHOME=${DEVHOME}/ossimsource/ossim_dependencies/OpenSceneGraph/src
     70OSGFP=/usr/local/share/OpenSceneGraph-Data
     71export OSG_FILE_PATH=${OSGF9}:${OSGFP}/Images:${OSGFP}/shaders:${OSGFP}/SolarSystem:${OSGFP}/fonts:${OSGFP}/Catch:${OSGFP}/Cubemap_axis:${OSGFP}Cubemap_snow:${OSGFP}/ExampleThumnails:${OSGFP}/Configuration
     72export OSGDATA=${OSG_FILE_PATH}
     73
     74# Trolltech Qt variables
     75export QTDIR=${DEFAULT_INSTALL}/Trolltech/Qt-4.4.0/
     76
     77# other OSSIM related defs
     78export OSSIM_QT_HOME=${OSSIM_DEV_HOME}/ossim_qt4
     79export OSSIMPREDATOR_INC_DIR=${OSSIM_DEV_HOME}/ossimPredator/include
     80export OSSIMPREDATOR_LIB_DIR=${OSSIM_DEV_HOME}/ossimPredator/lib
     81export LIBWMS_INC_DIR=${INSTALL_HERE}/include
     82export LIBWMS_LIB_DIR=${INSTALL_HERE}/lib
     83
     84# export OPENTHREADS_INC_DIR=${OSGHOME}/src/OpenThreads/include/OpenThreads
     85
     86# PATHS to find things
     87export PATH=${INSTALL_HERE}/bin:$QTDIR/bin:$PATH
     88export LD_LIBRARY_PATH=${INSTALL_HERE}/lib:${INSTALL_HERE}/lib64:$QTDIR/lib:${OSG_LIB_DIR}:${DEFAULT_INSTALL}/lib:$LD_LIBRARY_PATH
     89
     90
     91# Handy aliases
     92alias dev='cd ${DEVHOME}; echo "Development Directory";ls'
     93alias oz='cd ${OSSIM_HOME}; echo "OSSIM Home";ls'
     94alias ozd='cd ${OSSIM_DEV_HOME}/ossim_dependencies ; echo "OSSIM Dependencies"; ls'
     95alias osg='cd ${OSGHOME}; echo "OpenSceneGraph"; ls'
     96alias oqt='cd ${OSSIM_QT_HOME} ; echo "OSSIM QT4 Home"; ls'
     97alias opt='cd ${OSSIM_DEV_HOME}/ossimPlanet ; echo "ossimPlanet source"; ls'
     98alias ih='cd ${INSTALL_HERE} ; "Install Directory"; ls'
     99}}}
     100
     101* Make sure root is using bash.
     102I did this by editing /etc/passwd and changing the shell command to: /bin/bash
     103You will also need to run these commands to fix shell inconsistencies:
     104{{{
     105        mv /usr/bin/sh /usr/bin/sh~
     106        ln -s /usr/bin/bash /usr/bin/sh
     107}}}
     108
     109* Edit /etc/profile and verify the path is correct at the bottom of the file. Mine was:
     110{{{
     111        PATH="$PATH:$HOME/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/sfw/bin:/opt/sfw/bin:/root/bin:/usr/local/sbin:/bin:/opt/csw/bin:/opt/csw/sbin:/opt/csw/gcc3/bin:/usr/sfw/sbin:/opt/csw/mysql5/bin:/usr/ccs/bin"
     112
     113        export PATH
     114}}}
     115
     116Log out and log back in to reflect changes to the paths.
     117
     118Here are the packages you will need, downloaded from http://www.sunfreeware.com/indexintel10.html
     119Version numbers may vary.
     120{{{
     121        pkgadd -d autoconf-2.65-sol10-x86-local
     122        pkgadd -d automake-1.11.1-sol10-x86-local
     123        pkgadd -d binutils-2.20.1-sol10-x86-local
     124        pkgadd -d cmake-2.4.8-sol10-x86-local
     125        pkgadd -d coreutils-8.2-sol10-x86-local
     126        pkgadd -d curl-7.20.0-sol10-x86-local
     127        pkgadd -d db-4.2.52.NC-sol10-intel-local
     128        pkgadd -d expat-2.0.1-sol10-x86-local
     129        pkgadd -d gcc-3.4.6-sol10-x86-local
     130        pkgadd -d gdbm-1.8.3-sol10-intel-local
     131        pkgadd -d gmp-4.2.1-sol10-x86-local
     132        pkgadd -d gtk+-2.12.0-sol10-x86-local
     133        pkgadd -d libiconv-1.13.1-sol10-x86-local
     134        pkgadd -d libidn-1.18-sol10-x86-local
     135        pkgadd -d libintl-3.4.0-sol10-x86-local
     136        pkgadd -d libsigsegv-2.6-sol10-x86-local
     137        pkgadd -d libssh2-1.2.4-sol10-x86-local
     138        pkgadd -d libtool-2.2.6b-sol10-x86-local
     139        pkgadd -d libxml2-2.6.31-sol10-x86-local
     140        pkgadd -d m4-1.4.14-sol10-x86-local
     141        pkgadd -d make-3.81-sol10-x86-local
     142        pkgadd -d mpfr-2.4.0-sol10-x86-local
     143        pkgadd -d nano-2.2.1-sol10-x86-local
     144        pkgadd -d ncurses-5.6-sol10-x86-local
     145        pkgadd -d neon-0.25.5-sol10-x86-local
     146        pkgadd -d openssl-0.9.8l-sol10-x86-local
     147        pkgadd -d opera-10.10.gcc4-static-qt3.pkg
     148        pkgadd -d sed-4.2.1-sol10-x86-local
     149        pkgadd -d subversion-1.4.3-sol10-x86-local
     150        pkgadd -d swig-1.3.36-sol10-x86-local
     151        pkgadd -d zlib-1.2.3-sol10-x86-local
     152}}}
     153
     154Instructions for building the OSSIM distribution on Solaris 10 systems.  This tutorial tracks an install of the OSSIM distribution from July 2008 on a freshly installed version of Solaris 10.  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.
     155
     156The 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.
     157
    9158Assuming a default installation from source in your home directory:
    10 
    11159{{{
    12160        cd
     
    17165}}}
    18166
    19 for 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 
    31 This approach will allow you to install with out super user privs into /usr/local/ossim
    32 
    33 
    34167To check out the entire source code tree from svn, you must be connected to the internet and type:
    35168
    36169{{{
    37 svn co http://svn.osgeo.org/ossim/trunk .      (note the trailing dot)
    38 }}}
    39 
    40 Alternatively, 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 
    50 The 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 
    66 ossimbashrc
    67 
    68 Under the ossim_package_support directory is an ossimbashrc file. 
    69 These 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 
    77 Instructions 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 
    79 The 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 
    93 Now 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
     170        svn co http://svn.osgeo.org/ossim/tags/v1_7_9 .      (note the trailing dot)
    103171}}}
    104172
    105173Now we’ll check and use the ‘dev’ alias to change directories
    106174{{{
    107 
    108175        dev
    109 
    110176}}}
    111177
     
    114180Gathering the Dependency Source Code
    115181
    116 {{{
    117         dev
    118         mkdir ossim_dependencies_source
    119         ods                          cd ossim_dependencies_source
    120 }}}
    121 
    122 
    123 The following dependencies are need to build and can be downloaded into the source directory.  URLs are provided
     182The following dependencies are need to build and can be downloaded into the source directory.  URLs are provided.
    124183
    125184