[Nut-upsuser] Install problems (group permissions) with nut 2.7.2
rgroner at RTD.com
Mon Mar 9 15:49:05 UTC 2015
Ok, I tried this from scratch on a fresh 2.7.2 directory. I followed the web instructions, specifically:
+ I generated the new subdriver for my UPS (rtd-hid.*) based on PATH info.
+ I put them in the drivers subdir
+ I added the include line (#include rtd-hid.h) in usbhid-ups.c (specifically in the #ifndef SHUT_MODE section)
+ I added &rtd_subdriver, to the subdriver_list in usbhid-ups.c (specifically in the #ifndef SHUT_MODE section)
+ I added "rtd-hid.c" to USBHID_UPS_SUBDRIVERS in drivers/Makefile.am
+ I added "rtd-hid.h" to dist_noinst_HEADERS in drivers/Makefile.am
+ I executed ./configure --with-usb --with-dev --etc --etc
I execute make, and I get an error:
/bin/sh ../libtool --tag=CC --mode=link gcc -I../include -g -O2 -Wall -Wsign-compare -o usbhid-ups usbhid-ups.o libhid.o libusb.o hidparser.o usb-common.o apc-hid.o belkin-hid.o cps-hid.o explore-hid.o liebert-hid.o mge-hid.o powercom-hid.o tripplite-hid.o idowell-hid.o openups-hid.o ../common/libcommon.la ../common/libparseconf.la main.o dstate.o -lusb -lpthread
libtool: link: gcc -I../include -g -O2 -Wall -Wsign-compare -o usbhid-ups usbhid-ups.o libhid.o libusb.o hidparser.o usb-common.o apc-hid.o belkin-hid.o cps-hid.o explore-hid.o liebert-hid.o mge-hid.o powercom-hid.o tripplite-hid.o idowell-hid.o openups-hid.o main.o dstate.o ../common/.libs/libcommon.a ../common/.libs/libparseconf.a -lusb -lpthread
usbhid-ups.o:(.rodata+0x110): undefined reference to `rtd_subdriver'
collect2: error: ld returned 1 exit status
make: *** [usbhid-ups] Error 1
make: Leaving directory `/home/rtd/nut-2.7.2/drivers'
I can see that somehow, somewhere, my rtd-hid.o isn't being included in that list.
I followed the same process again, but this time tried autoreconf instead of configure (I had already run ./configure once). That gave me an error message that I do not believe is related to my driver:
Parallel-tests: error: required file './test-driver' not found
Parallel-tests: 'automake --add-missing' can install 'test-driver'
Autoreconf: automake failed with exit status 1
> -----Original Message-----
> From: Charles Lepple [mailto:clepple at gmail.com]
> Sent: Monday, March 02, 2015 8:27 PM
> To: Rob Groner
> Cc: nut-upsuser List
> Subject: Re: [Nut-upsuser] Install problems (group permissions) with nut
> On Mar 2, 2015, at 12:49 PM, Rob Groner <rgroner at RTD.com> wrote:
> > Well, having spent a decent amount of time trying to get my driver file
> added into the Makefile build system (and failing), I've decided that for now,
> simply adding that one line to the openups-hid.c file and recompiling is the
> best route to go. When I can no longer live with the limited nature of the
> openups-hid driver, I'll revisit writing our own.
> I'll take this as a TODO item to make it clearer, but for later the basic
> information is here:
> "You must also add the subdriver to USBHID_UPS_SUBDRIVERS in
> drivers/Makefile.am and call "autoreconf" and/or "./configure" from the top
> level NUT directory."
> To run autoreconf, you need automake, autoconf and libtool. automake
> turns Makefile.am into Makefile.in, and the ./configure script converts
> Makefile.in to the Makefile.
> Charles Lepple
> clepple at gmail
More information about the Nut-upsuser