-
Notifications
You must be signed in to change notification settings - Fork 253
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
error: undefined reference to 'pthread_cond_timedwait_monotonic_np' for android-14 and android-15 #708
Comments
seems WAI... this function wasn't added until API 16. or are you asking "why wasn't this a compile-time error rather than a link-time error"? here's the complete truth from the map:
but the header file just has
i'm not sure why there's no |
Thanks for clarification! Before, using NDK 16b, I was able to compile this function, that's why issue was raised.
|
yeah, in NDK r16 this was in a in NDK r17 we added the 64-bit guard but accidentally dropped the 32-bit guard. https://android-review.googlesource.com/c/platform/bionic/+/695276 fixes this, but given that API 16 is the lowest API level supported by NDK r17 i'm not sure i'll actually get +2 on that change :-) |
actually, we did screw up here... my earlier claim assumed that the map was correct, but it's been pointed out to me by @rprichard that the active ingredient that caused your problem is that we accidentally changed the map. from the git history, this function wasn't in cupcake (which was our earlier claim), but was definitely in gingerbread (which pre-dates our current claim). so i'll abandon my earlier change and upload a new one to fix the map to admit that this function was available in at least gingerbread. hopefully there's still time to get this into r17b... |
okay, https://android-review.googlesource.com/c/platform/bionic/+/695566 fixes the map. |
Bug: android/ndk#708 Test: builds Change-Id: Icaa1f8cb796a0a117cbe2e10391c965c857d6d37
@enh fixed the map, over to me to update the NDK's sysroot. |
Updates merged into r17. |
Bug: android/ndk#708 Test: N/A Change-Id: Ic72bbae7ab98182731a706348a8ddb6e8e28f59e
Description
Linker failure happens when building a c file with pthread_cond_timedwait_monotonic_np function using NDK 17:
pthreadtest.c file conents:
Android.mk file contents:
Environment Details
NDK:
Pkg.Desc = Android NDK
Pkg.Revision = 17.0.4754217
The text was updated successfully, but these errors were encountered: