Closed kamikaze closed 2 years ago
Hi @kamikaze .
to my knowledge teensy_loader_cli used to be based on libusb version 0.1, which has usb.h. It used to be written in the comments in the code but can't remember where and when. Please anyone correct me if I am wrong.
Version 1.0 of libusb, which you have installed, has a new and different API from 0.1. (0.1 and 1.0 are two 'era' of the libusb library, and both are still separately used and packaged, long story )
Anyways one versatile and easy solution that allows you to use both the API of 0.1 and 1.0 (in case you will need it) is to use the package libusb-compat, look for it on your package manager, debian has it, hope gentoo too.
[ fyi what internally that package does is providing 1.0 as it is, and also providing headers and wrapper functions that provide the 0.1 API, where the internal implementation is actually done using 1.0 ]
You could uninstall your libusb-1.0.21 before installing libusb-compat
Hope it works :)
Can anyone suggest specific text to document this in the comments in the code? Ideally that text would have the exact package names or info needed for various Linux distros which don't provide this header by default.
I'll attempt to try-out cloning&compilation on the various distributions, clean install, and note down the steps.
By now on Debian,Ubuntu and ArchLinux the package libusb-compat is available in the package manager and gets the compilation done. Next I will check Red-Hat, Fedora, and Gentoo.
I will post updates and info here. Any help or request of distro to try is welcome.
why not to use newer libusb?
why not to use newer libusb?
Do you want to update the code and test throughly? I know I have much better things to do.
Hi @PaulStoffregen,
commit https://github.com/neonsoftware/teensy_loader_cli/commit/e9683457d99dc21b7fe7617e2da1140c28e9ba3f adds text to document libusb0.1 installation on various linux distros and freebsd. Please let me know if anything can be added or modified. If it is interesting to you then I'll make a pull request
I have tested it against the Linux distros by setting up a CI job that runs on Travis, this is the live badge . I have added the use of the 'latest' tag where available, so it will always check against the latest distribution release. It is in https://github.com/neonsoftware/teensy_loader_cli/commit/d0a76581d24600656f4c28b5b195b28763b5929c if you are interested, but otherwise I will keep the fork updated and let you know when newer releases break.
Regarding freebsd, I tested by creating a virtual machine with version 10.3-release, if other versions must be checked, then let me know.
If it is interesting to you then I'll make a pull request
Yes, please do, for https://github.com/neonsoftware/teensy_loader_cli/commit/e9683457d99dc21b7fe7617e2da1140c28e9ba3f
with instructions being in #31 I then guess the issue might be closed
👍 and thanks for all the good work you put in the project
Looks like there is a build error with new libusb:
I have libusb-1.0.21 installed on Gentoo