# multimedia/pwcbsd broken by (premature?) usb2 updates



## EasyTarget (May 28, 2009)

Hi, yesterdays commit to the multimedia/pwcbsd port (driver for some USB webcam devices from Philips and others) v1.4.1_2 has added USB2 (USB4BSD) support, but broken building on existing systems.

As far as I know USB2 is only in -CURRENT (FreeBSD 8), if what I see here and here is correct. 

It's not exactly a high turnover port, so I can live with it not compiling and rely on the old version for the time being. I'm not a portage expert, but surely ports should compile for the released versions of the OS as well as planned future ones ;-)

Here is the make output in full on my i386 7.2-RELEASE system.

```
calvin# pwd
/usr/ports/multimedia/pwcbsd
calvin# make
===>  Building for pwcbsd-1.4.1_2
make -f Makefile.kld all
Warning: Object directory not changed from original /usr/ports/multimedia/pwcbsd/work/pwcbsd
cc -O2 -fno-strict-aliasing -pipe -march=pentium4  -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc   -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c pwc.c
In file included from pwc.c:27:
pwc.h:47:31: error: dev/usb/usb_mfunc.h: No such file or directory
pwc.h:48:31: error: dev/usb/usb_error.h: No such file or directory
pwc.h:50:30: error: dev/usb/usb_core.h: No such file or directory
pwc.h:51:31: error: dev/usb/usb_debug.h: No such file or directory
pwc.h:52:32: error: dev/usb/usb_lookup.h: No such file or directory
pwc.h:53:30: error: dev/usb/usb_util.h: No such file or directory
pwc.h:54:32: error: dev/usb/usb_busdma.h: No such file or directory
pwc.h:55:33: error: dev/usb/usb_request.h: No such file or directory
pwc.h:80:5: warning: "USB_DEBUG" is not defined
pwc.c:62: error: array type has incomplete element type
pwc.c:63: error: array index in non-array initializer
pwc.c:63: error: (near initialization for 'pwc_config')
pwc.c:64: error: field name not in record or union initializer
pwc.c:64: error: (near initialization for 'pwc_config')
pwc.c:65: error: field name not in record or union initializer
pwc.c:65: error: (near initialization for 'pwc_config')
pwc.c:65: error: 'UE_ADDR_ANY' undeclared here (not in a function)
pwc.c:66: error: field name not in record or union initializer
pwc.c:66: error: (near initialization for 'pwc_config')
pwc.c:67: error: field name not in record or union initializer
pwc.c:67: error: (near initialization for 'pwc_config')
pwc.c:68: error: field name not in record or union initializer
pwc.c:68: error: (near initialization for 'pwc_config')
pwc.c:69: error: field name not in record or union initializer
pwc.c:69: error: (near initialization for 'pwc_config')
pwc.c:69: error: field name not in record or union initializer
pwc.c:69: error: (near initialization for 'pwc_config')
pwc.c:70: error: field name not in record or union initializer
pwc.c:70: error: (near initialization for 'pwc_config')
pwc.c:73: error: array index in non-array initializer
pwc.c:73: error: (near initialization for 'pwc_config')
pwc.c:74: error: field name not in record or union initializer
pwc.c:74: error: (near initialization for 'pwc_config')
pwc.c:75: error: field name not in record or union initializer
pwc.c:75: error: (near initialization for 'pwc_config')
pwc.c:76: error: field name not in record or union initializer
pwc.c:76: error: (near initialization for 'pwc_config')
pwc.c:77: error: field name not in record or union initializer
pwc.c:77: error: (near initialization for 'pwc_config')
pwc.c:78: error: field name not in record or union initializer
pwc.c:78: error: (near initialization for 'pwc_config')
pwc.c:79: error: field name not in record or union initializer
pwc.c:79: error: (near initialization for 'pwc_config')
pwc.c:79: error: field name not in record or union initializer
pwc.c:79: error: (near initialization for 'pwc_config')
pwc.c:80: error: field name not in record or union initializer
pwc.c:80: error: (near initialization for 'pwc_config')
pwc.c:84: error: array type has incomplete element type
pwc.c:85: warning: implicit declaration of function 'USB_VPI'
pwc.c: In function 'pwc_probe':
pwc.c:145: error: dereferencing pointer to incomplete type
pwc.c:145: error: 'USB_MODE_HOST' undeclared (first use in this function)
pwc.c:145: error: (Each undeclared identifier is reported only once
pwc.c:145: error: for each function it appears in.)
pwc.c:152: error: dereferencing pointer to incomplete type
pwc.c:155: warning: implicit declaration of function 'usb2_lookup_id_by_uaa'
pwc.c:155: warning: nested extern declaration of 'usb2_lookup_id_by_uaa'
pwc.c: In function 'pwc_attach':
pwc.c:169: warning: implicit declaration of function 'device_set_usb2_desc'
pwc.c:169: warning: nested extern declaration of 'device_set_usb2_desc'
pwc.c:173: error: dereferencing pointer to incomplete type
pwc.c:174: warning: implicit declaration of function 'USB_GET_DRIVER_INFO'
pwc.c:174: warning: nested extern declaration of 'USB_GET_DRIVER_INFO'
pwc.c:175: error: dereferencing pointer to incomplete type
pwc.c:180: error: dereferencing pointer to incomplete type
pwc.c:181: error: dereferencing pointer to incomplete type
pwc.c:184: error: dereferencing pointer to incomplete type
pwc.c: In function 'pwc_detach':
pwc.c:296: warning: implicit declaration of function 'usb2_transfer_unsetup'
pwc.c:296: warning: nested extern declaration of 'usb2_transfer_unsetup'
pwc.c: In function 'pwc_open':
pwc.c:324: warning: unused variable 'unit'
pwc.c: In function 'pwc_close':
pwc.c:460: warning: implicit declaration of function 'usb2_set_alt_interface_index'
pwc.c:460: warning: nested extern declaration of 'usb2_set_alt_interface_index'
pwc.c:437: warning: unused variable 'unit'
pwc.c: In function 'pwc_read':
pwc.c:478: warning: unused variable 'unit'
pwc.c: In function 'pwc_try_video_mode':
pwc.c:619: error: 'USB_ERR_NORMAL_COMPLETION' undeclared (first use in this function)
pwc.c:625: warning: implicit declaration of function 'usb2_transfer_setup'
pwc.c:625: warning: nested extern declaration of 'usb2_transfer_setup'
pwc.c:632: warning: implicit declaration of function 'usb2_transfer_start'
pwc.c:632: warning: nested extern declaration of 'usb2_transfer_start'
pwc.c: In function 'pwc_isoc_rx_callback':
pwc.c:680: warning: implicit declaration of function 'USB_GET_STATE'
pwc.c:680: warning: nested extern declaration of 'USB_GET_STATE'
pwc.c:681: error: 'USB_ST_TRANSFERRED' undeclared (first use in this function)
pwc.c:682: error: dereferencing pointer to incomplete type
pwc.c:686: error: 'USB_ST_SETUP' undeclared (first use in this function)
pwc.c:688: error: dereferencing pointer to incomplete type
pwc.c:689: error: dereferencing pointer to incomplete type
pwc.c:689: error: dereferencing pointer to incomplete type
pwc.c:691: error: dereferencing pointer to incomplete type
pwc.c:691: error: dereferencing pointer to incomplete type
pwc.c:692: warning: implicit declaration of function 'usb2_start_hardware'
pwc.c:692: warning: nested extern declaration of 'usb2_start_hardware'
pwc.c:695: error: dereferencing pointer to incomplete type
pwc.c:695: error: 'USB_ERR_CANCELLED' undeclared (first use in this function)
pwc.c: In function 'pwc_isoc_handler':
pwc.c:729: error: dereferencing pointer to incomplete type
pwc.c:730: error: dereferencing pointer to incomplete type
pwc.c:743: warning: implicit declaration of function 'usb2_copy_out'
pwc.c:743: warning: nested extern declaration of 'usb2_copy_out'
pwc.c:743: error: dereferencing pointer to incomplete type
*** Error code 1

Stop in /usr/ports/multimedia/pwcbsd/work/pwcbsd.
*** Error code 1

Stop in /usr/ports/multimedia/pwcbsd/work/pwcbsd.
*** Error code 1

Stop in /usr/ports/multimedia/pwcbsd.
*** Error code 1

Stop in /usr/ports/multimedia/pwcbsd.
calvin#
```

I'm know I'm being a bit dense, but I could not work out where to post a bug report against this. I was not sure if send-pr is appropriate for ports related issues and was afraid of getting badly flamed :\


----------



## SirDice (May 28, 2009)

EasyTarget said:
			
		

> I'm know I'm being a bit dense, but I could not work out where to post a bug report against this. I was not sure if send-pr is appropriate for ports related issues and was afraid of getting badly flamed :\


It is and you won't 

As far as I can tell no-one has filed a PR about this yet.

http://www.freebsd.org/support/bugreports.html

There are a few old and closed ones. Have a look at them anyway, use them as examples if you have too.

http://www.freebsd.org/cgi/query-pr...&multitext=&originator=&closedtoo=on&release=


----------



## EasyTarget (May 28, 2009)

SirDice; Bedankt! I've submitted a PR, once I get the confirmation with the PR number I'll post it back here. 
- Currently I'm getting (in maillog) _stat=Deferred: 450 4.7.1 <FreeBSD-gnats-submit@freebsd.org>: Recipient address rejected: Service is unavailable _ I'll submit via the web if the mail eventually bounces.


----------



## EasyTarget (May 28, 2009)

Ok, it eventually went through..

PR is: ports/135028


----------



## DutchDaemon (May 28, 2009)

Greylisting in place, most likely.


----------



## phoenix (May 28, 2009)

DutchDaemon said:
			
		

> Greylisting in place, most likely.



Yeah, they implemented it on the PR servers about a year-ish ago.  Threw me for a loop when submitting port updates as I thought my SMTP setup was b0rked.  Wasted a good weekend before realising what was happening.


----------



## EasyTarget (May 28, 2009)

Wonderfully efficient crew here, this is already fixed in the ports  I just cvsup'd and it built fine! Big cludos to the maintainer.

I'd forgotten about greylisting, useful to know.


----------

