Cannot build net-snmp for target using cross-compile
Kavita Raghunathan <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <C83EAE51.35B3%[email protected]> |
Hello,
How do I specify the right ld for the build to work ? I’m using linux and while linking with a library that contains the calls from SNMP agent, it uses the wrong link path : /usr/bin/ld
The configure line:
./configure LD=${CROSS_COMPILE}ld CC=${CROSS_COMPILE}gcc CXX=${CROSS_COMPILE}g++ CFLAGS="-g3 -O0" --prefix=${FILESYSTEM_ROOT_DIR} --host=m68k-linux-gnu --build=i686 --target=m68k-linux-gnu --disable-embedded-perl --without-perl-modules --with-endianness=big --with-default-snmp-version="3" --disable-des --disable-debugging --with-sys-contact="who@where" --with-logfile="/sf_rfs/logs/snmp" --with-transports="UDP TCP" -with-defaults --with-mib-modules=skyfiber-olu-mib --with-ldflags=LDFLAGS --with-libs="$NETSNMPDIR/libui.a $NETSNMPDIR/libutl.a /usr/lib/libpthread.a" > logfile
The link error:
ibtool: link: g++ -g -O2 -Ulinux -Dlinux=linux -o .libs/snmpd .libs/snmpd.o -L/home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/agent/.libs -L/home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/agent/helpers/.libs -L/home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/snmplib/.libs -L/home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/snmplib -L/home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/agent/helpers -L/home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/agent ./.libs/libnetsnmpagent.so helpers/.libs/libnetsnmphelpers.so ./.libs/libnetsnmpmibs.so /home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/agent/helpers/.libs/libnetsnmphelpers.so /home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/agent/.libs/libnetsnmpagent.so /home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/snmplib/.libs/libnetsnmp.so -ldl ../snmplib/.libs/libnetsnmp.so -lcrypto /home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/libui.a /home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/libutl.a /usr/lib/libpthread.a -Wl,-rpath -Wl,/home/kraghunathan/views/sfdev-2.0.snmplatest/../ltib/ltib-mcfv4m-20090730//rootfs/lib
/usr/bin/ld: /home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/libui.a(ui_snmp_stubs.o): Relocations in generic ELF (EM: 4)
/usr/bin/ld: /home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/libui.a(ui_snmp_stubs.o): Relocations in generic ELF (EM: 4)
/usr/bin/ld: /home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/libui.a(ui_snmp_stubs.o): Relocations in generic ELF (EM: 4)
/usr/bin/ld: /home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/libui.a(ui_snmp_stubs.o): Relocations in generic ELF (EM: 4)
/usr/bin/ld: /home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/libui.a(ui_snmp_stubs.o): Relocations in generic ELF (EM: 4)
/usr/bin/ld: /home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/libui.a(ui_snmp_stubs.o): Relocations in generic ELF (EM: 4)
/usr/bin/ld: /home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/libui.a(ui_snmp_stubs.o): Relocations in generic ELF (EM: 4)
/home/kraghunathan/views/sfdev-2.0.snmplatest/src/thirdparty/net-snmp-5.5/libui.a: could not read symbols: File in wrong format
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users