Languages and Scripting

ld: Mismatched ABI (not an ELF file) when compiling Pro C Program

 
Curtis Deese
Frequent Advisor

ld: Mismatched ABI (not an ELF file) when compiling Pro C Program

I get the following error on an Itanium 64-bit system when compiling in pro c:

ld: Mismatched ABI (not an ELF file) for /u01/app/oracle/product/11.2.0/db_1/precomp/public

Why am I getting this error for this directory and how do I resolve it?
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: ld: Mismatched ABI (not an ELF file) when compiling Pro C Program

Hi Curtis:

This is a linker error. You can't mix 32-bit and 64-bit objects nor can you link PA-Risc objects with Itanium ones.

Regards!

...JRF...
Curtis Deese
Frequent Advisor

Re: ld: Mismatched ABI (not an ELF file) when compiling Pro C Program

How do I ensure that the objects in /u01/app/oracle/product/11.2.0/db_1/precomp/public are 64 bit Itanium?
Dennis Handly
Acclaimed Contributor

Re: ld: Mismatched ABI (not an ELF file) when compiling Pro C Program

>How do I ensure that the objects in /u01/app/oracle/product/11.2.0/db_1/precomp/public are 64 bit Integrity?

You can use file(1) on each one to check the architecture. Then remove all of the ones that aren't valid for your link.
Mike Miller_8
Regular Advisor

Re: ld: Mismatched ABI (not an ELF file) when compiling Pro C Program

Check to see if there is a 64 bit version of the library routines that you are trying to link in and install them if they exist.

Try and link the code/changes on a PA server and move the program over (if you have a PA server that you can use).

This is one of the frustrating parts of migrating from PA to IA.

Good Luck!
Curtis Deese
Frequent Advisor

Re: ld: Mismatched ABI (not an ELF file) when compiling Pro C Program

Thanks for the responses. I solved the problem by removing $PRECOMPPUBLIC and $CFLAGS from the line in the Makefile that builds the executable. There are still some warnings in the compile but at least the executable is built now.