Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27776] Android: NDK version 21 outputs "Bad file descriptor"

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2020-06-09T15:27:13.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.0.3
ComponentsAndroid
Labelsandroid, build, ndk
ReporterGary Mathews
AssigneeJoshua Quick
Created2020-02-24T19:37:33.000+0000
Updated2020-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.

Comments

  1. Joshua Quick 2020-02-25

    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.
  2. Joshua Quick 2020-06-05

    This is still an issue with Android NDK r21c as well.
  3. Joshua Quick 2020-06-05

    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.
  4. Joshua Quick 2020-06-05

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/11755 PR (9.0.x): https://github.com/appcelerator/titanium_mobile/pull/11756
  5. Samir Mohammed 2020-06-09

    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

JSON Source