Operating System - HP-UX
1752780 Members
6265 Online
108789 Solutions
New Discussion юеВ

Re: Possibly a 64-bit PA archive library (Mismatched ABI) - Perl DBD:Oracle

 
David Cramblett
Occasional Advisor

Possibly a 64-bit PA archive library (Mismatched ABI) - Perl DBD:Oracle

Hello,

I have found many posts on this topic but I can not find any solutions. I have perl 5.8.0 w/DBI-1.37 and am trying to install Oracle DBD. During the make stage I am getting the following error:

LD_RUN_PATH="/var/opt/oracle/product/8.1.7/lib:/var/opt/oracle/product/8.1.7/rdbms/lib" /usr/bin/ld -b -L/usr/local/pa20_64/lib -L/lib/pa20_64 Oracle.o dbdimp.o oci7.o oci8.o -L/var/opt/oracle/product/8.1.7/lib/ -L/var/opt/oracle/product/8.1.7/rdbms/lib/ /var/opt/oracle/product/8.1.7/rdbms/lib/kpudfo.o /var/opt/oracle/product/8.1.7/lib/nautab.o /var/opt/oracle/product/8.1.7/lib/naeet.o /var/opt/oracle/product/8.1.7/lib/naect.o /var/opt/oracle/product/8.1.7/lib/naedhs.o -lclntsh /var/opt/oracle/product/8.1.7/rdbms/lib/kpuadef.o -lnbeq8 -lnhost8 -lnus8 -lnldap8 -lldapclnt8 -lnsslb8 -ln8 -lncrypt8 -ln8 -lncrypt8 -lnoname8 -lntcp8 -lntcps8 -lnsslb8 -lnent8 -lntcp8 -lntns8 -lnsgr8 -lnzjs8 -ln8 -lnl8 -lnro8 -lnbeq8 -lnhost8 -lnus8 -lnldap8 -lldapclnt8 -lnsslb8 -ln8 -lncrypt8 -ln8 -lncrypt8 -lnoname8 -lntcp8 -lntcps8 -lnsslb8 -lnent8 -lntcp8 -lntns8 -lnsgr8 -lnzjs8 -ln8 -lnl8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -lwtc8 -lmm -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 -lnbeq8 -lnhost8 -lnus8 -lnldap8 -lldapclnt8 -lnsslb8 -ln8 -lncrypt8 -ln8 -lncrypt8 -lnoname8 -lntcp8 -lntcps8 -lnsslb8 -lnent8 -lntcp8 -lntns8 -lnsgr8 -lnzjs8 -ln8 -lnl8 -lnro8 -lnbeq8 -lnhost8 -lnus8 -lnldap8 -lldapclnt8 -lnsslb8 -ln8 -lncrypt8 -ln8
-lncrypt8 -lnoname8 -lntcp8 -lntcps8 -lnsslb8 -lnent8 -lntcp8 -lntns8 -lnsgr8 -lnzjs8 -ln8 -lnl8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -ltrace8 -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 -l:libcl.a -l:librt.sl -lpthread -l:libnss_dns.1 -l:libdld.sl -lm -lpls8 -lsql8 -o blib/arch/auto/DBD/Oracle/Oracle.sl
/usr/bin/ld: /lib/pa20_64/libcl.a: Not a valid library (invalid magic number). Possibly a 64-bit PA archive library (Mismatched ABI).
*** Error exit code 1

Any help would be appreciated.

David
9 REPLIES 9
Joerg Hinz
Occasional Advisor

Re: Possibly a 64-bit PA archive library (Mismatched ABI) - Perl DBD:Oracle

Hi David,

"/usr/bin/ld: /lib/pa20_64/librt.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link." means ld tries to mix up 32- and 64-bit libraries.

Since /lib/pa20_64/librt.sl is a 64-bit lib you might have an old oracle installation using 32-bit files.

Just check it with

$ file $ORACLE_HOME/bin/oracle
/DEV01/app/oraDEV/product/DEV/bin/oracle: PA-RISC1.1 shared executable dynamically linked -not stripped

PA-RISC1.1 is 32bit.

64bit files look like

$ file /opt/perl64/bin/perl
/opt/perl64/bin/perl: ELF-64 executable object file - PA-RISC 2.0 (LP64)

So what you need to do in order to get DBD::Oracle running:

1) install a 32bit Perl 5.8
2) install a 32bit gcc

If you own the HP-ANSI-C-Compiler (aCC+) you can try yourself.

If you don't, get a 32bit perl and gcc-3.2 from http://www.cmve.net/~merijn/.

Untar the http://www.cmve.net/~merijn/perl-5.8.0-gcc-3.2-11.00-pa20-ora.tbz into /opt/perl and link /opt/perl/bin/perl5.8.0 to /usr/bin/perl.

Untar the http://www.cmve.net/~merijn/gcc-3.2-32-11.00-hppa2.0.tbz into /usr/local and link /usr/local/pa20_32/bin/gcc to /usr/local/bin/gcc.

Then install the DBI-1.37.tar.gz. No problems should appear.

Then try to install DBD-Oracle-1.14.tar.gz (use perl Makefile.PL -l) in a shell with set up oracle environment.

If you encounter the error
Undefined subroutine &MY::hpux_libdir called at Makefile.PL line 1338.

Just go into Makefile.PL and fetch the subroutines hpux_libdir and hpux_lib64 and copy them above the "sub const_loadlibs" (~ at line 1327).

If "make" then stops with

oci8.c: In function `init_lob_refetch':
oci8.c:1643: `OCI_ATTR_OBJ_NAME' undeclared (first use in this function)
oci8.c:1643: (Each undeclared identifier is reported only once
oci8.c:1643: for each function it appears in.)
*** Error exit code 1

Go into oci8.c and search for "/* BEGIN NEW */".

Insert "#ifdef OCI_ATTR_OBJ_NAME" above "OCIDescribeAny_log_stat(imp_sth..." and "#endif" above the "/* END NEW */".

The call make again.

It should run through without problems.

"make test" might show another problem:
/usr/lib/dld.sl: Unresolved symbol: ociepgoe (code) from /usr/src/compile/DBI/DBD-Oracle-1.14/blib/arch/auto/DBD/Oracle/Oracle.sl
Failed to load Oracle extension and/or shared libraries:
install_driver(Oracle) failed: Can't load '/usr/src/compile/DBI/DBD-Oracle-1.14/blib/arch/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: Unresolved external at /opt/perl/lib/5.8.0/PA-RISC2.0/DynaLoader.pm line 229. at (eval 1) line 3

On my system (Oracle 8.0.5) I found out that ociepgoe belongs to $ORACLE_HOME/lib/libextp.a (see mn).

So you need to tell the linker to link that lib: Edit Makefile and look for OTHERLDFLAGS.

Append the full path to libextp.a, for example
OTHERLDFLAGS=/DEV01/app/oraDEV/product/DEV/lib/libextp.a

The "make test" should work and you can finally install DBD::Oracle with make install!

That's it ;)

Joerg

-- quote?
David Cramblett
Occasional Advisor

Re: Possibly a 64-bit PA archive library (Mismatched ABI) - Perl DBD:Oracle

Thanks for your help.

I have both 64bit Oracle install 8.1.7 and 64bit perl install.

# file $ORACLE_HOME/bin/oracle
bin/oracle: ELF-64 executable object file - PA-RISC 2.0 (LP64)

# perl -v

This is perl, v5.8.0 built for PA-RISC2.0-LP64


Any other idea why this may be happening?

David
Joerg Hinz
Occasional Advisor

Re: Possibly a 64-bit PA archive library (Mismatched ABI) - Perl DBD:Oracle

Hi David,

sorry for the late answer, but the email notification somehow does not work for me...

If Perl and Oracle is 64bit you have *somewhere* 32bit libs in the system...

Do you still have the problem?

Joerg
-- quote?
David Cramblett
Occasional Advisor

Re: Possibly a 64-bit PA archive library (Mismatched ABI) - Perl DBD:Oracle


Thanks,

Yes I still have this problem. In the mean time I have installed Oracle client and Perl DBI/Oracle DBD on my linux workstation.

The oracle directory has to lib directories. A lib and a lib64. I have tried linking to the lib64 by changing the DBD make file and by using the environment variables, still no luck. Do you think it may be trying to use some 32 bit libraries from the oracle install?

# file lib64/libclntsh.sl
lib64/libclntsh.sl: ELF-64 shared object file - PA-RISC 2.0 (LP64)

# file lib/libclntsh.sl
lib/libclntsh.sl: PA-RISC1.1 shared library -not stripped

David
Hank Eggers
Frequent Advisor

Re: Possibly a 64-bit PA archive library (Mismatched ABI) - Perl DBD:Oracle

David,

Did you ever figure this out? I am running into the same mess. Thanks!
ranganath ramachandra
Esteemed Contributor

Re: Possibly a 64-bit PA archive library (Mismatched ABI) - Perl DBD:Oracle

if the makefile uses hp's cc/aCC you can try setting CCOPTS="+DD64". if its gcc, use the 64-bit gcc.
 
--
ranga
[i work for hpe]

Accept or Kudo

David Cramblett
Occasional Advisor

Re: Possibly a 64-bit PA archive library (Mismatched ABI) - Perl DBD:Oracle


Hey folks,

I have not got this working yet, and I do have a 64bit GCC version. Merijn's site, linked below, now has HPUX 11.11 64bit versions of GCC w/binutils ready to go. He say's he will have perl 5.8 ready soon. I have a work-around using oracle enabled perl on my linux workstation to get to the db on my HPUX box, so I am just waiting for Merijn to finish his builds and try them. Many people have given sugestions, but most are using 32bit 11.0 HPUX, and there seems to be some significant difference between it and 11.11 64bit that is causing the trouble.

David

http://www.cmve.net/~merijn/

Jakes Louw
Trusted Contributor

Re: Possibly a 64-bit PA archive library (Mismatched ABI) - Perl DBD:Oracle

I assume that $SHLIB_PATH is pointing to the 64-bit Oracle library?
Trying is the first step to failure - Homer Simpson
ranganath ramachandra
Esteemed Contributor

Re: Possibly a 64-bit PA archive library (Mismatched ABI) - Perl DBD:Oracle

the problem is that the wrong (32-bit) compiler sends the wrong object (*.o) files in the link line, which makes the linker think that this is a 32-bit build, though all the libraries and library paths point to 64-bit ones. that is why the linker rejects the subsequent "correct" libraries.

i think if you run a "file Oracle.o", it will tell you that the file is a 32-bit (PA-RISC 1.1/2.o) relocatable object and not an ELF file (which it should be, if it were to be in a 64-bit link).

so, 64-bit compilation is the solution.
 
--
ranga
[i work for hpe]

Accept or Kudo