[Nut-upsuser] libusb not recognized?

Andrew Min Chang laplacezhang at 126.com
Wed Nov 16 02:13:45 UTC 2011

Hi Arnaud,

I tried libusb-0.1.0 and libusb-0.1.9. Neither of them worked.
My instiall logs attached. And here is my install sequence (log files are arranged by name):

libusb-0.1.0 log:
1. configure libusb-0.1.0:
-- File: 01-libusb-0.1.0_config.log
# ./configure --host=arm-mv5sft-linux-gnueabi --prefix=/mnt/ARM_FS
2. make libusb-0.1.0:
-- File: 02-libusb-0.1.0_make.txt
# make
3. install libusb
-- File: 03-libusb-0.1.0_makeInatall.txt
# make install
-- configure NUT
-- File: 04-NUT_config.log
# export PKG_CONFIG_PATH=/mnt/ARM_FS/lib/pkgconfig
./configure --with-usb --with-doc \
--host=arm-mv5sft-linux-gnueabi \
--prefix=/mnt/ARM_FS \
--with-usb-libs=-L/mnt/ARM_FS/lib \

Also attach sequence of installing libusb-0.1.12 with same commands, from file 05 to 08.

Any suggestions?


Best Regards,

At 2011-11-14 20:47:53,"Arnaud Quette" <aquette.dev at gmail.com> wrote:
Hi Andrew,

as told 2 times (one from myself and another one from Charles), please subscribe to the mailing list prior to posting.
Information on how to subscribe can be found at the following address:

and as told 2 times also, please use libusb 0.1 not 1.0, since we're not yet compatible with the latter.

Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/

2011/11/11 Charles Lepple <clepple at gmail.com>
[Andrew: please subscribe to the nut-upsuser list:
Also, please gzip any attached logs.]


   I downloaded NUT ver 2.6.2 and tried it on my Linux development board. when I configure and it notified me that "USB drivers requested, but libusb not found."
   Then I download libusb v1.0.8 and install it to my board, and re-configure NUT, still "USB drivers requested, but libusb not found". I look into config.log, and found that usb.h not found.
   I tried Google and install libusb-compat. Then usb.h was found, and libusb version is recognized. However, still "USB drivers requested, but libusb not found"...

Correct, NUT is only designed to work with the libusb-0.1 API (provided by libusb-compat).

   I could not fing any more solution of that. Therefore, I turn to developers. config.log is attached. Here are my hardware and software configurations:
CPU: Marvell 88E6281 with ARM926ejs
Linux ver:
cinfigure commnd:
./configure --with-usb --with-doc \
--host=arm-mv5sft-linux-gnueabi \
--prefix=/mnt/ARM_FS \

How did you install libusb-1.0? It appears that the actual .so file was not installed properly:

configure:7259: checking for libusb version via pkg-config
configure:7278: result: 0.1.12 found
configure:7281: checking for libusb cflags
configure:7298: result: -I/mnt/ARM_FS/include
configure:7301: checking for libusb ldflags
configure:7318: result: -L/mnt/ARM_FS/lib -lusb
configure:7323: checking for usb.h
configure:7323: arm-mv5sft-linux-gnueabi-gcc -c -I/mnt/ARM_FS/include    conftest.c >&5
configure:7323: $? = 0
configure:7323: result: yes
configure:7338: checking for usb_init
configure:7338: arm-mv5sft-linux-gnueabi-gcc -o conftest -I/mnt/ARM_FS/include     conftest.c -L/mnt/ARM_FS/lib -lusb   >&5
/root/uboot_NAS/cross/bin/../lib/gcc/arm-mv5sft-linux-gnueabi/4.3.2/../../../../arm-mv5sft-linux-gnueabi/bin/ld: warning: libusb-1.0.so.0, needed by /mnt/ARM_FS/lib/libusb.so, not found (try using -rpath or -rpath-link)
/mnt/ARM_FS/lib/libusb.so: undefined reference to `libusb_clear_halt'
/mnt/ARM_FS/lib/libusb.so: undefined reference to `libusb_get_device_address'
/mnt/ARM_FS/lib/libusb.so: undefined reference to `libusb_close'
/mnt/ARM_FS/lib/libusb.so: undefined reference to `libusb_unref_device'

The libusb-1.0.so.0 file should be in the same directory as libusb.so, meaning that -rpath* options shouldn't be necessary. But if there is something special about the way libusb was installed (packaging, etc.) then you might need to fiddle with those options.

  Any suggestions?

Best Regards
Andrew Chang


Nut-upsuser mailing list
Nut-upsuser at lists.alioth.debian.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20111116/4b492443/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log.tar.gz
Type: application/x-gzip
Size: 37588 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20111116/4b492443/attachment-0001.bin>

More information about the Nut-upsuser mailing list