[collectd] collectd-4.1.2 compiling bug

a.shubnik at btis.by a.shubnik at btis.by
Mon Oct 1 10:09:03 CEST 2007


   Hi Florian,
   I have not any error or question when configure last collectd-4.1.2.  
Great!
   But when i start compiling on x86_64 machine (with  
kernel-2.6.16.53-0.8-smp
and libnlink-2.6.15-14.4) got error:

...
make[3]: Entering directory `/usr/local/src/collectd-4.1.2/src'
/bin/sh ../libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2   -o  
netlink.la -rpath /usr/local/stow/collectd-4.1.2/lib/collectd -module  
-avoid-version netlink_la-netlink.lo -lnetlink
gcc -shared  .libs/netlink_la-netlink.o  -lnetlink  -Wl,-soname  
-Wl,netlink.so -o .libs/netlink.so
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:  
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/libnetlink.a(libnetlink.o):  
relocation R_X86_64_32 against `a local symbol' can not be used when  
making a shared object; recompile with -fPIC
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/libnetlink.a:  
could not read symbols: Bad value
collect2: ld returned 1 exit status
make[3]: *** [netlink.la] Error 1
make[3]: Leaving directory `/usr/local/src/collectd-4.1.2/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/collectd-4.1.2/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/collectd-4.1.2/src'
make: *** [all-recursive] Error 1


   On x86 machine (with kernel-2.6.22.5-2-default and libnlink-2.6.22-31) i  
haven't error but only warnings:

...
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.  
-I.     -g -O2 -MT netlink_la-netlink.lo -MD -MP -MF  
".deps/netlink_la-netlink.Tpo" -c -o netlink_la-netlink.lo `test -f  
'netlink.c' || echo './'`netlink.c; \
         then mv -f ".deps/netlink_la-netlink.Tpo"  
".deps/netlink_la-netlink.Plo"; else rm -f ".deps/netlink_la-netlink.Tpo";  
exit 1; fi
  gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT netlink_la-netlink.lo -MD -MP  
-MF .deps/netlink_la-netlink.Tpo -c netlink.c  -fPIC -DPIC -o  
.libs/netlink_la-netlink.o
netlink.c: In function 'ir_read':
netlink.c:578: warning: passing argument 2 of 'rtnl_dump_filter' from  
incompatible pointer type
netlink.c:616: warning: passing argument 2 of 'rtnl_dump_filter' from  
incompatible pointer type
/bin/sh ../libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2   -o  
netlink.la -rpath /usr/local/stow/collectd-4.1.2/lib/collectd -module  
-avoid-version netlink_la-netlink.lo -lnetlink
gcc -shared  .libs/netlink_la-netlink.o  -lnetlink  -Wl,-soname  
-Wl,netlink.so -o .libs/netlink.so
creating netlink.la
(cd .libs && rm -f netlink.la && ln -s ../netlink.la netlink.la)
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.  
-I.    -Wall -Werror -g -O2 -MT network.lo -MD -MP -MF ".deps/network.Tpo"  
-c -o network.lo network.c; \
         then mv -f ".deps/network.Tpo" ".deps/network.Plo"; else rm -f  
".deps/network.Tpo"; exit 1; fi
  gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -Werror -g -O2 -MT network.lo -MD  
-MP -MF .deps/network.Tpo -c network.c  -fPIC -DPIC -o .libs/network.o
/bin/sh ../libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2   -o  
network.la -rpath /usr/local/stow/collectd-4.1.2/lib/collectd -module  
-avoid-version  -lpthread network.lo
gcc -shared  .libs/network.o  -lpthread  -Wl,-soname -Wl,network.so -o  
.libs/network.so
creating network.la
(cd .libs && rm -f network.la && ln -s ../network.la network.la)
...

    Thank you,
    Alex



More information about the collectd mailing list