From nobody@FreeBSD.org  Tue Jan  1 18:27:27 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id BFE001C3
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  1 Jan 2013 18:27:27 +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 A58AC8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  1 Jan 2013 18:27:27 +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 r01IRRfx005835
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 1 Jan 2013 18:27:27 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r01IRRUc005834;
	Tue, 1 Jan 2013 18:27:27 GMT
	(envelope-from nobody)
Message-Id: <201301011827.r01IRRUc005834@red.freebsd.org>
Date: Tue, 1 Jan 2013 18:27:27 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: benchmarks/netperf 2.60 fails to compile on 10-CURRENT with clang
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         174887
>Category:       ports
>Synopsis:       benchmarks/netperf 2.60 fails to compile on 10-CURRENT with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 01 18:30:00 UTC 2013
>Closed-Date:    Wed Jan 02 22:48:01 UTC 2013
>Last-Modified:  Sun Feb 03 22:31:58 UTC 2013
>Originator:     Garrett Cooper
>Release:        10-CURRENT
>Organization:
EMC Isilon
>Environment:
FreeBSD fallout-atf-current.local 10.0-CURRENT FreeBSD 10.0-CURRENT #13: Sun Dec  9 00:23:58 PST 2012     root@fallout-atf-current.local:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
netperf 2.6 seems to compile with gcc, but not clang:

With gcc...

mv -f .deps/netrt_none.Tpo .deps/netrt_none.Po
gcc -DHAVE_CONFIG_H -I. -I..      -O2 -pipe -fno-strict-aliasing -MT netdrv_none.o -MD -MP -MF .deps/netdrv_none.Tpo -c -o netdrv_none.o netdrv_none.c
mv -f .deps/netdrv_none.Tpo .deps/netdrv_none.Po
gcc -DHAVE_CONFIG_H -I. -I..      -O2 -pipe -fno-strict-aliasing -MT netslot_none.o -MD -MP -MF .deps/netslot_none.Tpo -c -o netslot_none.o netslot_none.c
mv -f .deps/netslot_none.Tpo .deps/netslot_none.Po
gcc -DHAVE_CONFIG_H -I. -I..      -O2 -pipe -fno-strict-aliasing -MT netsys_none.o -MD -MP -MF .deps/netsys_none.Tpo -c -o netsys_none.o netsys_none.c
mv -f .deps/netsys_none.Tpo .deps/netsys_none.Po
gcc -DHAVE_CONFIG_H -I. -I..      -O2 -pipe -fno-strict-aliasing -MT netsec_none.o -MD -MP -MF .deps/netsec_none.Tpo -c -o netsec_none.o netsec_none.c
mv -f .deps/netsec_none.Tpo .deps/netsec_none.Po
gcc  -O2 -pipe -fno-strict-aliasing   -o netperf netperf.o netlib.o netsh.o nettest_bsd.o  nettest_dlpi.o nettest_unix.o  nettest_xti.o nettest_sctp.o  nettest_sdp.o nettest_omni.o  net_uuid.o dscp.o  netcpu_none.o netrt_none.o netdrv_none.o  netslot_none.o netsys_none.o netsec_none.o  -lm
nettest_unix.o: In function `recv_stream_rr':
nettest_unix.c:(.text+0x4f4): warning: warning: tempnam() possibly used unsafely; consider using mkstemp()
gcc -DHAVE_CONFIG_H -I. -I..      -O2 -pipe -fno-strict-aliasing -MT netserver.o -MD -MP -MF .deps/netserver.Tpo -c -o netserver.o netserver.c
mv -f .deps/netserver.Tpo .deps/netserver.Po
gcc  -O2 -pipe -fno-strict-aliasing   -o netserver netserver.o netlib.o netsh.o nettest_bsd.o  nettest_dlpi.o nettest_unix.o  nettest_xti.o nettest_sctp.o  nettest_sdp.o nettest_omni.o  net_uuid.o dscp.o  netcpu_none.o netrt_none.o netdrv_none.o  netslot_none.o netsys_none.o netsec_none.o  -lm
nettest_unix.o: In function `recv_stream_rr':
nettest_unix.c:(.text+0x4f4): warning: warning: tempnam() possibly used unsafely; consider using mkstemp()
Making all in doc
Making all in examples
===>  Installing for netperf-2.6.0
===>   Generating temporary packing list
===>  Checking if benchmarks/netperf already installed
Making install in src
Making install in missing
Making install in m4
test -z "/usr/local/bin" || .././install-sh -c -d "/usr/local/bin"
  install  -s -o root -g wheel -m 555 netperf netserver '/usr/local/bin'
