-
Notifications
You must be signed in to change notification settings - Fork 85
cmake(android): skip linking -lpthread on Android #372
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you be open to adding a ci-android.yml file to make android and official build target?
fa9c264
to
60746e4
Compare
I wonder if this implies there is still a race condition on this test, its been fixed multiple times already, or if there is something different on the platform which requires stronger guarantees on setting the return value edit: global timeout reached -> does that just imply the tests took too long to run here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to add android to the readme-template.md
as a supported platform that would be appropriate!
I think you'll need to rebase onto main or merge main into your branch, there was a ci change which now requires This change is awesome, I had no idea how much it would be to get the tests to actually run, but very nice job! |
On Android pthread symbols are provided by bionic libc; there is no separate libpthread. Adding -lpthread triggers a link error (-lpthread not found). Guard pthread linkage with (UNIX AND NOT ANDROID) and document the reason. Other UNIX platforms (Linux, *BSD) still link against pthread explicitly; no behavior change elsewhere.
Wrap find_package(OpenSSL) in a conditional to avoid resolving host libraries when prebuilt OpenSSL::SSL/OpenSSL::Crypto targets are injected (Android embedding). pthread linking remains skipped on Android where pthread is part of libc.
427ceb3
to
0a92910
Compare
On Android pthread symbols are provided by bionic libc; there is no separate libpthread. Adding -lpthread triggers a link error (-lpthread not found).
Guard pthread linkage with (UNIX AND NOT ANDROID) and document the reason. Other UNIX platforms (Linux, *BSD) still link against pthread explicitly; no behavior change elsewhere.