Operating System - Linux
1752585 Members
4455 Online
108788 Solutions
New Discussion юеВ

ld: Mismatched ABI (not an ELF file) for -lgd

 
Pedro Cirne
Esteemed Contributor

ld: Mismatched ABI (not an ELF file) for -lgd

Hi,

I'm trying to compile the perl module GD-2.35 but I' getting this error:

Running Mkbootstrap for GD ()
chmod 644 GD.bs
rm -f blib/arch/auto/GD/GD.sl
LD_RUN_PATH="/usr/local/lib:/usr/local/pa20_64/lib:/usr/lib" /usr/bin/ld -b -L/usr/local/pa20_64/lib -L/lib/pa20_64 GD.o -o blib/arch/auto/GD/GD.sl \
-L/usr/local/lib -L/usr/lib/X11 -L/usr/lib -lgd -lfreetype -ljpeg -lpng -lz -lm -lX11 -lXpm \

ld: Mismatched ABI (not an ELF file) for -lgd, found /usr/local/lib/libgd.sl
Fatal error.
*** Error exit code 1

Any idei fo what might be the problem?

Thks!
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: ld: Mismatched ABI (not an ELF file) for -lgd

Hi Pedro:

The error indicates that you are trying to mix 32-bit and 64-bit objects in your linking. This is illegal. '/usr/local/lib/libgd.sl' appears to be a 32-bit object.

Regards!

...JRF...
Pedro Cirne
Esteemed Contributor

Re: ld: Mismatched ABI (not an ELF file) for -lgd

Hi James,

I think libgd.sl is 64bits:

root@porsx013:/tmp/GD-2.35# file /usr/local/lib/libgd.sl
/usr/local/lib/libgd.sl: PA-RISC2.0 shared library -not stripped

PA-RISC2.0 is 64bits, isn't it?

Thks!

James R. Ferguson
Acclaimed Contributor

Re: ld: Mismatched ABI (not an ELF file) for -lgd

Hi (again):

Your file is 32-bit. A 64-bit object will be reported by 'file' with the string "ELF" like:

ELF-64 shared object file - PA-RISC 2.0 (LP64)

A 32-bit object would simply say:

PA-RISC2.0 shared library

Another (crude) way to tell the difference is to run 'odump' on the object. This will only work for 32-bit ones. You use 'elfdump' for 64-bit objects.

Regards!

...JRF...


Pedro Cirne
Esteemed Contributor

Re: ld: Mismatched ABI (not an ELF file) for -lgd

Thks!