How to install GIMP16 on SGI

Steve MacPherson

  GENERAL

      Build and compile as self, not as root. Switch to root for make install.
      Seems obvious, easy to forget.
      Make sure to get gcc and gmake installed first!
              http://freeware.sgi.com/index-by-alpha.html

  LIBRARIES.

      Make sure that the libs required by the application are the right rev. for the src.
      Check:    freshmeat.net, slashdot.org for source.
      Check:    Also, use search engines (ie; altavista)

  ENVIRONMENT.

      Make sure that all the proper libs are getting called in the right order.
      setenv PATH /dist/gimp16/gtk/bin:${PATH}
      setenv LD_LIBRARY_PATH /dist/gimp16/gtk/lib:${LD_LIBRARY_PATH}
      setenv LD_LIBRARYN32_PATH \
          /dist/gimp16/gtk/lib:${LD_LIBRARYN32_PATH}
      setenv PATH /usr/freeware/bin/:${PATH}

  CONFIGURE

      configure --prefix=/dist/gimp16/gtk
          Above sets Make to place files in ... gtk directory
          W/ Gimp16 there were multiple libs and this keeps them organized
      rm config.cache
          If changes to configure required, cleans up previous. Do this before
          rerunning the preceding configure.

  MAKE

      gmake    as normal user
      gmake install    as root

  RUNNING APP

      Will probably have problems w/ libs if compiling multiples  libs together
      (or with lib search order).  See GIMP16 example below.
      A wrapper will solve all this (again, see example below)
     
  GIMP EXAMPLE:

      Located source and downloaded to blueberry:/dist/gimp16
      /dist/src/gimp16 is where all the various unzipped, untarred source files reside.
      /dist/gimp16/gtk is where all the various libs are installed, later we pull over those
          that are needed by the app (turns out to be all of them! Doh!)
      /usr/local/gimp16 is the final resting home of all things required by gimp16.
          This becomes a symlink to <nfsserver>:/apps/gimp16 where the single dist
          resides.
          (ie; /usr/local/gimp16/ -> /apps/gimp16)

      mkdir /dist/src/gimp16
      cd /dist/src/gimp16
      cp gimp-HOLLYWOOD-981202.tar gimp-data-HOLLYWOOD-981202.tar .

      (cp libs below to /dist/src/gimp16)
      LIBRARIES:
      foreach i (autoconf-2.13.tar.gz  automake-1.2.tar.gz  libtool-1.0.tar.gz
      gtk+-1.0.4.tar.gz)
              echo "Unpacking and untaring $i"
              /usr/sbin/gzip -dc $i |tar xvf -
      end

      mkdir -p /dist/gimp16/gtk
      setenv PATH /usr/freeware/bin/:${PATH}
          To make sure that I am picking up the GNU stuff

      cd automake-1.2
      configure --prefix=/dist/gimp16/gtk
          Set up the Makefile to put results into .../gtk directory
      gmake
      gmake install
          Root permissions not required as directory is in my own tree

      REPEAT ABOVE FOR OTHER LIBS!
      Did in order: automake, autoconf, libtool then gtk.
      setenv LD_LIBRARYN32_PATH /dist/gimp16/gtk/lib:${LD_LIBRARYN32_PATH}
      setenv LD_LIBRARY_PATH /dist/gimp16/gtk/lib:${LD_LIBRARY_PATH}
      setenv PATH /dist/gimp16/gtk/bin:${PATH}
 
  GIMP16:
      foreach i (gimp-HOLLYWOOD-981202.tar gimp-data-HOLLYWOOD-981202.tar)
              echo "Unpacking and untaring $i"
              tar xvf $i
      end

      IMPORTANT NOTE:     configure --prefix=/usr/local/gimp16
      When configuring the actual gimp, set the prefix to reflect it's final install location.
      aclocal
      Sets up M4 macros for automake.
      automake -i
      autoconf
      configure --prefix=/usr/local/gimp16 --enable-gimpdir=~/.hollywood
      The --enable-gimpdir sets the env directory to $HOME/.hollywood
      gmake

      AND NOW I IS A SCREAMING MOFO!  After the compile:

      su
      gmake install

      Now, typically there will be some stuff in the gtk libs that is not making it's way
      over to the recently populated /usr/local/gimp16/lib directory.  An iterative process of fire
      off the app, wait for the complaint and locate, copy the missing lib.

      setenv LD_LIBRARY_PATH /usr/local/gimp16/lib:${LD_LIBRARY_PATH}
      setenv LD_LIBRARYN32_PATH /usr/local/gimp16/lib:${LD_LIBRARYN32_PATH}

      /usr/local/gimp16/bin/gimp
      287746:./gimp: rld: Warning: Version Search Suppressed in ./gimp Because Object
      libgtk.so in liblist has non-sgi interface version (1.0)
      287746:./gimp: rld: Fatal Error: Cannot Successfully map soname 'libgtk.so' under any
      of the filenames /usr/aw/maya/lib/libgtk.so:/usr/aw/ ... etc ...
      cp /dist/gimp16/gtk/libgtk.* /usr/local/gimp16/lib

      And on and on until it stops complaining!

      Place all app specific details in wrapper:
      cat /usr/export/bin/gimp16

            #!/bin/csh -f

            #       gimp16

            if ( -x /usr/local/gimp16/bin/gimp ) then

                    if ( $?LD_LIBRARYN32_PATH ) then
                            setenv LD_LIBRARYN32_PATH
            /usr/local/gimp16/lib:${LD_LIBRARY_PATH}
                    else
                            setenv LD_LIBRARYN32_PATH /usr/local/gimp16/lib
                    endif
           
                    if ( $?MANPATH ) then
                            setenv MANPATH  /usr/local/gimp16/man:${MANPATH}
                    else
                            setenv MANPATH  /usr/local/gimp16/man
                    endif

                    /usr/local/gimp16/bin/gimp $argv
            else
                xconfirm -c -t "Buhuu... Can't find Gimp16..." -icon warning
            >&/dev/null
            endif