Tag Archives: /usr/bin/ld: skipping incompatible

/usr/bin/ld: skipping incompatible Error [How to Fix]

Today’s problem: /usr/bin/LD: skipping incompatible

QT reported an error when connecting a and so files

Analysis: the compiler’s error message is clear: compatibility issues

Analysis method:

File XXX. A “or” file ” xxx.so Take a look at whether the library version is 32-bit or 64 bit, or arm version or… And so on.

View so file information: 64 bit

user@ubuntu :~/Documents/CloudBox/VersionControlServer/code/bin$ file liblht_ coreframeworkD.so .1.0.0

liblht_ coreframeworkD.so .1.0.0: ELF

64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x395ec03d717504939d7e6c93f6f1132ea7830ad2, not stripped

 

View the system information: 64 bit is not displayed, basically 32-bit

user@ubuntu :~/Documents/CloudBox/VersionControlServer/code/bin$ uname -a Linux ubuntu 3.2.0-29-generic-pae # 46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012  i686 i686 i386 GNU/Linux

Check the GUI system information: it’s really 32-bit.

 

Solutions.
1) recompile the 32-bit so file
2) switch to 64-bit linux

How to Solve “/usr/bin/ld: skipping incompatible”

Today, when I was working on a project, I used the make command to solve the problem of / usr/bin/LD: skipping incompatible.

The essence of this problem is that when linking library files, the library file version does not correspond to the platform version.

Solution: objdump – P libmylib. A. check whether the library version is 32-bit or 64 bit, or arm version or… And so on. Analyze it carefully. You’ll be in the fog. (the problem I encountered is that the compiler chooses version 64, but XXX. A is version 32, which is not compatible)
conclusion: problems are beneficial but not harmful. Only by solving problems can we improve ourselves!