[Nut-upsuser] libusb not recognized?

Andrew Min Chang laplacezhang at 126.com
Mon Nov 14 02:09:34 UTC 2011

At 2011-11-11 20:59:09,"Charles Lepple" <clepple at gmail.com> wrote:
>[Andrew: please subscribe to the nut-upsuser list:
>Also, please gzip any attached logs.]
>>  Hello,
>>     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
>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  
>/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?
>>    Thanks!
>> Best Regards
>> --
>> Andrew Chang
>> 2011-11-09
>> <config.log>

Hi, Chaies

Here are my install sequence and logs.

1. Installing libusb:
# ./configure --host=arm-mv5sft-linux-gnueabi --prefix=/mnt/ARM_FS

> /* "/mnt/ARMFS" is my ARM board's NFS directory */
> config.log remaned as "libusb_config.log" and attached
# make
> print message "libusb_make.txt"
# make install
> print message  "libusb_install.txt"

2. installing libusb-compat
# export PKG_CONFIG_PATH=/mnt/ARM_FS/lib/pkgconfig
# ./configure --host=arm-mv5sft-linux-gnueabi --prefix=/mnt/ARM_FS
> config.log remaned as "libusb-c_config.log"
# make
> "libusb-C_make.txt"
# make install
> "libusb-C_install.txt"

3. configure NUT
./configure --with-usb --with-doc \
--host=arm-mv5sft-linux-gnueabi \
--prefix=/mnt/ARM_FS \
--with-usb-libs=-L/mnt/ARM_FS/lib \
> "NUT_config.log" attached

all file marked by ">" are gzipped and attached

Do you mean that I used inappropriate libusb? Actually, I am quite confused by libusb and libusb-compat.

Best Regards
Andrew Chang

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

More information about the Nut-upsuser mailing list