Bug 197763 - net-mgmt/net-snmp: compilation fails with "undefined reference to `kd'"
Summary: net-mgmt/net-snmp: compilation fails with "undefined reference to `kd'"
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-17 15:52 UTC by Athanasios Douitsis
Modified: 2015-02-17 16:44 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (zi)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Athanasios Douitsis 2015-02-17 15:52:25 UTC
While trying to compile net-snmp inside a jail, the compilation breaks with the message:


 ./.libs/libnetsnmpmibs.so: undefined reference to `kd'
 cc: error: linker command failed with exit code 1 (use -v to see invocation)
 *** Error code 1

Unfortunately, --without-kmem-usage does not help. After eliminating mib modules one by one, I have reached the conclusion that the culprit is mib module 'ucd-snmp/memory'. Using something like:

 CONFIGURE_ARGS=--with-out-mib-modules="host ucd-snmp/memory" --without-kmem-usage

makes the compilation succeed. The host mib module has also been known to cause similar problems with jails for quite some time, also excluded. 

I understand that this is arguably not a problem with the port and should be reported upstream. However, since this is a jail-only issue related to the absence of /dev/kmem, maybe at a make config option could be added so that the user can choose a jail-friendly build.

Thanks,
Athanasios
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-02-17 15:52:25 UTC
Auto-assigned to maintainer zi@FreeBSD.org
Comment 2 Ryan Steinmetz freebsd_committer freebsd_triage 2015-02-17 16:43:54 UTC
JAIL OPTION added to the port.  Please svn up and rebuild with it enabled.
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-02-17 16:44:29 UTC
A commit references this bug:

Author: zi
Date: Tue Feb 17 16:44:01 UTC 2015
New revision: 379181
URL: https://svnweb.freebsd.org/changeset/ports/379181

Log:
  - Add JAIL OPTION to build with options that are happy for running snmpd within a jail(8)

  PR:		197763
  Submitted by:	Athanasios Douitsis <aduitsis@gmail.com>

Changes:
  head/net-mgmt/net-snmp/Makefile