Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

Building 32bit shared library on 64bit HP-UX 11.0

Amod Kumbhar
Occasional Visitor

Building 32bit shared library on 64bit HP-UX 11.0

On HP-UX 11.0, we are trying to call external c routine from Oracle PL/SQL
(Oracle 9i - Oracle9i Enterprise Edition Release - 64bit)

For this we are trying to make 32 bit shared library (HPUX 11.0 - 64 bit)
using file supplied by oracle. (Reason for going for 32 bit
is that our rest of the application is 32 bit although HP-UX machine is 64 bit)

Should be use any specific switches for building 32 bit shared libraries on
64-bit machine. Request you to advice on this.

Below mentioned are steps which we followed.

make -f extproc_with_context OBJS="exception.o elimspace.o get_symbol.o ipc.o
secmisc2.o getmbxkey.o secmisc.o secmisc3.o"


ld -G /data/app/oracle/product/Oracle9i/lib/ -b
-L/data/app/oracle/product/Oracle9i/rdbms/lib/ -o exception.o
elimspace.o get_symbol.o ipc.o secmisc2.o getmbxkey.o secmisc.o secmisc3.o
/data/app/oracle/product/Oracle9i/lib/libpls9.a -lclntsh `cat
/data/app/oracle/product/Oracle9i/lib/sysliblist` -lm
ld: Mismatched ABI (not an ELF file) for exception.o
Fatal error.
*** Error exit code 1


Thanks in advance
Vinay Godbole

Cheryl Griffin
Honored Contributor

Re: Building 32bit shared library on 64bit HP-UX 11.0

You can use the file command to determine the bit of the library:
# file /data/app/oracle/product/Oracle9i/lib/libpls9.a

A 32 bit library might say:
archive file -PA-RISC1.1 relocatable library

A 64 bit library might say:
ELF-64 shared object file - PA-RISC 2.0 (LP64)

If trying to build the program for 32 bit, make sure the Oracle libraries involved are all 32 bit.

"Downtime is a Crime."
Amod Kumbhar
Occasional Visitor

Re: Building 32bit shared library on 64bit HP-UX 11.0

Thanks for your reply. Oracle9i product on HP-UX is 64-bit. However Oracle allows you to build 32-bit as well as 64-bit applications as they have provided both set of libraries.

Our requirement is that our HP-UX is 64-bit, Oracle9i is 64-bit but our application and dependant programs are 32-bit. Hence we want to build 32bit shared library. We have already modified paths to include Oracle9i's 32bit libraries.

For your reference I am attaching values of LD_LIBRARY_PATH,SHLIB_PATH and PATH environmental variables

hpawls:oracle:/home/oracle/templib/userexit32> echo $LD_LIBRARY_PATH

hpawls:oracle:/home/oracle/templib/userexit32> echo $PATH

hpawls:oracle:/home/oracle/templib/userexit32> echo $SHLIB_PATH

Please let me know your comments on this.

Olav Baadsvik
Esteemed Contributor

Re: Building 32bit shared library on 64bit HP-UX 11.0

Hi,If you are still getting the error message:
ld: Mismatched ABI ...
then Cheryl's reply still applies.

The environment-variables LD_LIBRARY_PATH, PATH and
SHLIB_PATH may be important when you run a program, but not
when you compile/link.

The cause of the error-message is that you are trying to link
a mix of 64-bit and 32-bit objects.

You have some -L/data/app... in your ld command.
Is this the correct path to where the 32-bit versions of the
oracle libs are found?