react-native: Problem with third-party in Xcode 10 building to iOS physical device

Environment:

Environment:
  OS:  macOS 10.14
  Node:  8.11.2
  Yarn:  1.7.0
  npm:  5.6.0
  Watchman:  4.7.0
  Xcode:  Xcode 10.0 Build version 10L176w
  Android Studio:  2.3 AI-162.4069837

Packages: (wanted => installed)
  react: 16.3.1 => 16.3.1
  react-native: 0.55.4 => 0.55.4

__

Description

third-party encounters a semantic issue during Xcode builds to physical iOS device. The error is No member named '__rip' in '__darwin_arm_thread_state64'

Reproducible Demo

On macOS Mojave with Xcode 10.

react-native init Test
cd Test
yarn start
Xcode build to device

Fails due to No member named '__rip' in '__darwin_arm_thread_state64'

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 13
  • Comments: 20 (11 by maintainers)

Most upvoted comments

Not @dlimx, but can report the same. Using the latest (-1) RC.

Current Environment: 
macOS: 10.14 build 18A314h
node: 9.4.0
yarn: 1.7.0
npm: 6.1.0
watchman: 4.9.0
Xcode: 10.0 build 10L177m
Android Studio: Build #AI-173.4670197

react: 16.3.2
react-native-cli: 2.0.1
react-native: 0.56.0-rc.2

This error also occurs when building for a “Generic iOS Device” The error seem to stem from signalhandler.cc in the glog folder, on line 78 return (void*)context->PC_FROM_UCONTEXT;

I saw that there was a version bump to rc.3, I couldn’t use react-native-git-upgrade nor react-native upgrade to upgrade to that version.

The problems seems to be resolved now. I’m not entirely sure but I think it had to do with the way I was installing glog.

With earlier iterations (both Xcode / RN) I was running the glog ./configure script manually due to Xcode failing to do it properly.

But that actually produces a config.h that breaks on Xcode 10. The following react-native script is actually required for getting the correct config.h for Xcode 10: https://github.com/facebook/react-native/blob/v0.57.0/scripts/ios-configure-glog.sh#L44-L51 That will build glog with ./configure --host arm-apple-darwin and taking into account patching the PC_FROM_UCONTEXT macro.

I learned that Xcode 10 failed building / installing the third-party dependencies only at the first build and that subsequent builds actually takes care of installing glog correctly: https://github.com/facebook/react-native/issues/21168#issuecomment-422502787

It happens to me on a recently created RN project, but I’m using xCode 9.4 IDEs: Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild npmPackages: react: 16.4.1 => 16.4.1 react-native: 0.56.0 => 0.56.0

@hramos In response to your question^^, I’m using the same environment as OP and having the same issue on rc.2, rc.3, and rc.4