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
Unified Headers: LONG_BIT
Undeclared in legacy_signal_inlines.h
When APP_API < 21
#352
Comments
there's something weird going on here though. signal.h:38 includes limits.h, long before it includes android/legacy_signal_inlines.h on L173... |
Seems like the limits.h file in |
After even more investigation, it seems that a different http://stackoverflow.com/questions/17692428/what-is-ffreestanding-option-in-gcc The clang toolchain has its own Attached is a test project that shows this exact behavior: test-project_ffreestanding.zip I'm no longer sure if this is a bug in the NDK anymore if it's just something that should be documented when people start converting from gcc to clang. |
aiui |
Speaking of
Are we missing some trick here? |
no, that one's our fault. note that ((__SIGRTMIN) + 4) is less unsafe, since that's the current value. (the problem here being that the platform you run on might take more of these signals for itself than the platform you built against did.) |
Should we expect the fixed
|
Wait a second, with the old-style header
Do you imply that we should use |
correct. we're not trying to move you over to unified headers just to keep you busy --- the old headers are wildly out of date. your suggestion above sounds like our least worst choice for compatibility, so we'll get that into r15beta2. |
https://android-review.googlesource.com/380365 fixes this in bionic. |
okay, that's submitted now and cherrypicked onto the right branch for r15beta2. if you have time, feel free to manually hack your r15beta1 in case there's another problem lurking behind that one :-) |
Bug: android/ndk#352 Test: built new NDK test Change-Id: Iacebe574bbf693701949e038005a40ba6520d592
@enh Yes, it builds clean now, but I must confess that we don't have test case for this piece, so I cannot confirm that the fix works on all supported devices. Actually, we have not yet seen complaints from API >= 21, where hardcoded |
given that only one of Crashlytics and debuggerd(libbacktrace) are likely to be in play at once, it's probably unlikely that they'd have trouble even if they did use the same signal. libcore actually only uses its signal for the side-effect of EINTR to unblock some network operations, so the worst you'd see there is slightly degraded performance (but if your other user is Crashlytics, well, you're probably crashing anyway...). |
Bug: android/ndk#352 Test: ran tests (with and without a hacked sysroot containing the fix) Change-Id: Iedac09f406112ea1e37cc0560a0863820242786f
I am getting the same error.
And, I am not sure how to work around it. Because we are using GCC, we are also rather stuck on NDK r17. Btw, we are not using the |
why are you stuck on gcc? you can build the linux kernel with clang these days, and they're pretty demanding users of weird compiler extensions... might be worth filing a separate bug for that if there's some gap that might be generally useful. |
We are not stuck on GCC, it is a policy and legacy decision. We are stuck on NDK r17. I have been able to work around this issue by using the |
Bug: android/ndk#352 Test: built new NDK test Change-Id: Iacebe574bbf693701949e038005a40ba6520d592
Bug: android/ndk#352 Test: built new NDK test Change-Id: Iacebe574bbf693701949e038005a40ba6520d592
Bug: android/ndk#352 Test: built new NDK test Change-Id: Iacebe574bbf693701949e038005a40ba6520d592
Description
When compiling one of my company's products, when enabling Unified Headers and APP_API < 21, I get the following error:
This seems to be happening when trying to compile one of my product's files, which depends on Boost's atomic library:
Investigating this slightly further, I found a couple things....
LONG_BIT
is actually defined in the following header file:${HOME_FOLDER}/Android/Sdk/ndk-bundle/sysroot/usr/include/limits.h
legacy_signals_inlines.h
doesn't havelimits.h
included:My opinions:
To me, this is obviously a bug in both the old headers and in the new unified headers code. How long will it take to fix this? I really hope there's a patch version of r14 to fix small issues like this.
Environment Details
Not all of these will be relevant to every bug, but please provide as much
information as you can.
The text was updated successfully, but these errors were encountered: