From nobody@FreeBSD.org  Wed Mar 11 15:35:49 2009
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 B1FD4106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Mar 2009 15:35:49 +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 856BC8FC1D
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Mar 2009 15:35:49 +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 n2BFZnuq052564
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Mar 2009 15:35:49 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n2BFZnZL052563;
	Wed, 11 Mar 2009 15:35:49 GMT
	(envelope-from nobody)
Message-Id: <200903111535.n2BFZnZL052563@www.freebsd.org>
Date: Wed, 11 Mar 2009 15:35:49 GMT
From: Ben Kelly <ben@wanderview.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [newusb] apcupsd compile broken with USB support
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         132548
>Category:       ports
>Synopsis:       [newusb] sysutils/apcupsd compile broken with USB support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    itetcu
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 11 15:40:01 UTC 2009
>Closed-Date:    Thu Mar 12 14:11:13 UTC 2009
>Last-Modified:  Thu Mar 12 14:20:02 UTC 2009
>Originator:     Ben Kelly
>Release:        8.0-CURRENT
>Organization:
>Environment:
FreeBSD vmfbsd.localdomain 8.0-CURRENT FreeBSD 8.0-CURRENT #0 r179:183: Wed Mar 11 13:53:21 GMT 2009     root@vmfbsd.localdomain:/usr/obj/usr/src/sys/VMWARE  i386

>Description:
Building apcupsd on a recent CURRENT using the new USB stack results in the following error:


  CXX   src/drivers/usb/bsd/bsd-usb.c
bsd-usb.c: In function 'int init_device(UPSINFO*, const char*)':
bsd-usb.c:101: error: aggregate 'usb_device_info devinfo' has incomplete type and cannot be defined
bsd-usb.c:104: error: 'MAXDEVNAMELEN' was not declared in this scopebsd-usb.c:111: error: 'USB_GET_DEVICEINFO' was not declared in this scope
bsd-usb.c:163: error: 'intdevname' was not declared in this scope
bsd-usb.c: In function 'int open_usb_device(UPSINFO*)':bsd-usb.c:197: error: 'MAXDEVNAMELEN' was not declared in this scope
bsd-usb.c:198: error: aggregate 'usb_device_info devinfo' has incomplete type and cannot be definedbsd-usb.c:259: error: 'USB_DEVICEINFO' was not declared in this scope
bsd-usb.c:264: error: 'MAXDEVNAMES' was not declared in this scope
bsd-usb.c:268: error: 'MAXDEVNAMES' was not declared in this scope
bsd-usb.c:269: error: ISO C++ forbids applying 'sizeof' to an expression of function type
bsd-usb.c:269: error: cannot convert 'char* (*)(__dev_t, __mode_t)' to 'char*' for argument '1' to '
char* astrncpy(char*, const char*, int)'
bsd-usb.c:270: error: ISO C++ forbids applying 'sizeof' to an expression of function type
bsd-usb.c:275: error: cannot convert 'char* (*)(__dev_t, __mode_t)' to 'const char*' for argument '2
' to 'int init_device(UPSINFO*, const char*)'
bsd-usb.c:276: error: cannot convert 'char* (*)(__dev_t, __mode_t)' to 'const char*' for argument '2
' to 'char* astrncpy(char*, const char*, int)'
gmake[5]: *** [.obj/bsd-usb.o] Error 1


I tried adding --with-generic-usb as discussed in this mail thread:

  http://docs.freebsd.org/cgi/getmsg.cgi?fetch=412215+0+archive/2009/freebsd-usb/20090215.freebsd-usb

This did not work, however, because the apcupsd configure script looks for libusb-config.  Unfortunately, the libusb port can no longer be installed when the new USB stack is in use.

Should the base system provide a libusb-config binary?
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->itetcu 
Responsible-Changed-By: itetcu 
Responsible-Changed-When: Wed Mar 11 21:51:35 UTC 2009 
Responsible-Changed-Why:  
my port 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132548 
State-Changed-From-To: open->closed 
State-Changed-By: itetcu 
State-Changed-When: Thu Mar 12 14:11:12 UTC 2009 
State-Changed-Why:  
Fixed, thanks for testing. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/132548: commit references a PR
Date: Thu, 12 Mar 2009 14:11:48 +0000 (UTC)

 itetcu      2009-03-12 14:10:55 UTC
 
   FreeBSD ports repository
 
   Modified files:
     sysutils/apcupsd     Makefile 
   Added files:
     sysutils/apcupsd/files patch-configure 
   Log:
   - fix it to work with newusb on HEAD [1] [2]
   - makefile cleanup and portlint petting.
   
   PR:             ports/132548 [1]
   Submitted by:   Ben Kelly [1], stass@ [2]
   
   Revision  Changes    Path
   1.62      +10 -4     ports/sysutils/apcupsd/Makefile
   1.3       +58 -0     ports/sysutils/apcupsd/files/patch-configure (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
