FS#30467 - [libusbx] fails to include needed symbols; not suitable replacement for libusb

Attached to Project: Arch Linux
Opened by Jon Watte (jwatte) - Thursday, 28 June 2012, 05:32 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 03 July 2012, 09:59 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Arch uses libusbx instead of libusb. Unfortunately, libusb.a doesn't contain all necessary symbols.

Additional info:
* package version(s)
libusbx-1.0.12-1

* config and/or log files etc.


Steps to reproduce:

1. pacman -Syu libusbx

2. Compile something with -I/usr/include/libusb-1.0

3. Link with -lusb

4. See failure to link with missing symbol libusb_init() (and a bunch of others).


Attached is the output of "nm /usr/lib/libusb.a" -- note all the missing libusb_ symbols:




There is apparently a lot of drama around libusb/libusbx, at least if you look at the Wiki of the fork libusbx. As it seems the main concern with libusb is "slow to release," but libusb latest release is 2012-04-24, perhaps the original is a suitable replacement if the fork isn't actually working.


This task depends upon

Closed by  Tobias Powalowski (tpowa)
Tuesday, 03 July 2012, 09:59 GMT
Reason for closing:  Fixed
Comment by Jelle van der Waa (jelly) - Thursday, 28 June 2012, 13:50 GMT
Which symbols are missing? What are you compiling?
Comment by Andreas Radke (AndyRTR) - Thursday, 28 June 2012, 13:51 GMT
Is only the static lib broken? We shouldn't even ship it. Usually it's not required in any way.
Comment by Jon Watte (jwatte) - Thursday, 28 June 2012, 20:29 GMT
The file I included shows that the problem is with both the static and dynamic library
It also shows that /all/ the documented libusb_ symbols are undefined
Congfiguring and installing libusb-1.0.9 (not x) produces a working lset of libraries.
Comment by Tobias Powalowski (tpowa) - Friday, 29 June 2012, 17:08 GMT
1.0.12-2 disabled static lib.
Comment by Tobias Powalowski (tpowa) - Tuesday, 03 July 2012, 07:09 GMT
Ludovic Rousseau wrote on libusbx-devel list:
Why is the lib called libusb.a and not libusb-1.0.a?

My hypothesis is that libusb.a comes from libusb-compat and is not
(statically) linked with libusb (or libusbx). So of course all the
libusb-1.0 symbols are missing.
Can you check that?

Another good idea is to NOT distribute a static lib. Only the dynamic
.so should be provided. But that is not the problem.

Bye
Comment by Tobias Powalowski (tpowa) - Tuesday, 03 July 2012, 09:58 GMT
static libs removed from libusb-compat.

Loading...