Operating System - HP-UX
1827677 Members
3483 Online
109967 Solutions
New Discussion

Re: Mismatched ABI (not an ELF file)

 
Samir Benjamin
Occasional Advisor

Mismatched ABI (not an ELF file)

ld: Mismatched ABI (not an ELF file) for -lEAClnt, found /opt/EA2000_3.5.1.4/lib/libEAClnt.sl

What does this mean on HP Itanium. Are we really comping in 32 bit mode or not?

Can you please let us know?
8 REPLIES 8
Samir Benjamin
Occasional Advisor

Re: Mismatched ABI (not an ELF file)

Because the options which we are using for comping are:
-g0 -AP -v +z +Z +DD32
James R. Ferguson
Acclaimed Contributor

Re: Mismatched ABI (not an ELF file)

Hi Samir:

The error is from the linker. You can't mix 32-bit and 64-bit objects when you link. The first object's "bitness" sets the requirement for the remaining ones.

Regards!

...JRF...
Samir Benjamin
Occasional Advisor

Re: Mismatched ABI (not an ELF file)

Ok thanks James. But we need to link our Binaries in 32 bit mode. Any idea which option to use. While compiling we are using +DD32, but what about while linking?

Re: Mismatched ABI (not an ELF file)

you dont have to pass any such option to linker. it will be set to the fisrt object's model. if the fisrt object is 32 bit, then linker thinks it to be a 32 bit link... and like that for 64 bit also.

Re: Mismatched ABI (not an ELF file)

you simply compile in 32 bit mode and compiler will invoke linker by passing objects compiled in 32 bit mode. and if you are invoking linker explicitly, the fisrt object file in the command line sets the model. and if linker sees an object file or shared library of 64 bit, different from the first object file which is 32 bit, then you get this error.

secondly, it also says that file is not an ELF file. usually on itanium, shared library extension is .so and not .sl. .sl is on PA-RISC. so in your case, it looks like you are giving a 32 bit PA file (SOM format) later in the link line.
Shinji Teragaito_1
Respected Contributor

Re: Mismatched ABI (not an ELF file)

You should have 32-bit libEAClnt shared library generated on Itanium.
Current libEAClnt.sl must be a shared library for PA.
You can confirm it by invoking "file /opt/EA2000_3.5.1.4/lib/libEAClnt.sl".
Samir Benjamin
Occasional Advisor

Re: Mismatched ABI (not an ELF file)

Thanks. you guys are great...
Dennis Handly
Acclaimed Contributor

Re: Mismatched ABI (not an ELF file)

>Because the options which we are using for comping are: -g0 -AP +z +Z +DD32

You should use the same options for linking.
Note this error on Integrity means you are mixing SOM and ELF files, as Suprateeka said.
But on PA, this also means the bitness is different.

>JRF: The first object's "bitness" sets the requirement for the remaining ones.

You shouldn't depend on this. You should be explicit when using the driver.
Unless you are always using the default 32 bit mode.