Hi Everyone,
I am trying to compile net-snmp 5.8 version on my ARM Yocto platform and I
am getting error regarding "undefined reference to ceil" function. I am
getting this error only when I pass "--enable-blumenthal-aes" flag during
configuration. If I compile without "--enable-blumenthal-aes" flag then it
compiles without any error.
I confirmed that math library (libm.so) is on path still I am getting this
error. I have notice that yocto platfrom is adding "-Wl,--as-needed" flag
during compilation. If I remove "-Wl,--as-needed" from below last failed
compilation command then it executes without any error.
It looks like that net-snmp 5.8 version is broken with "--as-needed" option
when "--enable-blumenthal-aes" configuration is enabled. Please let me know
how I can resolve this error.
Below are last lines of compilation with error.
*LOGS:*
| arm-linux-gnueabi-libtool: compile: arm-linux-gnueabi-gcc -march=armv7-a
-mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -Wl,-O1 -Wl,--hash-style=gnu
-Wl,--as-needed
--sysroot=/home/user/Test_Yocto/product-yocto/build_product/tmp/sysroots/product
-I../../include
-I/home/user/Test_Yocto/product-yocto/build_product/tmp/work/cortexa8-vfp-neon-linux-gnueabi/net-snmp/5.8-r0/net-snmp-5.8/include
-I/home/user/Test_Yocto/product-yocto/build_product/tmp/sysroots/product/usr/include/libnl3
-O2 -pipe -g -feliminate-unused-debug-types -DNETSNMP_ENABLE_IPV6
-fno-strict-aliasing -DNETSNMP_REMOVE_U64 -O2 -pipe -g
-feliminate-unused-debug-types -Ulinux -Dlinux=linux -c
/home/user/Test_Yocto/product-yocto/build_product/tmp/work/cortexa8-vfp-neon-linux-gnueabi/net-snmp/5.8-r0/net-snmp-5.8/apps/snmpnetstat/ffs.c
-o ffs.o >/dev/null 2>&1
| ../../arm-linux-gnueabi-libtool --mode=link arm-linux-gnueabi-gcc
-march=armv7-a -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -Wl,-O1
-Wl,--hash-style=gnu -Wl,--as-needed
--sysroot=/home/user/Test_Yocto/product-yocto/build_product/tmp/sysroots/product
-O2 -pipe -g -feliminate-unused-debug-types -DNETSNMP_ENABLE_IPV6
-fno-strict-aliasing -DNETSNMP_REMOVE_U64 -O2 -pipe -g
-feliminate-unused-debug-types -Ulinux -Dlinux=linux -o snmpnetstat
inet.lo inet6.lo inetx.lo if.lo main.lo route.lo routex.lo winstub.lo
ffs.lo -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed ../../snmplib/
libnetsnmp.la -lnl-3 -lm
| arm-linux-gnueabi-libtool: link: arm-linux-gnueabi-gcc -march=armv7-a
-mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -Wl,-O1 -Wl,--hash-style=gnu
-Wl,--as-needed
--sysroot=/home/user/Test_Yocto/product-yocto/build_product/tmp/sysroots/product
-O2 -pipe -g -feliminate-unused-debug-types -DNETSNMP_ENABLE_IPV6
-fno-strict-aliasing -DNETSNMP_REMOVE_U64 -O2 -pipe -g
-feliminate-unused-debug-types -Ulinux -Dlinux=linux -o .libs/snmpnetstat
.libs/inet.o .libs/inet6.o .libs/inetx.o .libs/if.o .libs/main.o
.libs/route.o .libs/routex.o .libs/winstub.o .libs/ffs.o -Wl,-O1
-Wl,--hash-style=gnu -Wl,--as-needed ../../snmplib/.libs/libnetsnmp.so
-lcrypto
/home/user/Test_Yocto/product-yocto/build_product/tmp/sysroots/product/usr/lib/libnl-3.so
-lpthread -lm
| ../../snmplib/.libs/libnetsnmp.so: undefined reference to `ceil'
| collect2: error: ld returned 1 exit status
| Makefile:160: recipe for target 'snmpnetstat' failed
| make[2]: * [snmpnetstat] Error 1
Thanks,
Hitesh
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users