From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Mar 29 08:20:01 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.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 B0606BB3 for ; Sat, 29 Mar 2014 08:20:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C22A2FE for ; Sat, 29 Mar 2014 08:20:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2T8K1V1049784 for ; Sat, 29 Mar 2014 08:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2T8K15n049783; Sat, 29 Mar 2014 08:20:01 GMT (envelope-from gnats) Resent-Date: Sat, 29 Mar 2014 08:20:01 GMT Resent-Message-Id: <201403290820.s2T8K15n049783@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "O. Hartmann" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9588CBAD for ; Sat, 29 Mar 2014 08:19:19 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 681582F9 for ; Sat, 29 Mar 2014 08:19:19 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s2T8JI8X053058 for ; Sat, 29 Mar 2014 08:19:18 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s2T8JImQ053055; Sat, 29 Mar 2014 08:19:18 GMT (envelope-from nobody) Message-Id: <201403290819.s2T8JImQ053055@cgiserv.freebsd.org> Date: Sat, 29 Mar 2014 08:19:18 GMT From: "O. Hartmann" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/188041: net-mgmt/nrpe: ./nrpe.c:(.text+0x62d): undefined reference to `get_dh512' X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2014 08:20:01 -0000 >Number: 188041 >Category: ports >Synopsis: net-mgmt/nrpe: ./nrpe.c:(.text+0x62d): undefined reference to `get_dh512' >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Mar 29 08:20:01 UTC 2014 >Closed-Date: >Last-Modified: >Originator: O. Hartmann >Release: FreeBSD 11.0-CURRENT >Organization: >Environment: FreeBSD 11.0-CURRENT #0 r263881: Fri Mar 28 20:00:34 CET 2014 amd64 >Description: 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 >How-To-Repeat: >Fix: 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. >Release-Note: >Audit-Trail: >Unformatted: