-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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.85.0: Cannot compile for Android #24915
Comments
I also ran into this today. According to the Conan documentation, this should work. It looks like In summary, my workaround is to add this section to my Conan profile:
Ideally, Conan should either infer these automatically, or the documentation should be fixed to provide a fully functional Conan profile. EDIT: I changed |
You have to consider there is no B2 generator available in Conan (there is an open PR for that). So, any customization should be listed in the Boost recipe directly. When using android-ndk, those extra variables are configured already, including the compiler: https://github.com/conan-io/conan-center-index/blob/master/recipes/android-ndk/all/conanfile.py#L300 So, in case using
I would not see it as a bug, but a misconfiguration from your environment. Please, add |
@uilianries Thanks for the reply!
Makes sense, though this would be a documentation bug then. cjserio and I were just copying the Conan documentation. Any chance a functional profile could be listed on that page? In fact, mentioning CCI's android-ndk package there would also be useful, though personally I would prefer an example that works with a manually installed NDK. So ideally we'd have both: One example profile that works with manual installs, and a simpler one that uses android-ndk as a tool requirement? |
Yes thank you so much! I was just going to comment that the docs make no mention of using the NDK as a tool_requires. I was following the docs and pointing the path to my local NDK path which was really clunky because other developers and our CI/CD runners have it installed in different locations. Changing my profile to:
has made this much simpler and of course Boost builds properly now. |
@uilianries You said
I didn't notice it until now as I didn't need that to properly compile Boost. All I needed to do was stop hard coding my NDK path and just use the tool_requires with the android-ndk, but now I'm trying to compile freetype/2.13.2 on Android and it's failing because meson is sticking a sys_root path in front of all of my cached conan include paths so nothing's working. I don't mean to hijack this topic but can you either explain more about this compiler_executables or offer a working and complete example of what an Android profile should look like? |
In my attempt to be a good citizen I started a new thread here: #25342 |
Description
I'm experiencing two issues. The first is that when I try to compile with the profile included in this report, I get these assembly errors:
The second issue is that if I disable all of the components (such as context) to get past these error and get boost to compile, when my android app tries to link, I still get these errors:
I've made sure the linker log is showing that I'm linking against the serialization library. The library exists in the proper location...it just doesn't seem to accept the library for some reson.
Package and Environment Details
Conan profile
[settings]
arch=armv8
os=Android
os.api_level=24
compiler=clang
compiler.version=14
compiler.libcxx=c++_static
compiler.cppstd=20
[conf]
tools.android:ndk_path={{ os.getenv("ANDROID_NDK_ROOT") }}
Steps to reproduce
conan install --requires=boost/1.85.0 --profile=android_profile --build=missing
Logs
The text was updated successfully, but these errors were encountered: