From nobody@FreeBSD.org  Fri Dec  5 19:23:37 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 96E4D1065672
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  5 Dec 2008 19:23:34 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 8659E8FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  5 Dec 2008 19:23:34 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mB5JNYBj070311
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 5 Dec 2008 19:23:34 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id mB5JNX8B070298;
	Fri, 5 Dec 2008 19:23:33 GMT
	(envelope-from nobody)
Message-Id: <200812051923.mB5JNX8B070298@www.freebsd.org>
Date: Fri, 5 Dec 2008 19:23:33 GMT
From: Volker Jahns <volker@thalreit.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: libusb does not compile in FreeBSD 7.0-RELEASE
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: r.c.ladan@gmail.com

>Number:         129439
>Category:       ports
>Synopsis:       devel/libusb does not compile in FreeBSD 7.0-RELEASE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    stefan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 05 19:30:05 UTC 2008
>Closed-Date:    Thu Jan 08 12:37:46 UTC 2009
>Last-Modified:  Thu Jan 08 12:37:46 UTC 2009
>Originator:     Volker Jahns
>Release:        FreeBSD 7.0 release
>Organization:
Thalreit UNIX
>Environment:
FreeBSD caspar.thalreit 7.0-RELEASE-p5 FreeBSD 7.0-RELEASE-p5 #0: Thu Nov 20 08:49:46 CET 2008     root@caspar.thalreit:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
Compiling libusb in FreeBSD 7.0 RELEASE fails with error message

cd /usr/ports/devel/libusb && make all
--
..

 cc -DHAVE_CONFIG_H -I. -Werror -O2 -fno-strict-aliasing -pipe -Wall -MT usb.lo -MD -MP -MF .deps/usb.Tpo -c usb.c  -fPIC -DPIC -o .libs/usb.o
cc1: warnings being treated as errors
/usr/include/strings.h:44: warning: 'ffs' declared 'static' but never defined
/usr/include/strings.h:47: warning: 'fls' declared 'static' but never defined
/usr/include/string.h:62: warning: 'memcmp' declared 'static' but never defined
/usr/include/string.h:68: warning: 'memset' declared 'static' but never defined
/usr/include/string.h:74: warning: 'strchr' declared 'static' but never defined
/usr/include/string.h:101: warning: 'strrchr' declared 'static' but never defined
*** Error code 1

Stop in /usr/ports/devel/libusb/work/libusb-0.1.12.
*** Error code 1

Stop in /usr/ports/devel/libusb/work/libusb-0.1.12.
*** Error code 1

Stop in /usr/ports/devel/libusb/work/libusb-0.1.12.
*** Error code 1

Stop in /usr/ports/devel/libusb.
*** Error code 1



>How-To-Repeat:
cd /usr/ports/devel/libusb && make clean && make all
>Fix:
Fix Makefile.am and/or Makefile to have gcc treat warnings _not_ as errors
--
volker@caspar libusb-0.1.12 > diff Makefile Makefile.ORG 
260c260
< AM_CFLAGS = $(AM_CFLAGS_EXT)
---
> AM_CFLAGS = -Werror $(AM_CFLAGS_EXT)
--

>Release-Note:
>Audit-Trail:

From: Edwin Groothuis <edwin@FreeBSD.org>
To: r.c.ladan@gmail.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/129439: devel/libusb does not compile in FreeBSD 7.0-RELEASE
Date: Fri, 5 Dec 2008 23:33:33 UT

 Maintainer of devel/libusb,
 
 Please note that PR ports/129439 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/129439
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Dec 5 23:41:09 UTC 2008 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: r.c.ladan@gmail.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/129439: devel/libusb does not compile in FreeBSD 7.0-RELEASE
Date: Fri, 5 Dec 2008 23:41:08 UT

 Maintainer of devel/libusb,
 
 Please note that PR ports/129439 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/129439
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: "Rene Ladan" <r.c.ladan@gmail.com>
To: bug-followup@freebsd.org, volker@thalreit.de
Cc:  
Subject: Re: ports/129439: devel/libusb does not compile in FreeBSD 7.0-RELEASE
Date: Sat, 6 Dec 2008 20:30:34 +0100

 It builds fine for me on 7.0R/i386, 7.0R/amd64 and 7.1/amd64.
 There are no error reports on http://portsmon.freebsd.org/portserrs.py
 
 Is there anything non-standard in your environment setings or /etc/make.conf ?
 Which compiler version do you use?

From: Volker Jahns <volker@thalreit.de>
To: Rene Ladan <r.c.ladan@gmail.com>
Cc: bug-followup@freebsd.org
Subject: Re: ports/129439: devel/libusb does not compile in FreeBSD 7.0-RELEASE
Date: Sun, 07 Dec 2008 10:33:23 +0100

 Rene Ladan schrieb:
 > It builds fine for me on 7.0R/i386, 7.0R/amd64 and 7.1/amd64.
 > There are no error reports on http://portsmon.freebsd.org/portserrs.py
 >
 > Is there anything non-standard in your environment setings or /etc/make.conf ?
 > Which compiler version do you use?
 >   
 Yes, on 6.2-STABLE I do not observe this problem either.
 
 On 7.0-RELEASE libusb won't compile.
 
 The information you requested
 --
 volker@caspar ~ > gcc -dumpversion
 4.2.1
 volker@caspar ~ > gcc -dumpmachine
 i386-undermydesk-freebsd
 
 volker@caspar ~ > cat /etc/make.conf
 # added by use.perl 2008-05-28 18:27:44
 PERL_VER=5.8.8
 PERL_VERSION=5.8.8
 --
 
 however, what I am really concerned about is this error message
 --
 /usr/include/strings.h:44: warning: 'ffs' declared 'static' but never 
 defined
 /usr/include/strings.h:47: warning: 'fls' declared 'static' but never 
 defined
 /usr/include/string.h:62: warning: 'memcmp' declared 'static' but never 
 defined
 /usr/include/string.h:68: warning: 'memset' declared 'static' but never 
 defined
 /usr/include/string.h:74: warning: 'strchr' declared 'static' but never 
 defined
 /usr/include/string.h:101: warning: 'strrchr' declared 'static' but 
 never defined
 --
 gcc issues here warnings which - because of the makefile configuration - 
 leads to a fullstop in the compilation process. If the corresponding 
 configuration option is removed compilation continues and the libraries 
 created are functional ( which I have tested with a 1-Wire DS9097U USB 
 adapter). Therefore I question the configuration option -Werrors in 
 libusb's makefile.
 
 On the other hand, gcc warnings are observed whenever  source code is 
 compiled which includes the system header files <string.h> and/or 
 <strings.h>. This might be caused by outdated and/or inappropriate 
 system headers. I will look into this.
 
 -- 
 Volker Jahns, volker@thalreit.de
 

From: Stefan Walter <stefan@freebsd.org>
To: Volker Jahns <volker@thalreit.de>
Cc: Rene Ladan <r.c.ladan@gmail.com>,
	GNATS <FreeBSD-gnats-submit@FreeBSD.org>
Subject: Re: ports/129439: devel/libusb does not compile in FreeBSD
	7.0-RELEASE
Date: Wed, 7 Jan 2009 21:32:55 +0100

 Hi Volker,
 
 any news on this issue? Can you still reproduce the problem, or does
 devel/libusb compile for you now?
 
 Regards,
 Stefan

From: Volker Jahns <volker@thalreit.de>
To: Stefan Walter <stefan@freebsd.org>
Cc: Rene Ladan <r.c.ladan@gmail.com>, 
 GNATS <FreeBSD-gnats-submit@FreeBSD.org>
Subject: Re: ports/129439: devel/libusb does not compile in FreeBSD	7.0-RELEASE
Date: Thu, 08 Jan 2009 07:56:12 +0100

 Stefan Walter schrieb:
 > any news on this issue? Can you still reproduce the problem, or does
 > devel/libusb compile for you now?
 >   
 The compiler warnings which were caused by /usr/include/strings.h 
 disappeared after a fresh build and install cycle of FreeBSD. Probably 
 an earlier installation had not been finished completely.
 
 Nevertheless I do still question the gcc option in libusb which leads to 
 a halt in compilation in case any compiler warning should turn up. The 
 libusb developer should be informed and the option should be removed 
 from the Makefile.
 
 -- 
 Volker Jahns, volker@thalreit.de
 
Responsible-Changed-From-To: freebsd-ports-bugs->stefan 
Responsible-Changed-By: stefan 
Responsible-Changed-When: Thu Jan 8 09:46:20 UTC 2009 
Responsible-Changed-Why:  
Take. 

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

From: Stefan Walter <stefan@freebsd.org>
To: Volker Jahns <volker@thalreit.de>
Cc: Rene Ladan <rene@freebsd.org>, GNATS <FreeBSD-gnats-submit@freebsd.org>
Subject: Re: ports/129439: devel/libusb does not compile in FreeBSD
	7.0-RELEASE
Date: Thu, 8 Jan 2009 11:05:47 +0100

 Volker Jahns, 08.01.09, 07:56h CET:
 
 > Stefan Walter schrieb:
 > > any news on this issue? Can you still reproduce the problem, or does
 > > devel/libusb compile for you now?
 > >   
 > The compiler warnings which were caused by /usr/include/strings.h 
 > disappeared after a fresh build and install cycle of FreeBSD. Probably 
 > an earlier installation had not been finished completely.
 
 OK, thanks for the feedback!
 
 > Nevertheless I do still question the gcc option in libusb which leads to 
 > a halt in compilation in case any compiler warning should turn up. The 
 > libusb developer should be informed and the option should be removed 
 > from the Makefile.
 
 Since the problem is solved for you, I don't see the necessity to change
 it in the port now, but that decision is for Rene to make, as he's the
 port's maintainer. Rene, please let me know if you want Volker's patch to
 be applied to devel/libusb.
 
 As for changing it upstream, I would like to ask you (Volker and/or Rene)
 to contact the author if you think it would be better to change this
 behaviour.
 
 Regards,
 Stefan

From: "Rene Ladan" <rene@freebsd.org>
To: "Stefan Walter" <stefan@freebsd.org>
Cc: "Volker Jahns" <volker@thalreit.de>, 
	GNATS <FreeBSD-gnats-submit@freebsd.org>
Subject: Re: ports/129439: devel/libusb does not compile in FreeBSD 7.0-RELEASE
Date: Thu, 8 Jan 2009 12:49:11 +0100

 2009/1/8 Stefan Walter <stefan@freebsd.org>:
 > Volker Jahns, 08.01.09, 07:56h CET:
 >
 >> Stefan Walter schrieb:
 >> > any news on this issue? Can you still reproduce the problem, or does
 >> > devel/libusb compile for you now?
 >> >
 >> The compiler warnings which were caused by /usr/include/strings.h
 >> disappeared after a fresh build and install cycle of FreeBSD. Probably
 >> an earlier installation had not been finished completely.
 >
 > OK, thanks for the feedback!
 >
 >> Nevertheless I do still question the gcc option in libusb which leads to
 >> a halt in compilation in case any compiler warning should turn up. The
 >> libusb developer should be informed and the option should be removed
 >> from the Makefile.
 >
 > Since the problem is solved for you, I don't see the necessity to change
 > it in the port now, but that decision is for Rene to make, as he's the
 > port's maintainer. Rene, please let me know if you want Volker's patch to
 > be applied to devel/libusb.
 >
 > As for changing it upstream, I would like to ask you (Volker and/or Rene)
 > to contact the author if you think it would be better to change this
 > behaviour.
 >
 Since the port builds fine in the default environment (and on the portbuild
 cluster), I don't see the need for this patch.  But you can query the upstream
 authors at libusb-devel@lists.sourceforge.net if you want.
 
 Regards,
 Rene
 -- 
 http://www.rene-ladan.nl/
State-Changed-From-To: feedback->closed 
State-Changed-By: stefan 
State-Changed-When: Thu Jan 8 12:34:50 UTC 2009 
State-Changed-Why:  
Submitter reports port builds fine now, further changes to libusb should be made 
upstream. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=129439 
>Unformatted:
