[CentOS] Re: /usr/bin/ld: skipping incompatible

Thu Mar 6 20:07:20 UTC 2008
Scott Silva <ssilva at sgvwater.com>

on 3-6-2008 6:48 AM Simon Jolle spake the following:
> Hi Centos Users
> 
> I try to compile SNMPPD (SNMP Proxy Daemon) on Centos 5.1 x86_64 with
> latest patches. Dependencies (like libsplit, net-snmp-libs,
> net-snmp-devel, net-snmp-libs) are installed, both 32 and 64 Bit.
Try and remove the 32 bit libs if you are not running 32 bit apps.
> 
> # rpmbuild -tb snmppd-0.5.2.tar.gz
> [...]
> Making all in snmppd
> make[2]: Entering directory `/tmp/snmppd-0.5.2/snmppd'
> gcc  -Wall -Wno-uninitialized -Wchar-subscripts -Wmissing-declarations
> -Wmissing-prototypes -Wnested-externs -Wpointer-arith
> -Wno-sign-compare -Werror  -L/usr/lib  -o snmppd  conf.o control.o
> log.o queue.o snmp.o snmppd.o threads.o utils.o -lnetsnmp  -lcrypto
> -lpthread
> /usr/bin/ld: skipping incompatible /usr/lib/libnetsnmp.so when
You are building 64 bit, but it is finding the 32 bit libs and bombing.

> searching for -lnetsnmp
> /usr/bin/ld: skipping incompatible /usr/lib/libnetsnmp.a when
Same here. 64 bit libs are in /usr/lib64 .
> searching for -lnetsnmp
> snmppd.o: In function `new_target':
> snmppd.c:(.text+0x371): undefined reference to `split'
> snmppd.c:(.text+0x3fb): undefined reference to `split_free'
> snmppd.c:(.text+0x619): undefined reference to `split_free'
> collect2: ld returned 1 exit status
> make[2]: *** [snmppd] Error 1
> make[2]: Leaving directory `/tmp/snmppd-0.5.2/snmppd'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/tmp/snmppd-0.5.2'
> make: *** [all] Error 2
> [...]
> 
> Can anyone explain me "/usr/bin/ld: skipping incompatible" in plain
> english ;) How to solve it?
> 

It is very difficult to build 64 bit software when 32 bit libs are present 
because the 32 bit lib path gets searched first.


-- 
MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20080306/713e8abb/attachment-0005.sig>