From nobody@FreeBSD.org  Wed Mar  6 05:49:54 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id AF023DB7
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  6 Mar 2013 05:49:54 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 9EDB5242
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  6 Mar 2013 05:49:54 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r265nrnY036690
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 6 Mar 2013 05:49:53 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r265nr6I036689;
	Wed, 6 Mar 2013 05:49:53 GMT
	(envelope-from nobody)
Message-Id: <201303060549.r265nr6I036689@red.freebsd.org>
Date: Wed, 6 Mar 2013 05:49:53 GMT
From: "Eugene M. Zheganin" <eugene@zhegan.in>
To: freebsd-gnats-submit@FreeBSD.org
Subject: net-mgmt/net-snmp: cannot build on 10.0-CURRENT
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         176678
>Category:       ports
>Synopsis:       net-mgmt/net-snmp: cannot build on 10.0-CURRENT
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    zi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 06 06:00:00 UTC 2013
>Closed-Date:    Mon May 13 11:48:18 UTC 2013
>Last-Modified:  Mon Dec  9 23:10:00 UTC 2013
>Originator:     Eugene M. Zheganin
>Release:        10.0-CURRENT
>Organization:
Vivat-Retail LLC
>Environment:
FreeBSD taiga 10.0-CURRENT FreeBSD 10.0-CURRENT #1 r247150M: Mon Mar  4 17:57:07 YEKT 2013     emz@taiga:/usr/obj/usr/src/sys/TAIGADBG  amd64
>Description:
Cannot build net-mgmt/net-snmp on recent 10.0-CURRENT.

I got:

