Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 407867 - net-misc/lldpd-0.5.7 version bump request (Was: net-misc/lldpd-0.5.6 fails to configure with USE="snmp")
Summary: net-misc/lldpd-0.5.7 version bump request (Was: net-misc/lldpd-0.5.6 fails to...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-12 01:11 UTC by Sven E.
Modified: 2012-10-16 01:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven E. 2012-03-12 01:11:05 UTC
net-misc/lldpd-0.5.6 fails to configure when using snmp.

Reproducible: Always

Steps to Reproduce:
1. Emerge lldpd

Actual Results:  
Failed configure

Expected Results:  
clean configure+build

Configure stops at:

checking for netsnmp_enable_subagent... no
configure: error: *** no subagent support in net-snmp

Corresponding test that fails:

configure:19448: checking for netsnmp_enable_subagent
configure:19448: x86_64-pc-linux-gnu-gcc -o conftest -march=athlon64 -O2 -pipe -fdiagnostics-show-option -std=gnu99 -Wall -W -Wextra -Wformat -Wformat-security -Wcast-align -Winline -fstack-protector -D_FORTIFY_SOURCE=2 -Wno-unused-parameter -Wno-sign-compare -I/usr/include -DNETSNMP_NO_INLINE  -Wl,-O1 -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -L/usr/lib64 -lnetsnmpagent -lnetsnmphelpers -lnetsnmpmibs -lnetsnmp -Wl,-E conftest.c  >&5
/var/tmp/portage/net-misc/lldpd-0.5.6/temp/cc2xWEpv.o: In function `main':
conftest.c:(.text+0x7): undefined reference to `netsnmp_enable_subagent'
collect2: ld returned 1 exit status
configure:19448: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "lldpd"
| #define PACKAGE_TARNAME "lldpd"
| #define PACKAGE_VERSION "0.5.6"
| #define PACKAGE_STRING "lldpd 0.5.6"
| #define PACKAGE_BUGREPORT "bernat@luffy.cx"
| #define PACKAGE_URL ""
| #define PACKAGE "lldpd"
| #define VERSION "0.5.6"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_ARPA_NAMESER_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_RESOLV_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_MALLOC_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_QUEUE_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_NET_IF_H 1
| #define HAVE_LINUX_SOCKIOS_H 1
| #define HAVE_LINUX_WIRELESS_H 1
| #define HAVE_LINUX_IF_BONDING_H 1
| #define HAVE_LINUX_IF_BRIDGE_H 1
| #define HAVE_LINUX_IF_PACKET_H 1
| #define HAVE_LINUX_FILTER_H 1
| #define HAVE_LINUX_IF_VLAN_H 1
| #define HAVE_DECL_TAILQ_FIRST 1
| #define HAVE_DECL_TAILQ_NEXT 1
| #define HAVE_DECL_TAILQ_FOREACH 1
| #define HAVE_DECL_TAILQ_EMPTY 1
| #define HAVE_DECL_SLIST_HEAD 1
| #define HAVE_DECL_SLIST_ENTRY 1
| #define HAVE_DECL_SLIST_INIT 1
| #define HAVE_DECL_SLIST_INSERT_HEAD 1
| #define HAVE_DECL_SLIST_FIRST 1
| #define HAVE_DECL_SLIST_NEXT 1
| #define HAVE_DECL_SLIST_REMOVE_HEAD 1
| #define HAVE_DECL_SLIST_EMPTY 1
| #define HAVE_DECL_SIOCGIFVLAN 1
| #define HAVE_DECL_SIOCBONDINFOQUERY 1
| #define HAVE_DECL_SIOCBONDSLAVEINFOQUERY 1
| #define HAVE_IFSLAVE_SLAVE_NAME 1
| #define HAVE_IFBOND_NUM_SLAVES 1
| #define HAVE_DECL_PACKET_ORIGDEV 1
| #define HAVE_ETHTOOL_H 1
| #define HAVE_DECL_ADVERTISED_2500BASEX_FULL 1
| #define HAVE_DECL_ADVERTISED_PAUSE 1
| #define HAVE_DECL_ADVERTISED_ASYM_PAUSE 1
| #define HAVE_DECL_ADVERTISED_10000BASET_FULL 1
| #define HAVE_DECL_SPEED_10000 1
| #define HAVE_DECL_ETHERTYPE_VLAN 1
| #define HAVE_DECL_GET_VLAN_REALDEV_NAME_CMD 1
| #define HAVE_DECL_GET_VLAN_VID_CMD 1
| #define HAVE___PROGNAME 1
| #define LLDPD_FD_SETSIZE 1024
| #define HAVE_UNISTD_H 1
| #define HAVE_CHOWN 1
| #define HAVE_FORK 1
| #define HAVE_VFORK 1
| #define HAVE_WORKING_VFORK 1
| #define HAVE_WORKING_FORK 1
| #define HAVE_STDLIB_H 1
| #define HAVE_MALLOC 1
| #define HAVE_STDLIB_H 1
| #define HAVE_REALLOC 1
| #define HAVE_ATEXIT 1
| #define HAVE_GETHOSTBYNAME 1
| #define HAVE_INET_NTOA 1
| #define HAVE_MEMSET 1
| #define HAVE_REGCOMP 1
| #define HAVE_SELECT 1
| #define HAVE_SETENV 1
| #define HAVE_SOCKET 1
| #define HAVE_STRCHR 1
| #define HAVE_STRDUP 1
| #define HAVE_STRERROR 1
| #define HAVE_STRNDUP 1
| #define HAVE_TZSET 1
| #define HAVE_UNAME 1
| #define HAVE_GETIFADDRS 1
| /* end confdefs.h.  */
| /* Define netsnmp_enable_subagent to an innocuous variant, in case <limits.h> declares netsnmp_enable_subagent.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define netsnmp_enable_subagent innocuous_netsnmp_enable_subagent
|
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char netsnmp_enable_subagent (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
|
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|
| #undef netsnmp_enable_subagent
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char netsnmp_enable_subagent ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined __stub_netsnmp_enable_subagent || defined __stub___netsnmp_enable_subagent
| choke me
| #endif
|
| int
| main ()
| {
| return netsnmp_enable_subagent ();
|   ;
|   return 0;
| }
configure:19448: result: no
configure:19455: error: *** no subagent support in net-snmp

---
net-snmp is built with following USE flags:
net-analyzer/net-snmp-5.4.3  USE="X bzip2 extensible ipv6 perl python ssl tcpd zlib"
Comment 1 Sven E. 2012-03-12 01:21:59 UTC
objdump -T libnetsnmpagent.so.15|grep netsnmp_enable_subagent
0000000000023b00 g    DF .text  0000000000000041  Base        netsnmp_enable_subagent

Seems the symbol is present. Is this a bug in the test within lldpd?
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-03-13 16:33:19 UTC
Which version of net-analyzer/net-snmp is that?
Comment 3 Sven E. 2012-03-13 17:19:25 UTC
Last line of bugreports states:

net-analyzer/net-snmp-5.4.3

For completeness again:

[ebuild   R    ] net-analyzer/net-snmp-5.4.3  USE="X bzip2 extensible ipv6 perl python ssl tcpd zlib -diskio -doc -elf -lm_sensors -mfd-rewrites -minimal -rpm (-selinux) -sendmail -smux" 0 kB


btw, I reemerged net-snmp after first hitting the configure error, just to make sure, but that did not change anything.

From what I checked so far everything seems to be in place, do you need any more detailed logs (i.e. the whole configure log and emerge log)? It puzzles me though, that the test fails in the first place, since all linked (-l) libs are in place and the corresponding lib has the necessary symbol, so ld should be able to resolve it.

Could any other linker option cause something like that? (Specifically as-needed?)
Comment 4 Peter Große 2012-04-23 19:04:34 UTC
Maybe following commit addresses the problem?!

https://github.com/vincentbernat/lldpd/commit/8d72aaa09c1978bf75884a0dde4e0a7cd419332d
Comment 5 Sven E. 2012-08-20 23:48:51 UTC
Seems the problem was fixed in 0.5.7, maybe do a version bump?
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-10-15 19:43:32 UTC
The patch looks correct to me, so I suggest just bumping this.
Comment 7 Patrick McLean gentoo-dev 2012-10-16 01:47:16 UTC
net-misc/lldpd-0.5.7 is now in portage.