Bug 80233 - apcupsd does not build if WITH_USB=yes in /etc/make.conf
Summary: apcupsd does not build if WITH_USB=yes in /etc/make.conf
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Volker Stolz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-22 05:00 UTC by Bruce Burden
Modified: 2005-05-20 17:26 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bruce Burden 2005-04-22 05:00:47 UTC
specifying WITH_USB=yes in /etc/make.conf causes apcupsd build to fail:

gmake[3]: Entering directory `/usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/src/drivers/usb/bsd'
cc -c  -I/usr/local/include -L/usr/local/lib -Wall -I/usr/local/include -L/usr/local/lib -pthread  -I/usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/include  bsd-usb.c
In file included from bsd-usb.c:33:
hidutils.h:4:20: usbhid.h: No such file or directory
In file included from bsd-usb.c:33:
hidutils.h:32: error: parse error before "rdesc"
hidutils.h:41: error: parse error before "hid_item_t"
hidutils.h:48: error: parse error before "hid_item_t"
bsd-usb.c:50: error: parse error before "hid_item_t"
bsd-usb.c:50: warning: no semicolon at end of struct or union
bsd-usb.c:51: warning: type defaults to `int' in declaration of `USB_INFO'
bsd-usb.c:51: warning: data definition has no type or storage class
bsd-usb.c:66: error: parse error before "report_desc_t"
bsd-usb.c:66: warning: no semicolon at end of struct or union
bsd-usb.c:67: warning: type defaults to `int' in declaration of `info'
bsd-usb.c:67: warning: data definition has no type or storage class
bsd-usb.c:68: error: parse error before '}' token
bsd-usb.c:68: warning: type defaults to `int' in declaration of `USB_DATA'
bsd-usb.c:68: warning: data definition has no type or storage class
bsd-usb.c: In function `reinitialize_private_structure':
bsd-usb.c:73: error: `my_data' undeclared (first use in this function)
bsd-usb.c:73: error: (Each undeclared identifier is reported only once
bsd-usb.c:73: error: for each function it appears in.)
bsd-usb.c:73: error: parse error before ')' token
bsd-usb.c: In function `init_device':
bsd-usb.c:97: error: `my_data' undeclared (first use in this function)
bsd-usb.c:97: error: parse error before ')' token
bsd-usb.c:134: warning: implicit declaration of function `hid_use_report_desc'
bsd-usb.c:145: error: `hid_collection' undeclared (first use in this function)
bsd-usb.c:147: warning: implicit declaration of function `hid_dispose_report_desc'
bsd-usb.c: In function `open_usb_device':
bsd-usb.c:192: error: `my_data' undeclared (first use in this function)
bsd-usb.c:192: error: parse error before ')' token
bsd-usb.c: In function `usb_link_check':
bsd-usb.c:294: error: `my_data' undeclared (first use in this function)
bsd-usb.c:294: error: parse error before ')' token
bsd-usb.c: In function `pusb_ups_get_capabilities':
bsd-usb.c:346: error: `my_data' undeclared (first use in this function)
bsd-usb.c:346: error: parse error before ')' token
bsd-usb.c:347: error: `hid_item_t' undeclared (first use in this function)
bsd-usb.c:348: error: invalid operands to binary *
bsd-usb.c:365: error: `hid_feature' undeclared (first use in this function)
bsd-usb.c:366: error: `item' undeclared (first use in this function)
bsd-usb.c:375: error: `hid_input' undeclared (first use in this function)
bsd-usb.c:384: error: parse error before ')' token
bsd-usb.c:392: error: request for member `usage_code' in something not a structure or union
bsd-usb.c:393: error: request for member `unit_exponent' in something not a structure or union
bsd-usb.c:394: error: request for member `unit' in something not a structure or union
bsd-usb.c:395: error: request for member `data_type' in something not a structure or union
bsd-usb.c:396: error: request for member `item' in something not a structure or union
bsd-usb.c: In function `pusb_get_value':
bsd-usb.c:413: error: `my_data' undeclared (first use in this function)
bsd-usb.c:413: error: parse error before ')' token
bsd-usb.c:414: error: invalid operands to binary *
bsd-usb.c:428: error: request for member `item' in something not a structure or union
bsd-usb.c:433: warning: implicit declaration of function `hid_get_data'
bsd-usb.c:433: error: request for member `item' in something not a structure or union
bsd-usb.c:435: error: request for member `unit_exponent' in something not a structure or union
bsd-usb.c:439: error: request for member `data_type' in something not a structure or union
bsd-usb.c:449: error: request for member `data_type' in something not a structure or union
bsd-usb.c:451: error: request for member `unit' in something not a structure or union
bsd-usb.c: In function `pusb_ups_check_state':
bsd-usb.c:521: error: `my_data' undeclared (first use in this function)
bsd-usb.c:521: error: parse error before ')' token
bsd-usb.c: In function `pusb_ups_open':
bsd-usb.c:724: error: `my_data' undeclared (first use in this function)
bsd-usb.c:724: error: parse error before ')' token
bsd-usb.c:728: error: parse error before ')' token
bsd-usb.c: In function `pusb_write_int_to_ups':
bsd-usb.c:792: error: `my_data' undeclared (first use in this function)
bsd-usb.c:792: error: parse error before ')' token
bsd-usb.c:793: error: invalid operands to binary *
bsd-usb.c:801: error: request for member `item' in something not a structure or union
bsd-usb.c:808: error: request for member `item' in something not a structure or union
bsd-usb.c:810: warning: implicit declaration of function `hid_set_data'
bsd-usb.c:810: error: request for member `item' in something not a structure or union
bsd-usb.c:812: error: request for member `item' in something not a structure or union
bsd-usb.c:819: error: request for member `item' in something not a structure or union
bsd-usb.c:826: error: request for member `item' in something not a structure or union
gmake[3]: *** [bsd-usb.o] Error 1
gmake[3]: Leaving directory `/usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/src/drivers/usb/bsd'
cc -c  -I/usr/local/include -L/usr/local/lib -Wall -I/usr/local/include -L/usr/local/lib -pthread  -I/usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/include  usb.c
gmake[2]: *** No rule to make target `bsd/libpusb.a', needed by `libusb.a'.  Stop.
gmake[2]: Leaving directory `/usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/src/drivers/usb'
cc -c  -I/usr/local/include -L/usr/local/lib -Wall -I/usr/local/include -L/usr/local/lib -
pthread  -I/usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/include  drivers.c
ar cru libdrivers.a apcsmart/*.o
/usr/bin/ranlib libdrivers.a
touch apcsmart_stamp
ar cru libdrivers.a dumb/*.o
/usr/bin/ranlib libdrivers.a
touch dumb_stamp
ar cru libdrivers.a net/*.o
/usr/bin/ranlib libdrivers.a
touch net_stamp
gmake[1]: *** No rule to make target `usb/libusb.a', needed by `usb_stamp'.  Stop.
gmake[1]: Leaving directory `/usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/src/drivers'
cc -c  -I/usr/local/include -L/usr/local/lib -Wall -I/usr/local/include -L/usr/local/lib -pthread  -I/usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/include  apcupsd.c
cc -c  -I/usr/local/include -L/usr/local/lib -Wall -I/usr/local/include -L/usr/local/lib -pthread  -I/usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/include  apcoptd.c
cc -c  -I/usr/local/include -L/usr/local/lib -Wall -I/usr/local/include -L/usr/local/lib -pthread  -I/usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/include  apcnet.c
cc -c  -I/usr/local/include -L/usr/local/lib -Wall -I/usr/local/include -L/usr/local/lib -pthread  -I/usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/include  apcreports.c
cc -c  -I/usr/local/include -L/usr/local/lib -Wall -I/usr/local/include -L/usr/local/lib -pthread  -I/usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/include  apcaction.c
cc -c  -I/usr/local/include -L/usr/local/lib -Wall -I/usr/local/include -L/usr/local/lib -pthread  -I/usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/include  apcnis.c
cc -c  -I/usr/local/include -L/usr/local/lib -Wall -I/usr/local/include -L/usr/local/lib -pthread  -I/usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/include  apcdevice.c
cc -L/usr/local/lib -pthread  apcupsd.o apcoptd.o apcnet.o apcreports.o apcaction.o apcnis.o apcdevice.o /usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/src/drivers/libdrivers.a /usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17/src/lib/libapc.a   -lintl  -lwrap   -o apcupsd
apcupsd.o: In function `main':
apcupsd.o(.text+0x422): undefined reference to `attach_driver'
collect2: ld returned 1 exit status
gmake: *** [apcupsd] Error 1
*** Error code 2

Stop in /usr/ports/sysutils/apcupsd/work/apcupsd-3.10.17.
*** Error code 1

Stop in /usr/ports/sysutils/apcupsd.

How-To-Repeat: Add "WITH_USB=yes" to /etc/make.conf.
cd /usr/ports/sysutils/apcupsd
make

This is with apcupsd-3.10.17, with usb support.

remove/comment out "WITH_USB=yes" and apcupsd will build. But, it won't support usb...
Comment 1 Volker Stolz freebsd_committer 2005-04-23 16:04:09 UTC
State Changed
From-To: open->feedback

Please send the result of 'locate usbhid.h'. It should at least be in 
/usr/include/dev/usb/usbhid.h and /usr/include/libusbhid.h, although I couldn't 
tell why it should be missing (you have a complete base-system with includes and 
everything, right?). 


Comment 2 Volker Stolz freebsd_committer 2005-04-23 16:04:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->vs

I'll handle this
Comment 3 Volker Stolz freebsd_committer 2005-05-20 17:26:17 UTC
State Changed
From-To: feedback->closed

Port has been updated; submitter no longer has installation to test this