Operating System - Linux
1748205 Members
4546 Online
108759 Solutions
New Discussion юеВ

Having trouble with archive libraries in 64-bit 11.11 HP-UX

 
SOLVED
Go to solution
MTSU_SAN
Regular Advisor

Having trouble with archive libraries in 64-bit 11.11 HP-UX

I'm trying to compile openldap in 64-bit mode on HPUX 11.11, and whenever I try to link in an archive library, I get an ABI mismatch, or a Cannot load symbol table--but I've checked the object files and they are definitely ELF 64-bit,and nm lists the symbol tables just fine. Has anyone else had trouble with this, and how did you change the linking?
Here is a sample command and output...
/bin/sh ../..//libtool --mode=link cc -static +DD64 -L/usr/local/lib -
L/usr/local/BerkeleyDB.4.3/lib -o dtest dtest.o liblber.la ../../libraries/lib
lutil/liblutil.a
cc +DD64 -o dtest dtest.o -L/usr/local/lib -L/usr/local/BerkeleyDB.4.3/lib ./.l
ibs/liblber.a ../../libraries/liblutil/liblutil.a
ld: (Warning) Cannot load library symbol table in ./.libs/liblber.a, it might be
missing or corrupted. Skipping library ./.libs/liblber.a.
ld: (Warning) Cannot load library symbol table in ../../libraries/liblutil/liblu
til.a, it might be missing or corrupted. Skipping library ../../libraries/liblut
il/liblutil.a.

Thanks for any help!
c*
22 REPLIES 22
Arunvijai_4
Honored Contributor

Re: Having trouble with archive libraries in 64-bit 11.11 HP-UX

Hello,

Just to make sure, have you installed all the dependancies like BerkeleyDB, etc.. in 64 bit ?

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
MTSU_SAN
Regular Advisor

Re: Having trouble with archive libraries in 64-bit 11.11 HP-UX

Oh yes, and had trouble with each and every dependency! Even the binaries from the software porting sites that say they are 2.0 Risc are all 32-bit, and so I've had to compile everything from scratch.
Thanks for asking.
c*
Dennis Handly
Acclaimed Contributor

Re: Having trouble with archive libraries in 64-bit 11.11 HP-UX

Typically if you get "Cannot load library symbol table" it means the archive wasn't created with HP's ar.

You can "fix" this by: ar -rs foo.a
MTSU_SAN
Regular Advisor

Re: Having trouble with archive libraries in 64-bit 11.11 HP-UX

Thanks, I did rebuild the symbol table with ar, but I got the same message afterwards...Weird, huh?
c*
Dennis Handly
Acclaimed Contributor

Re: Having trouble with archive libraries in 64-bit 11.11 HP-UX

>I did rebuild the symbol table with ar

You used the following?
/usr/ccs/bin/ar -rs foo.a
Sandman!
Honored Contributor

Re: Having trouble with archive libraries in 64-bit 11.11 HP-UX

Have you checked if the archive libraries you are trying to link with are all 64-bit. Do an ldd -v on the executable to find out the shared dependencies and post the output.

cheers!
MTSU_SAN
Regular Advisor

Re: Having trouble with archive libraries in 64-bit 11.11 HP-UX

Why, yes:
frank3 /usr/local4/openldap-2.3.19 $ cd libraries/liblutil
frank3 /usr/local4/openldap-2.3.19/libraries/liblutil $ file liblutil.a
liblutil.a: archive file
frank3 /usr/local4/openldap-2.3.19/libraries/liblutil $ /usr/ccs/bin/ar -rs liblutil.a
frank3 /usr/local4/openldap-2.3.19/libraries/liblutil $ file *.o
avl.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
base64.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
csn.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
detach.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
entropy.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
fetch.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
getpass.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
getpeereid.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
hash.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
ldif.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
lockf.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
md5.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
passfile.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
passwd.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
sasl.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
setproctitle.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
sha1.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
signal.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
sockpair.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
tavl.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
testavl.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
utils.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
uuid.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
version.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)

Then, running make again:
Entering subdirectory liblutil

Entering subdirectory liblber
cc +DD64 -I../../include -I../../include -I/usr/local/include -I/usr/local/BerkeleyDB.4.3/include -c etest.c
/bin/sh ../..//libtool --mode=link cc -static +DD64 -L/usr/local/lib -L/usr/local/BerkeleyDB.4.3/lib -o etest etest.o liblber.la ../../libraries/liblutil/liblutil.a
cc +DD64 -o etest etest.o -L/usr/local/lib -L/usr/local/BerkeleyDB.4.3/lib ./.libs/liblber.a ../../libraries/liblutil/liblutil.a
ld: (Warning) Cannot load library symbol table in ./.libs/liblber.a, it might be missing or corrupted. Skipping library ./.libs/liblber.a.
ld: (Warning) Cannot load library symbol table in ../../libraries/liblutil/liblutil.a, it might be missing or corrupted. Skipping library ../../libraries/liblutil/liblutil.a.


Same error.
Dennis Handly
Acclaimed Contributor

Re: Having trouble with archive libraries in 64-bit 11.11 HP-UX

Can you provide either liblber.a & liblutil.a, whichever is smaller?
MTSU_SAN
Regular Advisor

Re: Having trouble with archive libraries in 64-bit 11.11 HP-UX

Sure--liblutil.a is attached