net-snmp fails to lint pkg, when PREFIX != PKG_PREFIX please add -L${PKG_PREFIX} to LDFLAGS. log: You may use the following build options: DEFAULT_SNMP_VERSION="3" Default version of SNMP to use. NET_SNMP_SYS_CONTACT="nobody@nowhere.invalid" Default system contact. NET_SNMP_SYS_LOCATION="somewhere" Default system location. NET_SNMP_LOGFILE="/var/log/snmpd.log" Default log file location for snmpd. NET_SNMP_PERSISTENTDIR="/var/net-snmp" Default directory for persistent data storage. NET_SNMP_WITH_MIB_MODULE_LIST="host disman/event-mib mibII/mta_sendmail mibII/tcpTable ucd-snmp/diskio sctp-mib smux" MIBs to add to the build. NET_SNMP_WITHOUT_MIB_MODULE_LIST="" MIBs to omit from the build. ===> License BSD3CLAUSE accepted by the user ===> Fetching all distfiles required by net-snmp-5.7.2_16 for building ===> Extracting for net-snmp-5.7.2_16 => SHA256 Checksum OK for net-snmp-5.7.2.tar.gz. ===> Patching for net-snmp-5.7.2_16 ===> Applying extra patch /usr/ports/net-mgmt/net-snmp/files/extra-patch-local:Makefile.in ===> Applying FreeBSD patches for net-snmp-5.7.2_16 ===> net-snmp-5.7.2_16 depends on file: /usr/local/bin/perl5.16.3 - found ===> Configuring for net-snmp-5.7.2_16 ===> FreeBSD 10 autotools fix applied to /data/image/usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2/m4/libtool.m4 ===> FreeBSD 10 autotools fix applied to /data/image/usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2/aclocal.m4 ===> FreeBSD 10 autotools fix applied to /data/image/usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2/configure configure: loading site script /usr/ports/Templates/config.site checking what to build and install... agent apps man local mibs using default persistent mask 077 using default temporary file pattern /tmp/snmpdXXXXXX using default AgentX socket /var/agentx/master using default "enterprise.net-snmp" using default enterprise sysOID "NET-SNMP-MIB::netSnmpAgentOIDs..." using default notifications "NET-SNMP-MIB::netSnmpNotifications" using OS default send buffer size for server sockets using OS default recv buffer size for server sockets using OS default send buffer size for client sockets using OS default recv buffer size for client sockets checking Default version of SNMP to use... (cached) 3 checking System Contact Information... (cached) nobody@nowhere.invalid checking System Location... (cached) somewhere checking Location to write logfile... (cached) /var/log/snmpd.log checking Location to write persistent information... (cached) /var/net-snmp checking if I need to feed myself to ksh... no checking for grep that handles long lines and -e... (cached) /usr/bin/grep checking for egrep... (cached) /usr/bin/egrep checking for grep that handles long lines and -e... (cached) /usr/bin/grep checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel checking whether ln -s works... yes checking whether make sets $(MAKE)... yes checking for a sed that does not truncate output... (cached) /usr/bin/sed checking for file... file checking for find... find checking for whoami... whoami checking for autoconf... no checking for autoheader... no checking for perl... /usr/local/bin/perl checking for ps... /bin/ps checking for python... no checking for uname... /usr/bin/uname checking whether the Perl function system() invokes a POSIX shell... yes checking for gcc... cc checking whether the C compiler works... no configure: error: in `/data/image/usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2': configure: error: C compiler cannot create executables See `config.log' for more details ===> Script "configure" failed unexpectedly. Please report the problem to zi@FreeBSD.org [maintainer] and attach the "/data/image/usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2/config.log" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a /usr/pkgng/sbin/pkg-static info -g -Ea). *** Error code 1 Stop. make: stopped in /usr/ports/net-mgmt/net-snmp configure.log [...] configure:6847: $? = 1 configure:6867: checking whether the C compiler works configure:6889: cc -O2 -pipe -I/usr/local/include -D_WANT_IFADDR -fno-strict-aliasing -I/usr/include -L/usr/lib -lm -lkvm -ldevstat -lpkg -L/usr/local/lib conftest.c -lssp_nonshared >&5 /usr/bin/ld: cannot find -lpkg cc: error: linker command failed with exit code 1 (use -v to see invocation) configure:6893: $? = 1 configure:6931: result: no [...]
Created attachment 146897 [details] patch With this patch the package can be build.
Created attachment 146898 [details] patch previous patch did build on FreeBSD 10.0-RELEASE but not on 9.3-RELEASE extend patch for FreeBSD 9.3-RELEASE
A commit references this bug: Author: zi Date: Mon Sep 8 12:20:37 UTC 2014 New revision: 367619 URL: http://svnweb.freebsd.org/changeset/ports/367619 Log: - Fix build when PREFIX != PKG_PREFIX PR: 193358 Submitted by: dinox@ Changes: head/net-mgmt/net-snmp/Makefile