Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: 32bit oracle 8.0.5 installer hangs on 64bit HPUX-11 (V2200)

Re: 32bit oracle 8.0.5 installer hangs on 64bit HPUX-11 (V2200)

From: Richard Lloyd <rkl_at_ural.csc.liv.ac.uk>
Date: Fri, 27 Nov 1998 22:13:26 GMT
Message-ID: <F33pqE.Enn@csc.liv.ac.uk>


In article <PCU62.1812$5n1.14065087_at_news.magma.ca>, "Babette Turner-Underwood" <babettet_at_you.cant.spam.me> writes: > I assume that a ".sl" is a "shared libarary".

Yes, I said that in my original posting. A .sl file is basically position-independent code that can be loaded and run anywhere in RAM. This allows the OS to set aside RAM just for shared libraries - they stay in memory as *one* copy per shared library, regardless of how many binaries are linked against them and run simultaneously. It also means the binary doesn't have to hold most routines - they are held in shared libraries instead.

> What are the advantages (other than
> size) and disadvantages of using them?

Shared libraries have the following advantages:

The disadvantages:

> I am certainly interested in seeing that ".a to .sl converter script".

Here it is - use it at your own risk ! People should let me know if they problems with it. Note it's only for 8.0.5 on 10.20 or 11.00 - don't run it on anything else...

Richard K. Lloyd,         E-mail: rkl_at_connect.org.uk
Connect,                     WWW: http://www.connect.org.uk/

Liverpool University,
Merseyside, England,
Great Britain.

# Tested with Oracle Enterprise Edition 8.0.5 and HP-UX 10.20/11.00
# (32-bits versions, but 64-bits versions should work as well).
# Run this as the oracle user after a normal Oracle install
# (it's assumed you have the env. var. ORACLE_HOME defined).
# Then re-run Oracle installer, re-install all products, but
# choose "Relink executables - yes" when asked.

# Special note for 11.00 users:
# If you are doing a server-side install, then after you've
# run this script, but before you've re-run the Oracle installer,
# you can edit the following file to also dramatically reduce
# the size of the $ORACLE_HOME/bin/oracle binary:
# $ORACLE_HOME/rdbms/lib/ins_rdbms.mk
# Remove the "-Wl,-aarchive" text from the LDCCOM_ORACLE
# definition in that file. 10.20 users can't seem to do this
# because they get an "undefined symbol" during the relink.

# Note that this script is risky on several fronts:

# 1. It is totally unsupported by Oracle - by creating shared
# libraries and linking against them, you are producing
# "new" binaries that have never been tested by Oracle in
# that configuration before. Effectively, you might say this
# turns your "certified" release into an "uncertified" one,
# so if you are at all apprehensive about this, don't run it.

# 2. Do *not* do this on a production system that's already
# installed and happily running. Do it on a test system
# and check it out as much as you can - the author and Connect are
# *not* responsible for any problems you encounter - YOU RUN THIS SCRIPT AT
# YOUR OWN RISK. If you have problems, delete the .sl files
# that were created and relink all your products again.

# 3. The exact system used for testing was:
# Server: D370/2, HP-UX 11.00 (32-bits) with Extension Bundle,
# *No* installed ANSI C or aCC (note that
# aCC may cause "problems" when relinking - if it
# does, move it out of the way to aCC.old and try
# relinking again)
# Enterprise Edition 8.0.5 for HP-UX 11.00 (32-bits)
# Oracle Developer 1.6.1.0.0 for HP-UX 11.00 (32-bits)
# Client: C160, HP-UX 10.20 with various patches installed,
# ANSI C and aCC installed (latter moved out of way
# because quite old and caused a relink failure)
# Enterprise Edition 8.0.5 for HP-UX 10.20 (32-bits)
# Oracle Developer 1.6.1.0.0 for HP-UX 10.20 (32-bits)
# Deviations from this Server and Client setup may cause this
# script to fail !

# 4. You need to run it after every use of the Oracle installer that
# adds/patches a product (since that product may have additional .a's
# of course, that need converting). A classic example is installing
# the Oracle Developer CD-ROM after your Oracle Enterprise Edition CD-ROM.
# You would need four runs of the Oracle installer in total:
# OEE without relink, run script, [edit ins_rdbms.mk], OEE with relink,
# OD without relink, run script, OD with relink.
# You are advised to test your Oracle installation after each step, to
# make that there isn't a problem.

# 5. It is actually possible to strip all the installed binaries in
# $ORACLE_HOME/bin and we've done this successfully with no run-time
# problems on both our client and server machines. However, we haven't
# yet dared strip the new .sl files that are created (or, indeed, Oracle's
# own shipped .sl's came off the CD-ROMs) and hence we'd advise you not
# to do so. We may pluck up the courage to do this in the future :-)

set +u
progname=`basename $0`
oramake="$ORACLE_HOME/rdbms/lib/ins_rdbms.mk" arclink="-Wl,-aarchive"

error()
# Display error message and exit

{

   echo "$progname: $1 - aborted !" >&2 ; exit 1 }

do_805_11()
# Checks for HP-UX 11.00 and Oracle 8.0.5
# Checks $lib to see if it is to be excluded
# Returns a=0 if OK, a>0 if to be excluded
{

   case "$lib" in

   # Invalid loader fixup
   */libmmiw207.a|*/libmmoi207.a|*/libpeer.a)

      a=1 ;;
     

   # Duplicate symbols
   */libforms45.a|*/libob20.a|*/libpsa.a|*/libtk23c.a|*/libnmi.a)

      a=2 ;;

   # Not PIC code
   */libdbicx.a|*/libmmcm207.a|*/libmmmm207.a|*/libmmos207.a|*/libmmov207.a|*/libnn12.a|*/libpartner.a)

      a=3 ;;

   # Oracle Intelligent Agent binaries won't link with .sl versions of these    */libclient.a|*/libcommon.a)

      a=4 ;;

   # OK - no errors
   *) a=0 ;;    

   esac
}

do_805_10()
# Checks for HP-UX 10.20 and Oracle 8.0.5
# Checks $lib to see if it is to be excluded
# Returns a=0 if OK, a>0 if to be excluded
{

   case "$lib" in

   # Invalid loader fixup
   */libc3v6.a|*/libmmiw207.a|*/libmmoi207.a|*/libserver.a|*/libpeer.a|*/libknlopt.a)

      a=1 ;;
     

   # Duplicate symbols
   */libforms45.a|*/libob20.a|*/libpsa.a|*/libtk23c.a|*/libnmi.a)

      a=2 ;;

   # Not PIC code
   */libmmcm207.a|*/libmmmm207.a|*/libmmos207.a|*/libmmov207.a|*/libnn12.a|*/libpartner.a)

      a=3 ;;

   # Oracle Intelligent Agent binaries won't link with .sl versions of these    */libclient.a|*/libcommon.a)

      a=4 ;;

   # OK - no errors
   *) a=0 ;;    

   esac
}

conv_lib()
# Convert library from .a to .sl by extracting .o's with ar and
# creating the .sl with "ld -b"

{

   libdir=`dirname $lib`
   shl=$libdir/`basename $lib .a`.sl
   if [ -r $shl ]
   then

      if [ $lib -nt $shl ]
      then
         doit=1
      else
         doit=0
      fi
   else
      doit=1

   fi

   if [ $doit -eq 1 ]
   then

      tlib=$libdir/tmp_build$$
      mkdir -p $tlib
      cd $tlib
      ar x $lib
      rm -f $shl
      ld -b -o $shl *.o
      cd $libdir
      if [ -r $shl -a -s $shl ]
      then
         chmod a=rx $shl
         echo "Created $shl"
         # Need to touch back .sl in time to .a's time because
         # that's what the Oracle installer does when it unpacks .a's from
         # the CD-ROM. Without the touch, .a patches would still be older
         # than the .sl's that were created from the unpatched .a
         touch -r $lib $shl
         let numsl=$numsl+1
      else
         # Unsuccessful .sl creation, delete in case zero-length
         rm -f $shl
      fi
      rm -rf $tlib

   fi
}

check_version()
# Check that OS version and Oracle version are OK
{

   if [ "$ORACLE_HOME" = "" ]
   then

      error "ORACLE_HOME env. var. not set"    fi

   if [ -d $ORACLE_HOME ]
   then

      case "$ORACLE_HOME" in
      */8.0.5) let a=1 ;;
      *) error "Oracle version not 8.0.5" ;;
      esac
      case "`uname -r`" in
      B.10.20) hpux11=0 ;;
      B.11.00) hpux11=1 ;;
      *) error "Not HP-UX 10.20 or 11.00" ;;
     esac
  else
     error "Can't find Oracle home dir"
  fi
}

conv_libs()
# Convert most .a's under $ORACLE_HOME to .sl's
{

   find $ORACLE_HOME -name '*.a' | sort |    (

      numsl=0
      while read lib
      do
         if [ $hpux11 -eq 0 ]
         then
            do_805_10
         else
            do_805_11
         fi
         if [ $a -eq 0 ]
         then
            conv_lib
         fi
      done

      orabin=0
      if [ $hpux11 -eq 1  -a -r $oramake ]
      then
         if [ "`grep -- $arclink $oramake`" != "" ]
         then
            orabin=1
         fi
      fi

      if [ $numsl -eq 0 -a $orabin -eq 0 ]
      then
         echo "All convertible .a files have their .sl equivalents."
         echo "You are therefore up-to-date and do not need to re-link any products."
      else
         if [ $numsl -gt 0 ]
         then
            echo "Number of .sl files created: $numsl"
         fi
         echo "You now need to re-run the Oracle installer and re-link executables"
         echo "for your installed products."
         if [ $orabin -eq 1 ]
         then
            echo "You may wish to remove the \"$arclink\" statement from"
            echo "the LDCCOM_ORACLE line in this file before re-running the installer:"
            echo "$oramake"
         fi
      fi

   )
}

check_version
conv_libs Received on Fri Nov 27 1998 - 16:13:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US