[TIMOB-27776] Android: NDK version 21 outputs "Bad file descriptor"
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-06-09T15:27:13.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 9.0.3 |
Components | Android |
Labels | android, build, ndk |
Reporter | Gary Mathews |
Assignee | Joshua Quick |
Created | 2020-02-24T19:37:33.000+0000 |
Updated | 2020-06-09T15:27:13.000+0000 |
Description
- Latest NDK
21.0.6113669
outputs:
fcntl(): Bad file descriptor
Although builds do complete successfully, the log seems to increase build times significantly.
The above also gets logged several times when clicking "Build/Refresh Linked C++ Projects" in the Android Studio menu. My guess is that the C/C++ compiler triggers these error messages when attempting to load the
#include
files. Most likely the V8 library header files. We might need to refactor our makefiles.This is still an issue with Android NDK r21c as well.
This appears to be caused by the new "parallel output" feature. Android NDK v21 enables this by default via the
"--output-sync"
command line argument. https://android-developers.googleblog.com/2019/10/introducing-ndk-r21-our-first-long-term.html https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html We should be able to work-around this by passing"--output-sync=none"
to the NDK. This should bring back the old behavior. Note that"--output-sync"
is only supported on Android NDK v20 and above. Passing it to older NDK versions will cause the build to fail with an "unrecognized option" error.PR (master): https://github.com/appcelerator/titanium_mobile/pull/11755 PR (9.0.x): https://github.com/appcelerator/titanium_mobile/pull/11756
Closing ticket, Fix verified SDK version 9.0.3.v20200609060523 and SDK version 9.1.0.v20200609061322 Test and other information can be found at: PR (master): https://github.com/appcelerator/titanium_mobile/pull/11755 PR (9.0.x): https://github.com/appcelerator/titanium_mobile/pull/11756