-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[libcap] Build error on arm-linux #35661
Comments
"BUILD_CC=touch a.out | touch conftest | true" seems weird and predictably doesn't output anything useful |
This is intentional. Ports are not allow to build host binaries while building for another target triplet. Based on this pattern, the port is designed to not need to build and run
|
This is a side effect of the change made to linux.cmake file in the scripts/toolchains folder. It now assumes that all arm or arm64 builds are cross-compile builds, even on arm or arm64 hosts. Adding the x86_64 check back fixes this issue. Would adding a test for ARM, instead of x86_64, in both the arm and arm64 conditions work? if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(arm|aarch64)") |
Simple question again: |
I notice that the last sentence doesn't match the actual behavior of vcpkg/scripts/cmake/vcpkg_configure_make.cmake Lines 378 to 386 in 0e47c19
#35084 only made this visible. I see the proper fix in updating vcpkg_configure_make :(also) use the host tool as <tool>_FOR_BUILD when not VCPKG_CROSSCOMPILING . CC @Neumann-A
|
As immediate workaround, you can try replacing |
For me, both the host triplet and target triplet are arm64-linux. I am compiling on a Raspberry PI 4 running Ubuntu 22.04. |
Thanks - Can you also try the proposed workaround? |
It does work. That is what I originally did to get by. But with the current linux.cmake, the compiler choice is aarch64-linux-gnu-gcc and not cc. In my case that is fine because they point to the same compiler. But would there be some instances that would not be the case? |
There might be the situation that the prefixed variant doesn't exist for the native cc. |
Package: libcap:arm-linux -> 2.69#2
Host Environment
vcpkg-scripts version: 3f3d8b0 2023-12-12 (22 hours ago)
To Reproduce
vcpkg install
Failure logs
/home/igor/drawme/src/vcpkg/buildtrees/libcap/build-arm-linux-dbg-err.log
/home/igor/drawme/src/vcpkg/buildtrees/libcap/build-arm-linux-dbg-out.log
Additional context
vcpkg.json
The text was updated successfully, but these errors were encountered: