Bug 196904

Summary: net-mgmt/net-snmp: undefined reference to `sysctl_read_XXXXXX
Product: Ports & Packages Reporter: O. Hartmann <ohartmann>
Component: Individual Port(s)Assignee: Ryan Steinmetz <zi>
Status: Closed FIXED    
Severity: Affects Some People CC: kan, madpilot, ohartmann
Priority: --- Flags: bugzilla: maintainer-feedback? (zi)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
FreeBSD 11 is a FreeBSD tooo none

Description O. Hartmann 2015-01-19 19:47:34 UTC
Ports at SVN Revision: 377450 on FreeBSD 11.0-CURRENT #1 r277395: Mon Jan 19 19:45:57 CET 2015 amd64, ports tree is up to date as far as I can see:

[...]

libtool: link: cc -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -O2 -pipe -O3 -march=native -I/usr/local/include -I/include -D_WANT_IFADDR -fstack-protector -fno-strict-aliasing -Ufreebsd11 -Dfreebsd11=freebsd11 -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/usr/local/lib/perl5/5.18/mach/CORE -o .libs/snmpd .libs/snmpd.o -Wl,-R/usr/local/lib/perl5/5.18/mach/CORE  -L/usr/lib -L/lib ./.libs/libnetsnmpagent.so -L/usr/local/lib -L/usr/local/lib/perl5/5.18/mach/CORE ./.libs/libnetsnmpmibs.so /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.3/agent/.libs/libnetsnmpagent.so /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.3/snmplib/.libs/libnetsnmp.so ../snmplib/.libs/libnetsnmp.so -lpkg -lwrap -lperl -lcrypt -lutil -lelf -lssp_nonshared -lm -lkvm -ldevstat -lcrypto -pthread  -Wl,-rpath -Wl,/usr/local/lib
./.libs/libnetsnmpmibs.so: undefined reference to `sysctl_read_icmp_stat'
./.libs/libnetsnmpmibs.so: undefined reference to `sysctl_read_icmp6_stat'
./.libs/libnetsnmpmibs.so: undefined reference to `sysctl_read_icmp6_msg_stat'
./.libs/libnetsnmpmibs.so: undefined reference to `sysctl_read_icmp_msg_stat'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.3/agent
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-01-19 19:47:34 UTC
Auto-assigned to maintainer zi@FreeBSD.org
Comment 2 Ryan Steinmetz freebsd_committer freebsd_triage 2015-01-19 21:32:38 UTC
11-CURRENT is likely to have problems as it's a moving target.

Please use one of the RELEASEs and let me know if you still run into issues.

Does 5.7.2 still build with r277395?
Comment 3 O. Hartmann 2015-01-23 06:05:33 UTC
I use CURRENT(!), but I tried also 10.1-RELEASE-p4. there, the port installs/updates as expected.
Comment 4 Alexander Kabaev freebsd_committer freebsd_triage 2015-01-27 03:24:05 UTC
Created attachment 152245 [details]
FreeBSD 11 is a FreeBSD tooo

First, let me point out that ports are expected to work on -current and reasonable effort is requited from the port maintainer to ensure that to be the case. Second, it is also expected for ports to get broken on -current from time to time. Either way, suggestion  to use 10.1 was not exactly useful.

Said that, the little patch (attaching) fixes net-snmp port on FreeBSD 11 for me.
Comment 5 Ryan Steinmetz freebsd_committer freebsd_triage 2015-01-29 02:04:05 UTC
I don't have time/resources to try to track the fun in -CURRENT, so I do not.

That said, thank you very much for the patch it has been applied.
Comment 6 Alexander Kabaev freebsd_committer freebsd_triage 2015-02-02 03:51:54 UTC
That's what people running -current are for :) Thanks for quick response.