[Nut-upsuser] Gentoo Ultra USB UPS

Jonathan Dion dion.jonathan at gmail.com
Fri Aug 4 06:57:33 UTC 2006


Hello Barry,

Too bad PowerCom didn't accept to give you their HID usage table... As
if it is a confidential and very important information... Are you sure
you still want to use an UPS from such a manufacturer ?
When will manufacturer understand that linux is not just a dream or a
children game ? Some manifacturer did (like MGE), and we should
support them !

Anyway, back to your compilation problem :


On 8/3/06, Barry Fawthrop <barry at ttienterprises.org> wrote:
>
> What am I doing wrong
>
> added ultra.o
>
> I changed drivers/Makefile.in
> NEWHIDUPS_SUBDRIVERS = generic-hid.o mge-hid.o apc-hid.o  utlra.o  \
>   belkin-hid.o tripplite-hid.o
>
> added ultra.o
> drivers/Makefile.drvbuild
> newhidups.o: newhidups.c main.h ../include/common.h \
>   ../include/attribute.h ../include/config.h ../include/proto.h \
>   ../include/version.h ../include/upsconf.h dstate.h \
>   ../include/attribute.h ../include/parseconf.h ../include/upshandler.h \
>   ../include/extstate.h libhid.h ../include/config.h hidtypes.h \
>   ../include/timehead.h newhidups.h libusb.h mge-hid.h generic-hid.h \
>   apc-hid.h ultra.h belkin-hid.h tripplite-hid.h
>
> and added
>
> ultra.o: ultra.c newhidups.h ../include/config.h libhid.h hidtypes.h \
>   ../include/timehead.h ultra.h ../include/extstate.h dstate.h \
>   ../include/attribute.h ../include/parseconf.h ../include/upshandler.h \
>   ../include/common.h ../include/attribute.h ../include/config.h \
>   ../include/proto.h ../include/version.h
>
>
> newhidups.c
>
> added ultra.h
>
> #ifndef SHUT_MODE
>         #include "generic-hid.h"
>         #include "apc-hid.h"
>         #include "ultra.h"
>         #include "belkin-hid.h"
>         #include "tripplite-hid.h"
> #endif
>
> make usb gives
>  make usb
> make[1]: Entering directory `/root/svn/trunk/drivers'
> gcc -I../include -O -Wall -Wsign-compare  -c newhidups.c
> gcc -I../include -O -Wall -Wsign-compare   -c -o main.o main.c
> gcc -I../include -O -Wall -Wsign-compare   -c -o dstate.o dstate.c
> gcc -I../include -O -Wall -Wsign-compare   -c -o ../common/state.o
> ../common/state.c
> gcc -I../include -O -Wall -Wsign-compare   -c -o ../common/upsconf.o
> ../common/upsconf.c
> gcc -I../include -O -Wall -Wsign-compare   -c -o ../common/parseconf.o
> ../common/parseconf.c
> gcc -I../include -O -Wall -Wsign-compare   -c -o ../common/common.o
> ../common/common.c
> gcc -I../include -O -Wall -Wsign-compare  -c libhid.c
> gcc -I../include -O -Wall -Wsign-compare  -c libusb.c
> gcc -I../include -O -Wall -Wsign-compare -c hidparser.c
> gcc -I../include -O -Wall -Wsign-compare  -c generic-hid.c
> gcc -I../include -O -Wall -Wsign-compare  -c mge-hid.c
> gcc -I../include -O -Wall -Wsign-compare  -c apc-hid.c
> gcc -I../include -O -Wall -Wsign-compare  -c
> gcc: no input files
> make[1]: *** [utlra.o] Error 1
> make[1]: Leaving directory `/root/svn/trunk/drivers'
>
> What did I do wrong ?
>

You shouldn't modify Makefile.drvbuild, as it is automatically generated.
And please name your subdriver ultra-hid and not just ultra (just a
detail, but all subdriver names are *-hid), thank ^_^

So, as you did, add ultra-hid.o to the NEWHIDUPS_SUBDRIVERS list in
driver/Makefile.in

then run (assuming you are in the root of NUT source) :
cd drivers && make depend
cd .. && ./configure && make usb

That should do the trick ;-)

> Thanks
>
> Barry
>
>
>

Cordially,

Jonathan Dion



More information about the Nut-upsuser mailing list