Making install in doc
Making install in examples
test -z "/usr/local/info" || .././install-sh -c -d "/usr/local/info"
 install  -o root -g wheel -m 444 ./netperf.info '/usr/local/info'
 install-info --info-dir='/usr/local/info' '/usr/local/info/netperf.info'
install-info: warning: no info dir entry in `/usr/local/info/netperf.info'
test -z "/usr/local/man/man1" || .././install-sh -c -d "/usr/local/man/man1"
 install  -o root -g wheel -m 444 'netperf.man' '/usr/local/man/man1/netperf.1'
 install  -o root -g wheel -m 444 'netserver.man' '/usr/local/man/man1/netserver.1'
/bin/mkdir -p /usr/local/share/examples/netperf
install  -o root -g wheel -m 555 /usr/ports/benchmarks/netperf/work/netperf-2.6.0/doc/examples/arr_script /usr/local/share/examples/netperf
install  -o root -g wheel -m 555 /usr/ports/benchmarks/netperf/work/netperf-2.6.0/doc/examples/packet_byte_script /usr/local/share/examples/netperf
install  -o root -g wheel -m 555 /usr/ports/benchmarks/netperf/work/netperf-2.6.0/doc/examples/sctp_stream_script /usr/local/share/examples/netperf
install  -o root -g wheel -m 555 /usr/ports/benchmarks/netperf/work/netperf-2.6.0/doc/examples/snapshot_script /usr/local/share/examples/netperf
install  -o root -g wheel -m 555 /usr/ports/benchmarks/netperf/work/netperf-2.6.0/doc/examples/tcp_range_script /usr/local/share/examples/netperf
install  -o root -g wheel -m 555 /usr/ports/benchmarks/netperf/work/netperf-2.6.0/doc/examples/tcp_rr_script /usr/local/share/examples/netperf
install  -o root -g wheel -m 555 /usr/ports/benchmarks/netperf/work/netperf-2.6.0/doc/examples/tcp_stream_script /usr/local/share/examples/netperf
install  -o root -g wheel -m 555 /usr/ports/benchmarks/netperf/work/netperf-2.6.0/doc/examples/udp_rr_script /usr/local/share/examples/netperf
install  -o root -g wheel -m 555 /usr/ports/benchmarks/netperf/work/netperf-2.6.0/doc/examples/udp_stream_script /usr/local/share/examples/netperf
install-info --quiet /usr/local/info/netperf.info /usr/local/info/dir
install-info: warning: no info dir entry in `/usr/local/info/netperf.info'
===>   Compressing manual pages for netperf-2.6.0
===>   Registering installation for netperf-2.6.0
Installing netperf-2.6.0... done
===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/bin/netperf (USES POSSIBLY INSECURE FUNCTIONS: tempnam)
/usr/local/bin/netserver (USES POSSIBLY INSECURE FUNCTIONS: tempnam)

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
http://www.netperf.org/
===>  Cleaning for netperf-2.6.0

With clang...

