Skip to content

Conversation

dobord
Copy link
Contributor

@dobord dobord commented Aug 14, 2025

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.

jbaldwin
jbaldwin previously approved these changes Aug 17, 2025
Copy link
Owner

@jbaldwin jbaldwin left a 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?

@dobord dobord force-pushed the fix/skip_linking_pthread_on_android branch from fa9c264 to 60746e4 Compare September 3, 2025 13:28
@jbaldwin
Copy link
Owner

jbaldwin commented Sep 5, 2025

09-03 13:47:04.566 I/coroTest( 3056): BEGIN when_any two tasks one long running with cancellation
09-03 13:47:04.672 I/coroTest( 3056): yielding with amount=1
09-03 13:47:04.749 I/coroTest( 3056): not throwing
09-03 13:56:51.376 I/coroTest( 3056): Global timeout reached, detaching test runner thread...

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?

jbaldwin
jbaldwin previously approved these changes Sep 9, 2025
Copy link
Owner

@jbaldwin jbaldwin left a 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!

@jbaldwin
Copy link
Owner

jbaldwin commented Sep 9, 2025

I think you'll need to rebase onto main or merge main into your branch, there was a ci change which now requires fetch-depth: 0 and fetch-tags: true true on the checkout step for each ci file.

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.
@dobord dobord force-pushed the fix/skip_linking_pthread_on_android branch from 427ceb3 to 0a92910 Compare September 13, 2025 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants