-
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
[package] boost/1.75.0: Apple-clang cannot cross-compile for arm64 on x86_64 hosts #4802
Comments
please open a PR with any fixes! The test not running seems normal at first glance... they are skipped when cross building conan-center-index/recipes/boost/all/test_package/conanfile.py Lines 41 to 42 in 95a1740
|
you better use |
but I agree we should prevent this error message:
I'll add a necessary sanity check, so it won't try to pass |
Hi there, Thank you in advance :) |
Hello! I'm afraid I can't tell you whether or not this is still an active issue, as I unfortunately no longer have the x86-based Apple machine that I used to cross-compile and reproduce these errors in the first place. I'll go ahead and close it accordingly; thank you for following up! |
In order to build boost for Apple silicon, I'd like to cross-compile boost libraries on my x86_64 dev machine so that I can eventually build other software with both arm64 and x86_64 versions of the library using Conan's cmake_multi generator.
While attempting to cross-compile for arm64, I ran into three issues right off the bat, and I suspect there are more lurking farther beyond.
First off, b2 needs to be told to use a 64-bit address model when the arm64 arch is specified. This check is missing.
Secondly, the to_apple_arch() conversion from the conan-package-tools library used here returns None, which causes b2 to pass "-arch None" to the compiler which then promptly fails. This should be updated with either a special case for arm64, or conan-package-tools needs to be updated to correctly handle this input (which just should just return "arm64").
Thirdly, the test_package conanfile.py needs to propagate the settings.arch value to the CMAKE_OSX_ARCHITECTURES value definition. Right now, it's being set to the host architecture (x86_64) by default.
There seem to be some other issues actually getting the tests to run, and I haven't tried to get boost::locale library to build properly yet, but that will likely have issues building as well. I am happy to create a dev branch with the fixes I indicated, but I still don't know where to go from here in debugging the tests. Let me know if there's any more information I can provide as well. Thanks!
Environment Details
Conan profile
Steps to reproduce
Logs
Click to expand log
The text was updated successfully, but these errors were encountered: