[SOLVED] Can't find libusb

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] Can't find libusb

Postby janpihlgren » Apr 6th, '14, 07:27

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?
Last edited by janpihlgren on Apr 6th, '14, 11:35, edited 1 time in total.
User avatar
janpihlgren
 
Posts: 294
Joined: Mar 30th, '11, 12:23
Location: Marsta, Sweden

Re: Can't find libusb

Postby martinw » Apr 6th, '14, 10:20

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.
martinw
 
Posts: 608
Joined: May 14th, '11, 10:59

Re: Can't find libusb

Postby janpihlgren » Apr 6th, '14, 10:36

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.
Last edited by doktor5000 on Apr 6th, '14, 11:04, edited 1 time in total.
Reason: added code tags, to improve on clarity
User avatar
janpihlgren
 
Posts: 294
Joined: Mar 30th, '11, 12:23
Location: Marsta, Sweden

Re: Can't find libusb

Postby claire » Apr 6th, '14, 11:13

On a 64bit system you probably need the 64bit devel package.

Remove the libusb1.0-devel one and try again with lib64usb1.0-devel
Help to make Mageia! Get involved.. Please come and join us
claire
 
Posts: 161
Joined: May 28th, '11, 19:17
Location: UK

Re: Can't find libusb

Postby doktor5000 » Apr 6th, '14, 11:16

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
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18067
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can't find libusb

Postby janpihlgren » Apr 6th, '14, 11:34

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!
User avatar
janpihlgren
 
Posts: 294
Joined: Mar 30th, '11, 12:23
Location: Marsta, Sweden


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest