Operating System - HP-UX
1838108 Members
3487 Online
110124 Solutions
New Discussion

Re: Mismatched ABI. 64-bit PA object file found in 32-bit link

 
SOLVED
Go to solution
Ron DeC
New Member

Mismatched ABI. 64-bit PA object file found in 32-bit link

I've added env pointing to the library:
LD_LIBRARY_PATH=/usr/lib/pa20_64
export LD_LIBRARY_PATH

I've added +DD64 to my compilation, and the direct path to the 64bit libraries, but still can't get around the above error during linking:
/usr/bin/cc -DUNIX -DSUN -DACE -DAPG -DMCE -DNDEBUG +DD64 -c cntldll.c
/usr/bin/cc -DUNIX -DSUN -DACE -DAPG -DMCE -DNDEBUG +DD64 -c dbcntrl.c
/usr/bin/cc -DUNIX -DSUN -DACE -DAPG -DMCE -DNDEBUG +DD64 -c optdll.c
/usr/bin/cc -DUNIX -DSUN -DACE -DAPG -DMCE -DNDEBUG +DD64 -c tohipaa.c
/usr/bin/cc -DUNIX -DSUN -DACE -DAPG -DMCE -DNDEBUG +DD64 -c -DDYNAMIC
inptest.c
/usr/bin/cc -o dintest cntldll.o dbcntrl.o inptest.o optdll.o tohipaa.o -L /usr/lib/pa20_64 -ldl -lm
/usr/ccs/bin/ld: cntldll.o: Mismatched ABI. 64-bit PA object file found in 32-bit link

The object files are all 64bit:
/diamond/shhsd/rjd/opt0606: file cntldll.o
cntldll.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/diamond/shhsd/rjd/opt0606: file dbcntrl.o
dbcntrl.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/diamond/shhsd/rjd/opt0606: file inptest.o
inptest.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/diamond/shhsd/rjd/opt0606: file optdll.o
optdll.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/diamond/shhsd/rjd/opt0606: file tohipaa.o
tohipaa.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)

The library files appear to be 64bit:
/usr/lib/pa20_64: ls -l libdl*
-r-xr-xr-x 1 bin bin 73240 Feb 9 06:32 libdl.1
lrwxr-xr-x 1 root sys 9 Jan 8 2005 libdl.sl -> ./libdl.1

/usr/lib/pa20_64: file libdl.sl
libdl.sl: ELF-64 shared object file - PA-RISC 2.0 (LP64)

/usr/lib/pa20_64: ls -l libm*
-r-xr-xr-x 1 bin bin 274664 Jun 4 2001 libm.2
lrwxr-xr-x 1 root sys 8 Jan 8 2005 libm.sl -> ./libm.2

/usr/lib/pa20_64: file libm.2
libm.2: ELF-64 shared object file - PA-RISC 2.0 (LP64)

Please help. The only thought I have is that maybe the cc and ld need to be 64bit versions? I've seen documentation that wasn't necessary:
PA-RISC1.1 shared executable dynamically linked -not stripped
3 REPLIES 3
Steven Schweda
Honored Contributor
Solution

Re: Mismatched ABI. 64-bit PA object file found in 32-bit link

> LD_LIBRARY_PATH=/usr/lib/pa20_64

> [...] -L /usr/lib/pa20_64 [...]

I know nothing, but rather than trying to
mess with the minds of the compiler and
linker, have you tried asking the compiler to
do the link with the same exotic options as
you specified for the compilation? Perhaps
something like:

/usr/bin/cc -o dintest cntldll.o dbcntrl.o
inptest.o optdll.o tohipaa.o +DD64 -ldl -lm

> The object files are all 64bit:

And without the "+DD64", what makes the link
"64-bit"? If you turn on enough verbosity,
you may be able to see all the fancy stuff
which "+DD64" does. (I assume that there is
some, and that you haven't specified all of
it (or even enough of it).)
Ron DeC
New Member

Re: Mismatched ABI. 64-bit PA object file found in 32-bit link

That worked!

Thanks much...
Ron DeC
New Member

Re: Mismatched ABI. 64-bit PA object file found in 32-bit link

the +DD64 with the linker as well as the compiler was needed