Skip to content
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

Build error when integrating new cxx bridge #14115

Closed
janicduplessis opened this issue May 23, 2017 · 8 comments
Closed

Build error when integrating new cxx bridge #14115

janicduplessis opened this issue May 23, 2017 · 8 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@janicduplessis
Copy link
Contributor

janicduplessis commented May 23, 2017

I'm getting this error from glog from this function. Happens only when building in release mode.

/Users/janic/Developer/pikapik/th3rdwave-app/node_modules/react-native/third-party/glog-0.3.4/src/signalhandler.cc:78:28: No member named '__rip' in '__darwin_i386_thread_state'; did you mean '__eip'?

void* GetPC(void* ucontext_in_void) {
#if (defined(HAVE_UCONTEXT_H) || defined(HAVE_SYS_UCONTEXT_H)) && defined(PC_FROM_UCONTEXT)
  if (ucontext_in_void != NULL) {
    ucontext_t *context = reinterpret_cast<ucontext_t *>(ucontext_in_void);
    return (void*)context->PC_FROM_UCONTEXT;
  }
#endif
  return NULL;
}

Removing the #if block as a workaround does fix the issue and then everything works.

cc @mhorowitz

@javache
Copy link
Member

javache commented May 23, 2017

Fixed in #14100

@kesha-antonov
Copy link
Contributor

Hello @javache
When you plan to merge that PR? Getting same error

@javache
Copy link
Member

javache commented May 30, 2017

Parts of this have landed in 33e2248

@kesha-antonov
Copy link
Contributor

kesha-antonov commented May 30, 2017

@javache Nice!

I could not build with latest master though.

Here's the output. Maybe it'll help:

[x86] Compile        : yogacore <= YGNodeList.c
[x86] Prebuilt       : libjsc.so <= /Users/myuser/somemydir/react-native/ReactAndroid/build/third-party-ndk/jsc/jni/x86/
[x86] Compile++      : reactnativefb <= CxxNativeModule.cpp
[x86] Compile++      : reactnativefb <= Instance.cpp
[x86] Compile++      : reactnativefb <= JSCExecutor.cpp
[x86] Compile++      : reactnativefb <= JSCMemory.cpp
[x86] Compile++      : reactnativefb <= JSCNativeModules.cpp
[x86] Compile++      : reactnativefb <= JSCPerfStats.cpp
[x86] Compile++      : reactnativefb <= ModuleRegistry.cpp
[x86] Compile++      : reactnativefb <= NativeToJsBridge.cpp
[x86] Compile++      : reactnativefb <= Platform.cpp
[x86] Compile++      : reactnativefb <= JSCUtils.cpp
[x86] Compile++      : jschelpers <= JSCHelpers.cpp
[x86] Compile++      : jschelpers <= Value.cpp
[x86] Install        : libgnustl_shared.so => /Users/myuser/somemydir/react-native/ReactAndroid/build/react-ndk/all/x86/libgnustl_shared.so
[x86] Install        : libfolly_json.so => /Users/myuser/somemydir/react-native/ReactAndroid/build/react-ndk/all/x86/libfolly_json.so
[x86] Install        : libjsc.so => /Users/myuser/somemydir/react-native/ReactAndroid/build/react-ndk/all/x86/libjsc.so
[x86] Install        : libglog_init.so => /Users/myuser/somemydir/react-native/ReactAndroid/build/react-ndk/all/x86/libglog_init.so
[x86] Install        : libglog.so => /Users/myuser/somemydir/react-native/ReactAndroid/build/react-ndk/all/x86/libglog.so
[armeabi-v7a] SharedLibrary  : libfb.so
[armeabi-v7a] StaticLibrary  : libyogacore.a
[armeabi-v7a] StaticLibrary  : libreactnativefb.a
[armeabi-v7a] StaticLibrary  : libjschelpers.a
[armeabi-v7a] Install        : libfb.so => /Users/myuser/somemydir/react-native/ReactAndroid/build/react-ndk/all/armeabi-v7a/libfb.so
[x86] SharedLibrary  : libfb.so
[x86] StaticLibrary  : libyogacore.a
[x86] Install        : libfb.so => /Users/myuser/somemydir/react-native/ReactAndroid/build/react-ndk/all/x86/libfb.so
[armeabi-v7a] SharedLibrary  : libyoga.so
[x86] SharedLibrary  : libyoga.so
[armeabi-v7a] SharedLibrary  : libreactnativejnifb.so
[armeabi-v7a] Install        : libyoga.so => /Users/myuser/somemydir/react-native/ReactAndroid/build/react-ndk/all/armeabi-v7a/libyoga.so
[x86] StaticLibrary  : libreactnativefb.a
[x86] Install        : libyoga.so => /Users/myuser/somemydir/react-native/ReactAndroid/build/react-ndk/all/x86/libyoga.so
/Users/myuser/somemydir/react-native/ReactAndroid/../ReactCommon/jschelpers/JSCHelpers.h:23: error: undefined reference to 'folly::stringPrintf(char const*, ...)'
/Users/myuser/somemydir/react-native/ReactAndroid/../ReactCommon/jschelpers/JSCHelpers.h:35: error: undefined reference to 'folly::stringPrintf(char const*, ...)'
/Users/myuser/somemydir/react-native/ReactAndroid/../ReactCommon/jschelpers/JSCHelpers.h:35: error: undefined reference to 'folly::stringPrintf(char const*, ...)'
collect2: error: ld returned 1 exit status
make: *** [/Users/myuser/somemydir/react-native/ReactAndroid/build/tmp/buildReactNdkLib/local/armeabi-v7a/libreactnativejnifb.so] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/Users/myuser/somemydir/react-native/ReactAndroid/src/main/jni/react/jni'
:ReactAndroid:buildReactNdkLib FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ReactAndroid:buildReactNdkLib'.
> Process 'command '/Users/myuser/Library/Android/sdk/ndk-bundle/ndk-build'' finished with non-zero exit value 2

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 3 mins 54.601 secs

@janicduplessis
Copy link
Contributor Author

Yea this error is related to 03e1f40

I'm trying a build with this commit reverted to see if it works.

@javache
Copy link
Member

javache commented May 30, 2017

I'm landing a fix for that right now, sorry for the delay.

@kesha-antonov
Copy link
Contributor

Thank you!

@javache
Copy link
Member

javache commented May 31, 2017

Fix for the printf issue was landed in 2766103

@javache javache closed this as completed May 31, 2017
@facebook facebook locked as resolved and limited conversation to collaborators May 31, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants