-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[compatibility] libusbx replaced by libusb-1.0 in most distros #897
Comments
This initiated a ongoing discussion in PR #895 which shall be continued here, as the related PR should solely focus on (direct) changes in the code. The beginning of this discussion is now posted here: Nightwalker-87: Reply by Vascom:
Reply by slyshykO:
Reply by Vascom:
Reply by slyshykO:
Reply by Vascom:
|
@Vascom: There are three relevant things:
|
1.0.23 pushed to Fedora rawhide now https://src.fedoraproject.org/rpms/libusbx/c/5684853d449b7fe3a81112cd59f9336fbc274319?branch=master |
That's good news for us. |
Similar result for Fedora 30 (oldest supported version): One can conclude that this is done equally in Fedora 31, so we are fine here. That's the reason why it works even without any |
@lhondareyte @DanielO: It appears you both use (or used) FreeBSD. Can you provide us some information regarding the |
Hi, |
@lhondareyte: Thx for the useful feedback. What FreeBSD-Version/Release are you on? Can you also checkout the develop branch and test-compile the stlink-tools? With this we could rule out possible regression when we merge the related PR. By now current FreeBSD Releases seem to be the only left "unknowns" (see list above). |
I am running the latest stable version (12.1p1) (almost). I tried to compile the latest snapshot and it actually failed:
Which commit/branch do you want to try exactly? About FreeBSD current (latest dev branch), I only use it on ARM platform. I'll give it a try this week-end: just try to compile only (USB support can be tricky) |
The latest To me it looks like that nobody really bothered about FreeBSD too much before, apart from very few single contributions. Beginning with v1.6.1, I want to make sure which distributions (incl. versions) work and have that put into our documentation as well to reduce continuous "cannot compile on xyz-system" issues here. I'm fed up seeing these. |
I understand but don't be worried about FreeBSD: stlink is in the ports tree (well, not the latest release) with an active maintainer. And most FreeBSD users use ports ;) |
... well it does make sense to distribute recent fixes and features to this usergroup as well, doesn't it? Old packages are no help here, especially not for available maintainers on that platform. |
Note: By setting the minimum version requirement for |
FreeBSD ships with pkg-config files for libusb-0.1, libusb-1.0 and libusb-2.0 (2.0 is a FreeBSD specific one).
This works on Linux too (for me)
|
I think we should use the newest libusb that we can. On all platforms. |
Note: There is a difference between working versions and the minimum required version . |
@DanielO: What are the exact version strings (e.g. 1.0.22, etc.)? That would be the relevant point here... |
@DanielO : yes, you're right :
|
@lhondareyte: o.O That is what I asked for, but it does not seem to help at all. I did not expect a different versioning scheme compared to the one the libusb-project uses... |
|
The |
In this issue, this is
It has nothing to do with FreeBSD. Versioning scheme for API_VERSION is the same than others OSes. And many ports use the native FreeBSD version without problems. |
So what would be a solution to this (apart from trusting on that it will run and without tracking a version on FreeBSD)? I feel uncomfortable with this as one would have to look at this special case every time a new version is published on FreeBSD and test it manually. |
I'll take a look. For short, any reference to |
This is already the case in the
No, I don't, but that is what I am looking for. If we can find out the LIBUSB_API_VERSION of the 1.0.20 package, we can compare it to the one in FreeBSD. Maybe that is another approach to determine where the codebase derived from. I would no longer like to see all these unknowns we have been dealing with up to now. As we have several tickets related to libusb issues, not having this defined clearly does not help. I feel like this is hindering maintenance in this project. |
I have made an inventory on latest officials releases:
A simple solution could be, for every OSes:
Ok on FB12 and macOS10.14 |
About
|
@lhondareyte: Excellent, and what is the |
They're all 0x01000102: It hasn't changed since that #define was added in r301957 |
@DanielO: Thx for checking! Please let us know if this changes someday. ok, so we actually have to stay on I'll do a new table for our documentation that is going to list all what we have found out by now. @slyshykO: Can you extend you PR #895 with the discussed check for windows and maybe also update the cmake routine for FreeBSD? |
I've updated the #895. Please, take a look. |
- Added info on version support - Updated compiling instructions - Updated minGW-w64 gcc-TC to v8.1.0 - Minor formatting fixes (Closes stlink-org#896, stlink-org#897, stlink-org#899)
As of March 2020 on most distros libusbx has been replaced by the maintained libusb-1.0.
This reflects the re-merging of the libusbx-project-fork back into the libusb-project (see https://github.com/libusb/libusb/wiki/FAQ#libusborg_libusbxorg_and_libusbinfo) as referenced by @slyshykO in #782. As mentioned in PR #895, I did some small research on this topic to find out about the current state of support by various distributions currently maintained.
Here is the result from https://pkgs.org/search/?q=libusb (as of Mar 2020):
1.0.23
libusbx
, but compatible, aslibusb
-codebase is used1.0.22
libusbx
, but compatible, aslibusb
-codebase is usedlibusbx
, but compatible, aslibusb
-codebase is usedlibusbx
, but compatible, aslibusb
-codebase is used1.0.21
libusbx
, but compatible, aslibusb
-codebase is used1.0.20
... older libusb versions --> would no longer be supported
Special case
... on FreeBSD
libusb
is integrated into the system:libusb
-codebase 1.0.16 - 1.0.18 usedlibusb
-codebase 1.0.16 - 1.0.18 usedlibusb
-codebase 1.0.16 - 1.0.18 usedLooking at this, we should set
libusb
1.0.20 as the minimum required version (apart from FreeBSD) to ensure widespread compatibility.The text was updated successfully, but these errors were encountered: