-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[question] libusb cross-compiling #9773
Comments
Hello @steffenhk ! Really good to know that someone is using Yocto with Conan! We can not use system package tools in CCI recipes, instead, we need to separate them as packages. More info https://github.com/conan-io/conan-center-index/blob/master/docs/faqs.md#can-i-install-packages-from-the-system-package-manager The libusb is old, and was outdated, now it consumed libudev from system. As you should know, libudev is hard to build separated from systemd. As it's a system library, it will not install to the target arch (maybe yes, depending the distribution and support), then, makes no sense supporting cross-building. The current change is listed here: 066ea9c But your case is different, Yocto SDK can solve libudev as dependency directly in your configuration, so you don't need to use Conan. I think a possible fix is removing that statement, making possible to cross-build libusb, but insert the condition on libudev system package, so when disabling its installation, it should not break your build. As possible workaround, I suggest you using lockfiles, so you can use the past revision, which did not have this breaking change. |
Thank you @uilianries for the quick answer. I will look into using lockfiles, to use the previous revision, as a first step. I would prefer not to have to make my own variant of the libusb conanfile. I'm still not sure I understand why it is necessary to raise that error when cross-compiling. I guess my question is why is it the responsibility of the consuming recipe (e.g. libusb) to determine if we are cross-compiling and whether dependencies (e.g. libudev) support that? I hope my question makes sense :) |
Your question makes sense. Like I said, it needs a recipe update, meanwhile, you can use lockfiles. |
@steffenhk I created the PR #9780, where those limitations are no longer managed by libusb. They should be moved to libudev package instead. |
I'm cross-building libusb for ARM using a Yocto generated SDK toolchain which provides the libudev I want to use, but the validate method in the libusb recipe does not allow cross-compiling when "enable_udev" is True.
Why is it that cross-compiling should raise an error?
https://github.com/conan-io/conan-center-index/blob/master/recipes/libusb/all/conanfile.py#L65
Since I am cross-compiling Linux:x86_64 to Linux:armv8 it worked before (when I used the "CONAN_SYSREQUIRES_MODE=disabled" env variable), but after this pull-request #7940 that no longer works, and from the comments on that pull-request it seems like that was the intention all along.
The text was updated successfully, but these errors were encountered: