conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
960 stars 1.77k forks source link

[libusb] libusb/1.2.3: build fails on Android #5675

Open chgans opened 3 years ago

chgans commented 3 years ago

Package and Environment Details (include every applicable attribute)

Steps to reproduce (Include if Applicable)

Try to install libusb/1.2.3 using

conan install . --build missing --profile:host=default --profile:build=build

Fails b/c udev is not available, disabling udev via options fails b/c disabling udev is not a valid option (it actually is)

Not sure if i'm doing it wrong.

Logs (Include/Attach if Applicable)

Click to expand log ``` conan@c832a96ac876:/home/chgans/Projects/neon/conan-get-started$ conan install . --build missing --profile:host=default --profile:build=build Configuration (profile_host): [settings] arch=armv8 arch_build=x86_64 build_type=Release compiler=clang compiler.libcxx=libc++ compiler.version=8 os=Android os.api_level=21 os_build=Linux [options] [build_requires] [env] Configuration (profile_build): [settings] arch=x86_64 compiler=clang compiler.libcxx=libc++ compiler.version=8 os=Linux [options] [build_requires] [env] ... checking for library containing clock_gettime... none required checking libudev.h usability... no checking libudev.h presence... no checking for libudev.h... no configure: error: udev support requested but libudev header not installed libusb/1.0.23: libusb/1.0.23: ERROR: Package '3cc1debdebdc6ad0796bb6699c1ec121d98add89' build failed libusb/1.0.23: WARN: Build folder /home/conan/.conan/data/libusb/1.0.23/_/_/build/3cc1debdebdc6ad0796bb6699c1ec121d98add89 ERROR: libusb/1.0.23: Error in build() method, line 113 autotools = self._configure_autotools() while calling '_configure_autotools', line 101 self._autotools.configure(args=configure_args, configure_dir=self._source_subfolder) ConanException: Error 1 while executing source_subfolder/configure '--disable-shared' '--enable-static' '--prefix=/home/conan/.conan/data/libusb/1.0.23/_/_/package/3cc1debdebdc6ad0796bb6699c1ec121d98add89' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--datarootdir=${prefix}/share' --build=x86_64-linux-gnu --host=aarch64-linux-android ``` Now, conan inspect: ``` conan@c832a96ac876:/home/chgans/Projects/neon/conan-get-started$ conan inspect libusb/1.0.23 | grep -B1 udev options: enable_udev: [True, False] -- default_options: enable_udev: True ``` Adding `libusb:enable_udev=False` in options of conanfile: ``` conan@c832a96ac876:/home/chgans/Projects/neon/conan-get-started$ conan install . --build missing --profile:host=default --profile:build=build Configuration (profile_host): [settings] arch=armv8 arch_build=x86_64 build_type=Release compiler=clang compiler.libcxx=libc++ compiler.version=8 os=Android os.api_level=21 os_build=Linux [options] [build_requires] [env] Configuration (profile_build): [settings] arch=x86_64 compiler=clang compiler.libcxx=libc++ compiler.version=8 os=Linux [options] [build_requires] [env] WARN: mosquitto/1.6.12: requirement openssl/1.1.1i overridden by your conanfile to openssl/1.1.1k ERROR: libusb/1.0.23: option 'enable_udev' doesn't exist Possible options are ['shared', 'fPIC'] ```
SpaceIm commented 3 years ago

Please follow the issue template:

chgans commented 3 years ago

Maybe you should review your templates, right now it's a pain to report issues. It's a real pain to fill all these manual parameters, you need to keep repeating yourself over and over. Reporting an issue should be easy, straight to the point.

The title has too many parameters, it is redundant with the logs (as it starts w/ dumping the profile). Reporting a bug should be easy and straight forward, why do i need to spend half an hour filling all these fields?

SpaceIm commented 3 years ago

Maybe you should review your templates, right now it's a pain to report issues. It's a real pain to fill all these manual parameters, you need to keep repeating yourself over and over. Reporting an issue should be easy, straight to the point.

The title has too many parameters, it is redundant with the logs (as it starts w/ dumping the profile). Reporting a bug should be easy and straight forward, why do i need to spend half an hour filling all these fields?

I'm just a contributor, but honestly it takes 2 minutes to fill an issue.

For the issue itself, enable_udev option can't be enabled right now if host is Android, because a proper libudev recipe is missing in CCI. It works only for native build on Linux because libusb recipe can rely on system installed libudev. https://github.com/conan-io/conan-center-index/pull/6403 may improve the error message when you try to enable udev in libusb, but doesn't solve your issue. If you want, you can contribute to a libudev recipe building from source.

SSE4 commented 3 years ago

Maybe you should review your templates, right now it's a pain to report issues. It's a real pain to fill all these manual parameters, you need to keep repeating yourself over and over. Reporting an issue should be easy, straight to the point.

The title has too many parameters, it is redundant with the logs (as it starts w/ dumping the profile). Reporting a bug should be easy and straight forward, why do i need to spend half an hour filling all these fields?

I agree, reporting issues should be an easy. if we can improve template, let's improve it, why not