find_package(Iconv) fails when external iconv implementations is provided as CFLAGS/LDFLAGS #429
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi#429
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reported at: https://github.com/libusb/hidapi/pull/426
Failed sample: https://github.com/openwrt/packages/actions/runs/2477509891
@neheb would it be possible to see the content of:
Maybe you can run the build locally or so.
And the content of:
I wounder what CMake tries (and fails) to find there.
Looks like this is a very specific case, during the cross-compilation, and when iconv is cross-compiled as well, and passed to CMake build externally.
This might be an issue specific to openwrt build infrastructure.
@Youw https://gist.github.com/neheb/6f4ff891702e36f003136d1d448d78e9
First paste is Error, then Output.
Problem analysis:
From the logs I can tell that openwrt doesn't follow minimal guidelines for CMake cross-compilation - no propper toolchain or specifying paths/environment to the libraries, the way CMake can recognize it.
One way of fixing it on the environment side is to set the
CMAKE_PREFIX_PATHto:/home/mangix/devstuff/openwrt/staging_dir/target-mips_24kc_musl/usr;/home/mangix/devstuff/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libiconv-full;/home/mangix/devstuff/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libintl-full.But that way, obviously, requres changes to
cmake.mk(maybe even more), which I don't expect to be done any time soon.Making a library-specific (Iconv) fix for HIDAPI only at
hidapi/Makefileglobally doesn't make much sense, because it is not the first cmake build/package that is broken that way as far as I can tell.On the bright side:
I can make a workaround on the HIDAPI side, so the Iconv will be found by HIDAPI/CMake even if CMake fails to do so by default (at least in the environment I see in openwrt).
That'd be great.