making all in /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2/agent/helpers
making all in /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2/agent/mibgroup
/bin/sh ../libtool --mode=link cc -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -pipe -g -Ufreebsd10 -Dfreebsd10=freebsd10  -DAPPLLIB_EXP="/usr/local/lib/perl5/5.12.4/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include  -I/usr/local/lib/perl5/5.12.4/mach/CORE -o snmpd snmpd.lo -L/usr/lib -lm -lkvm -ldevstat libnetsnmpagent.la libnetsnmpmibs.la ../snmplib/libnetsnmp.la -lelf -lssp_nonshared -Wl,-R/usr/local/lib/perl5/5.12.4/mach/CORE 
libtool: link: cc -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -pipe -g -Ufreebsd10 -Dfreebsd10=freebsd10 -DAPPLLIB_EXP=/usr/local/lib/perl5/5.12.4/BSDPAN -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/usr/local/lib/perl5/5.12.4/mach/CORE -o .libs/snmpd .libs/snmpd.o -Wl,-R/usr/local/lib/perl5/5.12.4/mach/CORE  -L/usr/lib ./.libs/libnetsnmpagent.so -L/usr/local/lib -L/usr/local/lib/perl5/5.12.4/mach/CORE ./.libs/libnetsnmpmibs.so /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2/agent/.libs/libnetsnmpagent.so -lwrap /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2/snmplib/.libs/libnetsnmp.so -lperl -lcrypt -lutil ../snmplib/.libs/libnetsnmp.so -lm -lkvm -ldevstat -lcrypto -lelf -lssp_nonshared  -Wl,-rpath -Wl,/usr/local/lib
./.libs/libnetsnmpagent.so: undefined reference to `netsnmp_subtree_change_prev'
./.libs/libnetsnmpagent.so: undefined reference to `netsnmp_table_dataset_delete_data'
./.libs/libnetsnmpagent.so: undefined reference to `netsnmp_subtree_change_next'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [snmpd] Error code 1

Stop in /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2/agent.


This happens because these symbols are marked as 'U' in agent_registry.o and subsequent libnetsnmpagent.so.30 for some reason. However, I'm able to build net-mgmt/net-snmp on old 10.0-CURRENT (r239937), and these symbols are marked in these files as 'T' as they should be. I have no idea why this happens. Both ports tree on these machines are identical.

I'm able to build net-snmp from sources though.
>How-To-Repeat:
Get a recent -CURRENT, install net-mgmt/net-snmp.
>Fix:
Build net-snmp from sources.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->zi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Mar 6 06:00:29 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176678 

From: "Eugene M. Zheganin" <emz@norma.perm.ru>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/176678: net-mgmt/net-snmp: cannot build on 10.0-CURRENT
Date: Wed, 06 Mar 2013 15:24:08 +0600

 Fix: makefile should be changed, so CONFIGURE_ENV would look like this
 
 CONFIGURE_ENV+= PERLPROG="${PERL}" PSPROG="${PS_CMD}" SED="${SED}"
 CFLAGS="-DNETSNMP_BROKEN_INLINE"

From: Ryan Steinmetz <zi@FreeBSD.org>
To: "Eugene M. Zheganin" <emz@norma.perm.ru>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/176678: net-mgmt/net-snmp: cannot build on 10.0-CURRENT
Date: Wed, 6 Mar 2013 07:56:58 -0500

 It seems to build OK under r247843.  Could you try updating and see if 
 the issue persists?
 
 -r
State-Changed-From-To: open->closed 
State-Changed-By: zi 
State-Changed-When: Mon May 13 11:48:17 UTC 2013 
State-Changed-Why:  
Unable to reproduce.  No response from submitter. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176678 

From: "Eugene M. Zheganin" <emz@norma.perm.ru>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/176678: net-mgmt/net-snmp: cannot build on 10.0-CURRENT
Date: Mon, 22 Jul 2013 13:34:36 +0600

 Still there on r251857.

From: Ryan Steinmetz <zi@FreeBSD.org>
To: "Eugene M. Zheganin" <eugene@zhegan.in>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/176678: net-mgmt/net-snmp: cannot build on 10.0-CURRENT
Date: Mon, 22 Jul 2013 06:57:02 -0400

 I cannot reproduce this on r252695.
 
 Are you using any non-default options?
 
 Do you have a /etc/make.conf?
 
 Thanks,
 -r

From: "Eugene M. Zheganin" <emz@norma.perm.ru>
To: Ryan Steinmetz <zi@FreeBSD.org>
Cc: "Eugene M. Zheganin" <eugene@zhegan.in>, bug-followup@FreeBSD.org
Subject: Re: ports/176678: net-mgmt/net-snmp: cannot build on 10.0-CURRENT
Date: Mon, 22 Jul 2013 17:28:32 +0600

 I do:
 
 PERL_VERSION=5.10.1
 FETCH_ARGS="-Fr"
 USE_GCC=4.2+
 WITH_DEBUG=yes
 

From: Ryan Steinmetz <zi@FreeBSD.org>
To: "Eugene M. Zheganin" <emz@norma.perm.ru>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/176678: net-mgmt/net-snmp: cannot build on 10.0-CURRENT
Date: Mon, 22 Jul 2013 08:01:11 -0400

 Please remove these and try again.  Also, perl 5.10 has been removed
 from the ports tree, so you should at least have 5.12 installed.

From: jamie.fullerton@me.com
To: bug-followup@FreeBSD.org, eugene@zhegan.in
Cc:  
Subject: Re: ports/176678: net-mgmt/net-snmp: cannot build on 10.0-CURRENT
Date: Sat, 07 Dec 2013 13:21:19 +0100

 --Apple-Mail=_2FEAE139-129A-4C9B-924B-A18500D15689
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=us-ascii
 
 Hi, just wanted to notice that I had exactly the same error under =
 FreeBSD 10.0 beta 4. I tried around with changing make.conf etc. but the =
 only thing that solved the problem was adding:
 
 CFLAGS=3D"-DNETSNMP_BROKEN_INLINE"
 
 to the Makefile.
 Maybe one point that is 'special' here is that I use a different prefix =
 and localbase than '/usr/local'.=
 
 --Apple-Mail=_2FEAE139-129A-4C9B-924B-A18500D15689
 Content-Transfer-Encoding: 7bit
 Content-Type: text/html;
 	charset=us-ascii
 
 <html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi, just wanted to notice that I had exactly the same error under FreeBSD 10.0 beta 4. I tried around with changing make.conf etc. but the only thing that solved the problem was adding:<div><br></div><div><span style="font-family: verdana, sans-serif; font-size: 11px; background-color: rgb(239, 239, 239);">CFLAGS="-DNET SNMP_BROKEN_INLINE"</span></div><div><font face="verdana, sans-serif"><span style="font-size: 11px; background-color: rgb(239, 239, 239);"><br></span></font></div><div>to the Makefile.</div><div>Maybe one point that is 'special' here is that I use a different prefix and localbase than '/usr/local'.</div></body></html>
 --Apple-Mail=_2FEAE139-129A-4C9B-924B-A18500D15689--

From: Ryan Steinmetz <zi@FreeBSD.org>
To: jamie.fullerton@me.com, bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/176678: net-mgmt/net-snmp: cannot build on 10.0-CURRENT
Date: Sat, 7 Dec 2013 17:53:54 -0500

 Is there anything else about your environment that you can tell me?
 
 net-snmp builds/installs fine.  My environment is as follows:
 -All default OPTIONS for all ports involved
 -Only net-snmp and its required dependencies were installed
 -Custom LOCALBASE/PREFIX
 -FreeBSD 10.0 beta4, amd64
 
 Anything that you can share with me that is different from the above
 would be very helpful.
 
 root@test:/usr/localbase/sbin # ./pkg info
 dialog4ports-0.1.5_2           Console Interface to configure ports
 net-snmp-5.7.2_3               An extendable SNMP implementation
 perl5-5.16.3_4                 Practical Extraction and Report Language
 pkg-1.2.1                      New generation package manager
 root@test:/usr/localbase/sbin # cat /etc/make.conf
 LOCALBASE=/usr/localbase
 PREFIX=/usr/localbase
 root@test:/usr/localbase/sbin # uname -a
 FreeBSD test 10.0-BETA4 FreeBSD 10.0-BETA4 #0 r258774: Sun Dec  1
 00:51:31 UTC 2013     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC
 amd64
 root@test:/usr/localbase/sbin #

From: "Eugene M. Zheganin" <emz@norma.perm.ru>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/176678: net-mgmt/net-snmp: cannot build on 10.0-CURRENT
Date: Tue, 10 Dec 2013 02:14:34 +0600

 Got this again on 10.0-BETA1.
 Same workaround.

From: Ryan Steinmetz <zi@FreeBSD.org>
To: "Eugene M. Zheganin" <emz@norma.perm.ru>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/176678: net-mgmt/net-snmp: cannot build on 10.0-CURRENT
Date: Mon, 9 Dec 2013 18:04:10 -0500

 Please give me details about your environment.  (build options,
 /etc/make.conf, anything that is not the default out of the box)
 
 I'm assuming there is something that is non-default about it and
 understanding what that is will be key to identifying what specifically
 is causing the issue you are seeing.
 
 -r
>Unformatted:
