Operating System - HP-UX
1827085 Members
2680 Online
109713 Solutions
New Discussion

Re: 64-bit shared library in 32-bit link

 
Chris Kosanovich
Occasional Advisor

64-bit shared library in 32-bit link

I am trying to compile xlockmore on hpux 11.11 (64bit) using gcc 3.1.1 and everything is configuring but when i do a make everything compiles except the xlock binary which gives the error:

"/usr/ccs/bin/ld: /usr/local/lib/libdl.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link"

then i get an exit with error status 1.

I am fairly new to this stuff and i don't know why it is giving me that or what i can do to fix it and get this thing to compile. I have tried making it with CC=cc or CC=aCC to see if it was a compiler thing but both of those give me other problems (though i admit i don't remember them giving me this exact problem) so is there any way around this? (and why is it doing it if you know?)

Also, while i am here i may as well ask if anyone knows how to compile the newest version of ld for hpux. I downloaded the newest binutils (2.13) and compiled them but when they compile it says that it is leaving out the package ld because it's not supported on this platform. So are we stuck with the ld that HP gives us?

Thanks in advance.
-Chris
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: 64-bit shared library in 32-bit link

You are not going to be able to mix and match 32-bit and 64-bit objects in the same link. All the objects must be one or the other.
If it ain't broke, I can fix that.
Chris Kosanovich
Occasional Advisor

Re: 64-bit shared library in 32-bit link

That makes sense. So how do i fix this? How can i get them to all be 32 bit (or 64 bit) files? do i have to set the target as a 32 bit machine when i configure or is there something else i can do?
H.Merijn Brand (procura
Honored Contributor

Re: 64-bit shared library in 32-bit link

1. Do you *need* a 64bit xlockmore? The fact that you have a 64bit OS doesn't mean you have to build 64bit objects.
2. You can only make 64bit objects with a 64bit gcc (gcc-3.2/64 is available on https://www.beepz.com/personal/merijn )
3. If you make a 32bit object and you are linking with 64bit objects, the only solution is to rebuild the 64bit object to 32bit

HTH
Enjoy, Have FUN! H.Merijn
Chris Kosanovich
Occasional Advisor

Re: 64-bit shared library in 32-bit link

Thanks i got it fixed, it turned out that the libdl.sl was a 64 bit shared library while the gcc i was using was 32 bit. I found another libdl on the system that was 32 bit and linked that one instead and it worked fine.

Thanks for your effort and help! I appreciate it a lot.

-Chris