Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: LD_PRELOAD problem

RE: LD_PRELOAD problem

From: Jesse, Rich <>
Date: Wed, 30 Aug 2006 16:04:02 -0500
Message-ID: <>

Try doing:  

    ldd /sbl/  

This will tell you what libraries have been dynamically linked to that lib. My guess is that it's linked against a non-existant lib, or one that does not match the bit-ness of your Oracle install.  

Not being an expert on this stuff, I would say "Yes!", you need to recompile the lib against the new (and correct!) 9i libs. Compare the "ldd" output run against this new lib and the old lib and note any differences.  



From: LS Cheng [] Sent: Wednesday, August 30, 2006 3:45 PM To: Jesse, Rich
Cc: oracle-l
Subject: Re: LD_PRELOAD problem

Hi Rich  

The database is 64 bit HP-UX 11.11.  

The batch process basically does this  


export LD_PRELOAD=/sbl/  

sqlplus /nolog << ! > /dev/null

execute some application specific program

This worked in 8i but in 9i when sqlplus is executed we get the magic number error. I understand that in 8i 32bit library was located in $ORACLE_HOME/lib and 64bit in $ORACLE_HOME/lib64, in 9i this has been reversed, $ORACLE_HOME/lib32 32 bit and 64 bit $ORACLE_HOME/lib. This is the only change I can think about with 32 bit <-> 64 bit issue.  

However when I unset LD_PRELOAD sqlplus works but of course the application specific program fails.  

Do you think if this can be corrected byI recompiling ?  


On 8/30/06, Jesse, Rich <> wrote:

        Looks like you have a 32bit<->64bit issue. Your Oracle DB install is using one and you are attempting to use the other for your libraries. Make sure both are 32bit OR 64bit, but don't mix them.          

        HTH! Enjoy!          


        From: [mailto: <> ] On Behalf Of LS Cheng

	Sent: Wednesday, August 30, 2006 1:01 PM
	To: oracle-l
	Subject: LD_PRELOAD problem
	I was wondering what does LD_PRELOAD do in HP-UX? I understand
more or less that it loads some specific shared library with <> before searching SHLIB_PATH, am I correct?         

        The problem I am having is some batch processes which worked in Oracle 8i after migrated to 9i they are giving this error:         

        /usr/lib/pa20_64/ <> is not a valid load module: Bad magic number         

        These batch processes export LD_PRELOAD variable with some customized library, after exporting the variable all executables such as sqlplus, exp/imp gives the error when are executed.         

        SHLIB_PATH is already set to $ORACLE_HOME/lib32         


-- Received on Wed Aug 30 2006 - 16:04:02 CDT

Original text of this message