From nobody@FreeBSD.org  Sat Mar 15 08:55:29 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id D83E59C3
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 15 Mar 2014 08:55:29 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id C6498F85
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 15 Mar 2014 08:55:29 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s2F8tT2B003175
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 15 Mar 2014 08:55:29 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s2F8tTsV003174;
	Sat, 15 Mar 2014 08:55:29 GMT
	(envelope-from nobody)
Message-Id: <201403150855.s2F8tTsV003174@cgiserv.freebsd.org>
Date: Sat, 15 Mar 2014 08:55:29 GMT
From: "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: net-mgmt/nrpe: 
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         187601
>Category:       ports
>Synopsis:       net-mgmt/nrpe: ./nrpe.c:(.text+0x62d): undefined reference to `get_dh512'
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    zeising
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 15 09:00:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Sun Apr 06 07:51:03 UTC 2014
>Originator:     O. Hartmann
>Release:        FreeBSD 11.0-CURRENT
>Organization:
>Environment:
11.0-CURRENT #1 r263190: Fri Mar 14 21:49:24 CET 2014 amd64
>Description:
This problem is still present:

[...]
1 warning generated.
/tmp/nrpe-11432e.o: In function `main':
./nrpe.c:(.text+0x62d): undefined reference to `get_dh512'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [nrpe] Error code 1

make[3]: stopped in /usr/ports/net-mgmt/nrpe/work/nrpe-2.15/src
1 error

make[3]: stopped in /usr/ports/net-mgmt/nrpe/work/nrpe-2.15/src
*** [all] Error code 2

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->zeising 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Mar 15 09:00:04 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: Niclas Zeising <zeising@freebsd.org>
To: bug-followup@FreeBSD.org, ohartman@zedat.fu-berlin.de
Cc:  
Subject: Re: ports/187601: net-mgmt/nrpe:
Date: Sat, 15 Mar 2014 10:04:12 +0100

 I have built this port on several machines, as well as in poudriere, and
 I can't reproduce this at all.
 Do you have any special settings in /etc/make.conf or /etc/src.conf or
 in your build environment?
 Regards!
 -- 
 Niclas Zeising

From: Niclas Zeising <zeising@freebsd.org>
To: bug-followup@FreeBSD.org, ohartman@zedat.fu-berlin.de
Cc:  
Subject: Re: ports/187601: net-mgmt/nrpe:
Date: Sat, 15 Mar 2014 10:05:51 +0100

 Also, next time, please reply to the original PR with a reminder, rather
 than opening a new PR for the same issue.
 Regards!
 -- 
 Niclas Zeising

From: "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To: Niclas Zeising <zeising@freebsd.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/187601: net-mgmt/nrpe:
Date: Sat, 15 Mar 2014 13:19:24 +0100

 --Sig_/kV+OixE30QFK7PwPOBr+Bv4
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: quoted-printable
 
 On Sat, 15 Mar 2014 10:04:12 +0100
 Niclas Zeising <zeising@freebsd.org> wrote:
 
 > I have built this port on several machines, as well as in poudriere, and
 > I can't reproduce this at all.
 > Do you have any special settings in /etc/make.conf or /etc/src.conf or
 > in your build environment?
 > Regards!
 
 I can reproduce this problem on all 11-CURRENT boxes equipted with that por=
 t. The problem
 is also well known, see URL:
 
 http://support.nagios.com/knowledgebase/faqs/index.php?option=3Dcom_content=
 &view=3Darticle&id=3D52&catid=3D35&faq_id=3D386&expand=3Dfalse&showdesc=3Dt=
 rue
 
 Could you please also report on what OS version your compilation/poudriere =
 succeeded?
 
 oh
 
 --Sig_/kV+OixE30QFK7PwPOBr+Bv4
 Content-Type: application/pgp-signature; name=signature.asc
 Content-Disposition: attachment; filename=signature.asc
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (FreeBSD)
 
 iQEcBAEBAgAGBQJTJEVQAAoJEOgBcD7A/5N84ZIIAOL/w2DrqqOikCTRjAgMV3bO
 cGh7KueamnxSyiG7au6qwdA8fafvgb7KpnCClpYJGhme2xAMcz9e8w0HZoH/xq20
 9wcLgo4tcu4poxYWc5SgzDg8N6jSA+LiLaR1RRH7oYSTRppdq8+0H74mnNtPizd4
 5ekoWck4oRf+iBqgTfH9pBCsJI/eRbZbWea8Ro1L5MfwLrknAIlm0Q7ItAqAiNPY
 Wc4SXHRzyYdxDvDx4uENpMHK9pMD35iK9sBdivUWtr+pBw6fkeDIlVwPc3EQ/lqq
 dXtsh+S8bZLxnYFWQAQQOsgT51TasiFGO56MFOHClPUar2pXMQeRzSI9bmn667k=
 =ddfo
 -----END PGP SIGNATURE-----
 
 --Sig_/kV+OixE30QFK7PwPOBr+Bv4--

From: Niclas Zeising <zeising@freebsd.org>
To: "O. Hartmann" <ohartman@zedat.fu-berlin.de>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/187601: net-mgmt/nrpe:
Date: Sat, 15 Mar 2014 13:40:00 +0100

 On 03/15/14 13:19, O. Hartmann wrote:
 > On Sat, 15 Mar 2014 10:04:12 +0100
 > Niclas Zeising <zeising@freebsd.org> wrote:
 > 
 >> I have built this port on several machines, as well as in poudriere, and
 >> I can't reproduce this at all.
 >> Do you have any special settings in /etc/make.conf or /etc/src.conf or
 >> in your build environment?
 >> Regards!
 > 
 > I can reproduce this problem on all 11-CURRENT boxes equipted with that port. The problem
 > is also well known, see URL:
 > 
 > http://support.nagios.com/knowledgebase/faqs/index.php?option=com_content&view=article&id=52&catid=35&faq_id=386&expand=false&showdesc=true
 > 
 > Could you please also report on what OS version your compilation/poudriere succeeded?
 > 
 > oh
 > 
 
 FreeBSD 10 and Current.
 Regards!
 -- 
 Niclas Zeising

From: "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/187601: net-mgmt/nrpe:
Date: Sat, 15 Mar 2014 13:59:47 +0100

 --Sig_/UARm0glDwL=5aXlm5qdT.4w
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: quoted-printable
 
 A quick workaround of the problem is to generate the obviously empty includ=
 e/dh.h file
 manually:
 
 openssl dhparam -C 512 > include/dh.h
 
 (assuming one is in the folder work/nrpe-2.15 after the failure occured). T=
 hen try
 "portmaster -C net-mgmt/nrpe".
 
 I didn't figure out what prevents the port from building on my boxes (they =
 have all a
 most recent 11-CURRENT from at least 14th March 2014).
 
 --Sig_/UARm0glDwL=5aXlm5qdT.4w
 Content-Type: application/pgp-signature; name=signature.asc
 Content-Disposition: attachment; filename=signature.asc
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (FreeBSD)
 
 iQEcBAEBAgAGBQJTJE7DAAoJEOgBcD7A/5N8h4YH/0Gt+SI5QF4S2GIEFQajzGhT
 OypPsRj5DqYP7O6LbOXhS6cO3hxP+7OSjqG9B0BWvOveylvL/jWrQ39yheW+pavN
 ZTs8I0pGJnE8dAUuYNrsYl2ESZYp/5C5mxh+tzHwogaDaoR8SM28Pgt/HUuyyphG
 g/BDvPIeyUO4oB/TnJ6jEs4ixNfiPEp6ZFKz16dzGAircLZ7/7DXxWU4kg9ENT4k
 ykmvsFTJHqTpM1Zm9V6pf3p1ttlCsSemRUSDRxntjf6CzJFGThNaJ9//T7p04OuF
 v0X/lhDzBZt3DT5qaH1g9XlZ/P9AagzOSpZZxc+VVp8EgZNEm2cSP4t7HqzDSK8=
 =alis
 -----END PGP SIGNATURE-----
 
 --Sig_/UARm0glDwL=5aXlm5qdT.4w--

From: Niclas Zeising <zeising@freebsd.org>
To: bug-followup@FreeBSD.org, ohartman@zedat.fu-berlin.de
Cc:  
Subject: Re: ports/187601: net-mgmt/nrpe:
Date: Sat, 15 Mar 2014 15:09:35 +0100

 Here is a buildlog from redports from just a couple of minutes ago:
 https://redports.org/~zeising/20140315135300-49499-186988/nrpe-2.15_1.log
 Please compare and see if you can spot any differences from your build
 env.  Also please remove all fiddling with CLFAGS, LDFLAGS, CXXFLAGS and
 possibly CPUTYPE from /etc/make.conf and see if that solves the issue.
 Regards!
 -- 
 Niclas Zeising

Date: Sat, 29 Mar 2014 08:19:18 GMT
From: "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: net-mgmt/nrpe: ./nrpe.c:(.text+0x62d): undefined reference to `get_dh512'

 Compiling or updating the port  net-mgmt/nrpe fails on all 11.0-CURRENT systems I run. This problem seems weird.
 
 The error while compiling is:
 
 [...]
 
 cc -O2 -pipe -O3 -march=native  -I/usr/include -fstack-protector -fno-strict-aliasing -I/usr/include/include/openssl -I/usr/include/include -DHAVE_CONFIG_H -I ../include -I ./../include -o nrpe ./nrpe.c ./utils.c ./acl.c -Wl,-rpath,/usr/lib:/usr/local/lib -fstack-protector -L/usr/lib  -lssl -lcrypto  -lwrap  
 ./nrpe.c:271:6: warning: implicit declaration of function 'get_dh512' is invalid in C99 [-Wimplicit-function-declaration]
                 dh=get_dh512();
                    ^
 ./nrpe.c:271:5: warning: incompatible integer to pointer conversion assigning to 'DH *' (aka 'struct dh_st *') from 'int' [-Wint-conversion]
                 dh=get_dh512();
                   ^~~~~~~~~~~~
 2 warnings generated.
 ./utils.c:151:10: warning: implicit declaration of function 'my_create_socket' is invalid in C99 [-Wimplicit-function-declaration]
                 sock = my_create_socket(ai, bind_address);
                        ^
 1 warning generated.
 /tmp/nrpe-f335b4.o: In function `main':
 ./nrpe.c:(.text+0x62d): undefined reference to `get_dh512'
 cc: error: linker command failed with exit code 1 (use -v to see invocation)
 *** [nrpe] Error code 1
 
 
 
 Reason for that seems to be an empty include/dh.h, which is included in src/nrpe.c.
 This file is supposed to contain the cleaned output of the command
 
 openssl dhparam -C 512
 
 with footer erased in favor to gain a clean C header file. I have no clue why this header is not generated on 11.0-CURRENT systems of mine. 
 
 I use the following  settings in /etc/src.conf compiling the system:
 
 #
 CPUTYPE?=               native
 #
 CFLAGS+=                -pipe -O3
 COPTFLAGS+=             -pipe -O3
 #
 # jetzt Standard
 CXXFLAGS+=              -std=c++11
 #
 WITH_CLANG_EXTRAS=      YES
 WITH_LLDB=              YES
 #
 WITH_IDEA=              YES
 #
 #WITH_BSD_GREP=         YES
 WITH_BSD_SORT=          YES
 #
 #WITH_OFED=             YES
 WITH_NAND=              YES
 #WITH_CTF=              YES
 #
 WITH_SVN=               YES
 #
 MALLOC_PRODUCTION=      YES
 
 Even avoiding any special flag an leaving compilation with default optimization flags I see the problem
 
 A workaround for me is to generate include.dh.h myself using command openssl 
 
 openssl dhparam -C 512 | sed -e '/-----BEGIN DH PARAMETERS-----/,/-----END DH PARAMETERS-----/d' > work/nrpe-2.15/include/dh.h
 
 After that, the port compiles and installs perfectly.
 
From: Niclas Zeising <zeising@freebsd.org>
To: bug-followup@FreeBSD.org, ohartman@zedat.fu-berlin.de
Subject: Re: ports/188041: net-mgmt/nrpe: ./nrpe.c:(.text+0x62d): undefined
 reference to `get_dh512&#39;
Date: Sat, 29 Mar 2014 09:40:12 +0100

 Hi!
 As stated before, I cannot reproduce this, on any version of FreeBSD.
 There is no need to open a new PR every couple of days about it.
 I've also asked you to remove anything non-standard from /etc/make.conf
 and /etc/src.conf and try again.
 Further, can you post a complete config.log and output from the compilation.
 Regards!
 -- 
 Niclas Zeising
>Unformatted:
