[Nut-upsuser] Build 2.0.4, usb.h missing.

Peter Selinger
Tue, 12 Sep 2006 19:38:38 -0000

Hi Magnus,

I didn't understand your compiler's error message (they were not in
English).

However, it seems that you need to install libusb, version 0.1.8 or
later, before compiling nut. I wrote some instructions for setting up
NUT with the APC Back-UPS at:

http://www.mathstat.dal.ca/~selinger/ups/backups.html

-- Peter

Magnus Johansson wrote:
>
> Hi!
>
> I've got a Mandrake 2006.0 machine and a APC Back-UPS Pro 500/1000/1500
> (from lsusb). The Mandrake package version of nut is 2.0.1 and hidups
> actually detects the UPS, however I get loads of these:
>
> Sep 12 18:26:11 vader hidups[7658]: Ignoring x86 page event 0xff860080
(0> )
> Sep 12 18:26:11 vader hidups[7658]: Unhandled event: 0x840058 (6)
> Sep 12 18:26:11 vader hidups[7658]: Unhandled event: 0x8500d1 (1)
> Sep 12 18:26:11 vader hidups[7658]: Unhandled event: 0x840068 (0)
> Sep 12 18:26:11 vader hidups[7658]: Unhandled event: 0x850043 (0)
> Sep 12 18:26:11 vader hidups[7658]: Unhandled event: 0x840073 (0)
> Sep 12 18:26:11 vader hidups[7658]: Unhandled event: 0x85004b (0)
> Sep 12 18:26:11 vader hidups[7658]: Unhandled event: 0x840065 (0)
> Sep 12 18:26:11 vader hidups[7658]: Unhandled event: 0x8500db (0)
>
> Somewhere it was suggested to use newhidups and a later nut
> version, so I downloaded the 2.0.4 source and I'm trying to compile it.
> I'm using this configure line:
>
> =2E/configure --with-user=3Dnut --with-drivers=3Dnewhidups
>
> but make gets me this:
>
> make[1]: Entering directory `/usr/src/nut-2.0.4/drivers'
> gcc -I../include -O -Wall -Wsign-compare  -c newhidups.c
> In file included from newhidups.c:25:
> libhid.h:37:17: error: usb.h: Filen eller katalogen finns inte
> In file included from newhidups.c:25:
> libhid.h:159: error: syntax error before '*' token
> libhid.h:169: error: syntax error before '*' token
> libhid.h:174: error: syntax error before '*' token
> libhid.h:179: error: syntax error before '*' token
> libhid.h:184: error: syntax error before '*' token
> libhid.h:189: error: syntax error before '*' token
> libhid.h:195: error: syntax error before '*' token
> =2E
> =2E
> =2E
>
> It was suggested in this list-archive to go to the drivers directory and
> do a make depend, and it seems to do whatever it's supposed to do
> without complaining. But I still get this:
>
> [root@vader nut-2.0.4]# make
> common/
> make[1]: Entering directory `/usr/src/nut-2.0.4/common'
> make[1]: Inget beh=F6ver g=F6ras f=F6r "all".
> make[1]: Leaving directory `/usr/src/nut-2.0.4/common'
> drivers/
> make[1]: Entering directory `/usr/src/nut-2.0.4/drivers'
> make[1]: *** Ingen regel f=F6r att skapa m=E5let "usb.h", som
beh=F6vs ti> ll
> "newhidups.o".  Stannar.
> make[1]: Leaving directory `/usr/src/nut-2.0.4/drivers'
> make: *** [build] Fel 1
> [root@vader nut-2.0.4]#
>
> I also tried make usb, and that (for some reason) compiles energizerups
> but I still get the usb.h error for newhidups.o.
>
>
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser@lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
>