[Android][Linux] Building master RNTester on Linux fails while building Folly
See original GitHub issueDescription:
I’m on the latest git commit, and RNTester fails to build on Linux:
/tmp$ git clone https://github.com/facebook/react-native &&
cd react-native &&
npm install &&
./gradlew :RNTester:android:app:installJSCDebug
[...]
[armeabi-v7a] Compile++ thumb: folly_json <= FileUtil.cpp
make: Leaving directory '/tmp/react-native/ReactAndroid/src/main/jni/react/jni'
/tmp/react-native/ReactAndroid/build/third-party-ndk/folly/folly/FileUtil.cpp:37:14: error: no matching function for call to 'wrapNoInt'
return int(wrapNoInt(open, name, flags, mode));
^~~~~~~~~
/tmp/react-native/ReactAndroid/build/third-party-ndk/folly/folly/detail/FileUtilDetail.h:34:9: note: candidate template ignored: couldn't infer template argument 'F'
ssize_t wrapNoInt(F f, Args... args) {
^
1 error generated.
make: *** [/tmp/fetchleak/sdk/ndk-bundle/build/core/build-binary.mk:478: /tmp/react-native/ReactAndroid/build/tmp/buildReactNdkLib/local/armeabi-v7a/objs/folly_json/folly/FileUtil.o] Error 1
make: *** Waiting for unfinished jobs....
[...]
make: Leaving directory '/tmp/react-native/ReactAndroid/src/main/jni/react/jni'
> Task :ReactAndroid:buildReactNdkLib FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':ReactAndroid:buildReactNdkLib'.
> Process 'command '/tmp/fetchleak/sdk/ndk-bundle/ndk-build'' finished with non-zero exit value 2
React Native version:
Git master, commit 5ebca708132be8720c28a565e03b04e1087326cf from Mar 12 (Android SDK downloaded today, commandlinetools-linux-6200805_latest.zip)
Steps To Reproduce
- Be on Linux. The problem does not appear on macOS.
- git clone https://github.com/facebook/react-native
- cd react-native
- npm install
- ./gradlew :RNTester:android:app:installJSCDebug
Expected Results
I expected RNTester to run
Snack, code example, screenshot, or link to a repository:
https://github.com/facebook/react-native/
The first commit that fails is 6e2131b8fa85da8b3fb0391803e7fbecba890ffb, “Upgrade Folly to v2020.01.13.00 (#27811)”. The preceding commit, a3cb377645f2ccb7632ded73c230a41025d38f6f, builds successfully.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:11 (5 by maintainers)
Top Results From Across the Web
folly-ios on CocoaPods.org
Folly (acronymed loosely after Facebook Open Source Library) is a library of C++11 components designed with practicality and efficiency in mind.
Read more >react-native-reanimated:configureCMakeDebug[arm64-v8a]
FAILURE: Build completed with 2 failures. 1: Task failed with an exception. What went wrong: Execution failed for task ':react-native-reanimated ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I kludged around this by overwriting
ReactAndroid/build/third-party-ndk/folly/folly/FileUtil.cpp
with a version that definesopenNoInt
by copying the logic fromwrapNoInt
rather than calling it. I can then build successfully:created a pr for folly to address this: https://github.com/facebook/folly/pull/1593 this may not have much difference to the workaround but should explain why this broken after ndk r21.