cc -DHAVE_CONFIG_H -I. -I..      -O2 -pipe -fno-strict-aliasing -MT netsys_none.o -MD -MP -MF .deps/netsys_none.Tpo -c -o netsys_none.o netsys_none.c
mv -f .deps/netsys_none.Tpo .deps/netsys_none.Po
cc -DHAVE_CONFIG_H -I. -I..      -O2 -pipe -fno-strict-aliasing -MT netsec_none.o -MD -MP -MF .deps/netsec_none.Tpo -c -o netsec_none.o netsec_none.c
mv -f .deps/netsec_none.Tpo .deps/netsec_none.Po
cc  -O2 -pipe -fno-strict-aliasing   -o netperf netperf.o netlib.o netsh.o nettest_bsd.o  nettest_dlpi.o nettest_unix.o  nettest_xti.o nettest_sctp.o  nettest_sdp.o nettest_omni.o  net_uuid.o dscp.o  netcpu_none.o netrt_none.o netdrv_none.o  netslot_none.o netsys_none.o netsec_none.o  -lm
nettest_unix.o: In function `recv_stream_stream':
nettest_unix.c:(.text+0xb98): warning: warning: tempnam() possibly used unsafely; consider using mkstemp()
netlib.o: In function `demo_interval_final':
netlib.c:(.text+0x390d): undefined reference to `demo_interval_display'
netlib.o: In function `demo_stream_interval':
netlib.c:(.text+0x3971): undefined reference to `demo_interval_tick'
netlib.o: In function `demo_rr_interval':
netlib.c:(.text+0x39d1): undefined reference to `demo_interval_tick'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make: stopped in /usr/ports/benchmarks/netperf/work/netperf-2.6.0/src
*** Error code 1

Stop.
make: stopped in /usr/ports/benchmarks/netperf/work/netperf-2.6.0/src
*** Error code 1

Stop.
make: stopped in /usr/ports/benchmarks/netperf/work/netperf-2.6.0
*** Error code 1

Stop.
make: stopped in /usr/ports/benchmarks/netperf/work/netperf-2.6.0
*** Error code 1

Stop.
make: stopped in /usr/ports/benchmarks/netperf
*** Error code 1

Stop.
make: stopped in /usr/ports/benchmarks/netperf

Haven't dug into why yet, but it appears to be a code compilation issue, not a Makefile, etc issue as the log output is the same between both versions.
>How-To-Repeat:
1. Install 10-CURRENT as of Dec, 2012.
2. cd /usr/ports/benchmarks/netperf; make clean all deinstall install
>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pawel 
State-Changed-When: Wed Jan 2 22:48:00 UTC 2013 
State-Changed-Why:  
It's fixed now. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/174887: commit references a PR
Date: Wed,  2 Jan 2013 22:47:40 +0000 (UTC)

 Author: pawel
 Date: Wed Jan  2 22:47:32 2013
 New Revision: 309847
 URL: http://svnweb.freebsd.org/changeset/ports/309847
 
 Log:
   - Fix build with clang [1]
   - Use standard header
   - Convert spaces to tabs in options and descriptions
   - Spelling fixes in pkg-descr
   
   PR:		ports/174887 [1]
   Reported by:	Garrett Cooper <yaneurabeya@gmail.com> [1]
 
 Modified:
   head/benchmarks/netperf/Makefile
   head/benchmarks/netperf/pkg-descr
 
 Modified: head/benchmarks/netperf/Makefile
 ==============================================================================
 --- head/benchmarks/netperf/Makefile	Wed Jan  2 22:37:23 2013	(r309846)
 +++ head/benchmarks/netperf/Makefile	Wed Jan  2 22:47:32 2013	(r309847)
 @@ -1,4 +1,4 @@
 -# Created by:                  koshy
 +# Created by: koshy
  # $FreeBSD$
  
  PORTNAME=	netperf
 @@ -10,17 +10,18 @@ MASTER_SITES=	ftp://ftp.netperf.org/netp
  MAINTAINER=	ports@FreeBSD.org
  COMMENT=	Network performance benchmarking package
  
 -OPTIONS_DEFINE=        OMNI SCTP SOCKETS HISTOGRAM EXS
 -OPTIONS_DEFAULT=       SCTP SOCKETS HISTOGRAM EXS
 +OPTIONS_DEFINE=		OMNI SCTP SOCKETS HISTOGRAM EXS
 +OPTIONS_DEFAULT=	SCTP SOCKETS HISTOGRAM EXS
  
 -OMNI_DESC=     Enable OMNI tests
 -SCTP_DESC=     Enable SCTP support
 -SOCKETS_DESC=  Enable Unix Domain socket support
 -HISTOGRAM_DESC=        Enable optional histogram output
 -EXS_DESC=      Enable ICSC async socket support
 +OMNI_DESC=	Enable OMNI tests
 +SCTP_DESC=	Enable SCTP support
 +SOCKETS_DESC=	Enable Unix Domain socket support
 +HISTOGRAM_DESC=	Enable optional histogram output
 +EXS_DESC=	Enable ICSC async socket support
  
  .include <bsd.port.options.mk>
  
 +USE_CSTD=	gnu89
  GNU_CONFIGURE=	yes
  CONFIGURE_ENV=	"transform="
  CONFIGURE_ARGS=	--program-prefix=""  --program-suffix="" --enable-dirty \
 
 Modified: head/benchmarks/netperf/pkg-descr
 ==============================================================================
 --- head/benchmarks/netperf/pkg-descr	Wed Jan  2 22:37:23 2013	(r309846)
 +++ head/benchmarks/netperf/pkg-descr	Wed Jan  2 22:47:32 2013	(r309847)
 @@ -8,8 +8,8 @@ Some of these are:
          * specification of desired confidence levels for the tests
            Netperf will warn the user if these levels were not achieved.
          * filling send buffers with specified data (to beat compression schemes)
 -        * specification of send/recieve buffer alignments and data offsets
 -        * requesting cpu utilization and service demand calculations
 +        * specification of send/receive buffer alignments and data offsets
 +        * requesting CPU utilization and service demand calculations
          * specification of sizes of data to send
  Netperf can be used for measuring stream performance as well as
  round-trip performance.
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
