Bug 191148 - net-mgmt/net-snmp does not build with python support
Summary: net-mgmt/net-snmp does not build with python support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-18 07:30 UTC by Palle Girgensohn
Modified: 2014-06-23 03:36 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Palle Girgensohn freebsd_committer freebsd_triage 2014-06-18 07:30:43 UTC
net-snmp fails when adding python support:

cc -shared -pthread -Wl,-rpath,/usr/lib:/usr/local/lib -O2 -pipe -I/usr/local/include -D_WANT_IFADDR -fno-strict-aliasing build/temp.freebsd-10.0-RELEASE-amd64-2.7/netsnmp/client_intf.o -L/wrkdirs/usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2/agent/.libs -L/wrkdirs/usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2/snmplib/.libs -lm -lkvm -ldevstat -lpkg -lnetsnmp -lcrypto -lelf -lssp_nonshared -o build/lib.freebsd-10.0-RELEASE-amd64-2.7/netsnmp/client_intf.so
/usr/bin/ld: cannot find -lpkg
cc: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1
*** Error code 1


I made a trivial fix by adding LDFLAGS:

Index: Makefile
===================================================================
--- Makefile	(revision 357392)
+++ Makefile	(working copy)
@@ -42,6 +42,7 @@
 USES=		perl5
 
 CFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib
 CONFIGURE_ENV+=	PERLPROG="${PERL}" PSPROG="${PS_CMD}" SED="${SED}"
 CONFIGURE_ARGS+=--enable-shared --enable-internal-md5 \
 		--with-default-snmp-version="${DEFAULT_SNMP_VERSION}" \
Comment 1 commit-hook freebsd_committer freebsd_triage 2014-06-23 03:35:44 UTC
A commit references this bug:

Author: zi
Date: Mon Jun 23 03:35:40 UTC 2014
New revision: 358899
URL: http://svnweb.freebsd.org/changeset/ports/358899

Log:
  - Unbreak build after previous commits
  - Bump PORTREVISION

  PR:		191148
  Submitted by:	girgen@

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