Page 1 of 1

[SOLVED] Can't find libusb

PostPosted: Apr 6th, '14, 07:27
by janpihlgren
I'm trying to install phidget programs and library.
When runing ./configure I get the message:
...
checking for library containing libusb_init... no
checking for library containing usb_find_busses... no
configure: error: Missing libusb!

I have checked the lib-directory and lib64-direcktory and there are a couple of libs that maybe the ones but I think the .configure looks for just libusb.
The libs I found is:
libusb-0.1.so.4
libusb-0.1.so.4.4.4
libusb-1.0.so
libusb-1.0.so.0
libusb-1.0.so.0.1.0
libusbmuxd.so
libusbmuxd.so.1.0.8
libusbmuxd.so.2

They exist in /lib, /lib64, /usr/lib and /usr/lib64 directories.
Is there anyone that know what to do?

Re: Can't find libusb

PostPosted: Apr 6th, '14, 10:20
by martinw
When compiling from source code, you need to install the "-devel" packages for all the libraries that you will use.
Code: Select all
# urpmq -y libusb
libusb-compat0.1-devel
libusb-compat0.1-static-devel
libusb-compat0.1_4
libusb1.0-devel
libusb1.0_0
libusbmuxd-devel
libusbmuxd2
libusbredirhost-devel
libusbredirhost1
libusbredirparser-devel
libusbredirparser0
libusbx-devel-doc

I'd guess that libusb1.0-devel is the one you need in this case.

Re: Can't find libusb

PostPosted: Apr 6th, '14, 10:36
by janpihlgren
I tried this:
Code: Select all
# urpmi libusb1.0-devel
Package libusb1.0-devel-1.0.17-2.mga4.i586 is already installed


Than I again run ./configure and get this message:
Code: Select all
checking for library containing libusb_init... no
checking for library containing usb_find_busses... no
configure: error: Missing libusb!


For some reason the configurescript can't find libusb.

Re: Can't find libusb

PostPosted: Apr 6th, '14, 11:13
by claire
On a 64bit system you probably need the 64bit devel package.

Remove the libusb1.0-devel one and try again with lib64usb1.0-devel

Re: Can't find libusb

PostPosted: Apr 6th, '14, 11:16
by doktor5000
Please next time use code tags as explained in ftp://ftp5.gwdg.de/pub/linux/mandriva/m ... e_tags.ogv

Please show the output of:

Code: Select all
uname -m
rpm -qa | grep usb | sort
pkg-config --libs-only-l libusb-1.0

and as root
Code: Select all
ldconfig -p | grep usb

And in the libphidget directory run
Code: Select all
grep -i usb config.log



This is what it looks like here:

Code: Select all
checking for library containing iconv... none required
checking for library containing libusb_init... -lusb-1.0
configure: creating ./config.status
config.status: creating Makefile
config.status: creating examples/Makefile
config.status: creating libphidget21.pc
config.status: executing depfiles commands
config.status: executing libtool commands

[doktor5000@Mageia4 libphidget-2.1.8.20140319]$ grep -i usb config.log
configure:12398: checking for library containing libusb_init
/home/doktor5000/libphidget-2.1.8.20140319/conftest.c:34: undefined reference to `libusb_init'
| char libusb_init ();
| return libusb_init ();
configure:12429: gcc -o conftest -g -O2   conftest.c -lusb-1.0  -lpthread -lm -ldl  >&5
configure:12446: result: -lusb-1.0
ac_cv_search_libusb_init=-lusb-1.0
LIBS='-lusb-1.0 -lpthread -lm -ldl '
NEW_LIBUSB_FALSE='#'
NEW_LIBUSB_TRUE=''

[doktor5000@Mageia4 libphidget-2.1.8.20140319]$ rg usb
lib64gusb-devel-0.1.6-2.mga4
lib64gusb2-0.1.6-2.mga4
lib64usb-compat0.1-devel-0.1.5-2.mga4
lib64usb-compat0.1_4-0.1.5-2.mga4
lib64usb1.0-devel-1.0.17-2.mga4
lib64usb1.0_0-1.0.17-2.mga4
lib64usbmuxd2-1.0.8-4.mga4
lib64usbredirhost1-0.4.3-3.mga4
lib64usbredirparser0-0.4.3-3.mga4
libgusb2-0.1.6-2.mga4
libusb-compat0.1_4-0.1.5-2.mga4
libusb1.0_0-1.0.17-2.mga4
usb_modeswitch-2.0.1-2.mga4
usb_modeswitch-data-20130807-2.mga4
usbmuxd-1.0.8-4.mga4
usbutils-007-2.mga4
x11-driver-video-sisusb-0.9.6-5.mga4

Re: Can't find libusb

PostPosted: Apr 6th, '14, 11:34
by janpihlgren
claire:
You find the solution.
When I used mcc to install libusb ther was only .586 libs displayed.
Now I used the terminal and the following commads:
Code: Select all
urmpe libusb1.0-devel

then
Code: Select all
urpmi lib64usb1.0-devel

Then run the configuration script and make and make install.
That did the work and now I am a happy man :)
Thanks!