DragonFly users List (threaded) for 2008-05
DragonFly BSD
DragonFly users List (threaded) for 2008-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Strange linking problem


From: Hasso Tepper <hasso@xxxxxxxxx>
Date: Mon, 26 May 2008 16:06:52 +0300

While trying to get net/net-snmp to work again in DragonFly I'm running 
into strange linking problem. Net-snmp worked fine for some time and then 
stopped linking. I _think_ that it was around the time when we switched 
gcc and binutils. Therefore I _think_ that it's not the problem in the 
net-snmp though.

The problem is that linking net-snmp agent fails:

/bin/sh ../libtool  --mode=link 
cc -DNETSNMP_ENABLE_IPV6 -O2 -I/usr/pkg/include -I/usr/include -Udragonfly -Ddragonfly=dragonfly  -o 
snmpd 
snmpd.lo  -L../snmplib/.libs -L../snmplib -L./.libs -L./helpers/.libs -L./helpers -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib  
libnetsnmpagent.la helpers/libnetsnmphelpers.la 
libnetsnmpmibs.la ../snmplib/libnetsnmp.la  -Wl,-R/usr/pkg/lib/perl5/5.8.0/i386-dragonfly-thread-multi/CORE -Wl,-R/usr/pkg/lib -pthread -Wl,-E  /usr/pkg/lib/perl5/5.8.0/i386-dragonfly-thread-multi/auto/DynaLoader/DynaLoader.a -L/usr/pkg/lib/perl5/5.8.0/i386-dragonfly-thread-multi/CORE -lperl -lm -lcrypt -lpthread
cc -DNETSNMP_ENABLE_IPV6 -O2 -I/usr/obj/pkgsrc/net/net-snmp/work/.buildlink/include -Udragonfly -Ddragonfly=dragonfly -o .libs/snmpd .libs/snmpd.o -Wl,-R/usr/pkg/lib -Wl,-R/usr/pkg/lib/perl5/5.8.0/i386-dragonfly-thread-multi/CORE -pthread -Wl,-E  -L/usr/obj/pkgsrc/net/net-snmp/work/net-snmp-5.4.1/agent/.libs -L/usr/obj/pkgsrc/net/net-snmp/work/net-snmp-5.4.1/agent/helpers/.libs -L/usr/obj/pkgsrc/net/net-snmp/work/net-snmp-5.4.1/snmplib/.libs -L/home/obj/pkgsrc/net/net-snmp/work/net-snmp-5.4.1/snmplib/.libs -L/home/obj/pkgsrc/net/net-snmp/work/net-snmp-5.4.1/snmplib -L/home/obj/pkgsrc/net/net-snmp/work/net-snmp-5.4.1/agent/.libs -L/home/obj/pkgsrc/net/net-snmp/work/net-snmp-5.4.1/agent/helpers/.libs -L/home/obj/pkgsrc/net/net-snmp/work/net-snmp-5.4.1/agent/helpers -L/usr/obj/pkgsrc/net/net-snmp/work/.buildlink/lib -L/usr/lib/lib /usr/obj/pkgsrc/net/net-snmp/work/net-snmp-5.4.1/agent/.libs/libnetsnmpmibs.so /usr/obj/pkgsrc/net/net-snmp/work/net-snmp-5.4.1/agent/helpers/.libs/libnetsnmphelpers.so /usr/obj/pkgsrc/net/net-snmp/work/net-snmp-5.4.1/agent/.libs/libnetsnmpagent.so -lwrap -lkvm -lkinfo /usr/obj/pkgsrc/net/net-snmp/work/net-snmp-5.4.1/snmplib/.libs/libnetsnmp.so -pthread /usr/pkg/lib/perl5/5.8.0/i386-dragonfly-thread-multi/auto/DynaLoader/DynaLoader.a -L/usr/obj/pkgsrc/net/net-snmp/work/.buildlink/lib/perl5/5.8.0/i386-dragonfly-thread-multi/CORE -lperl -lm -lcrypt -lpthread   -Wl,--rpath -Wl,/usr/pkg/lib
/usr/obj/pkgsrc/net/net-snmp/work/net-snmp-5.4.1/agent/.libs/libnetsnmpagent.so: 
undefined reference to `boot_DynaLoader'

The `boot_DynaLoader' symbol should come from
/usr/pkg/lib/perl5/5.8.0/i386-dragonfly-thread-multi/auto/DynaLoader/DynaLoader.a.
The point is that if I unpack DynaLoader.o from DynaLoader.a with ar -x 
and replace DynaLoader.a with DynaLoader.o in the linking, it links (and 
works, tested) fine.

Any ideas?


-- 
Hasso Tepper



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]