Junhyun Lee
Junhyun Lee

Reputation: 183

clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)

I don't know what causes it.

It does not happen at iPhone 5 and simulators. It have been happened only my original device iPhone 7.

fatal error: error in backend: Error while trying to spill X0 from class GPR64: Cannot scavenge register without an emergency spill slot!
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Apple LLVM version 9.0.0 (clang-900.0.34.1)
Target: aarch64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/xg/tgwkzqt15xd9jprnv9f0gn4c0000gn/T/CityArray-6e6c1e.m
clang: note: diagnostic msg: /var/folders/xg/tgwkzqt15xd9jprnv9f0gn4c0000gn/T/CityArray-6e6c1e.cache
clang: note: diagnostic msg: /var/folders/xg/tgwkzqt15xd9jprnv9f0gn4c0000gn/T/CityArray-6e6c1e.sh
clang: note: diagnostic msg: Crash backtrace is located in
clang: note: diagnostic msg: /Users/junhyun/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang: note: diagnostic msg: 

********************

Upvotes: 18

Views: 12399

Answers (7)

Jose
Jose

Reputation: 2299

I was getting this error because while cleaning my hard drive I was removed everything from ~/Library/Developer/Xcode/DerivedData

After having removed that data turned out when you run react native's build command to develop locally it depends on some cached files in DerivedData so my builds were failing.

I removed the installed pods, node_modules and build folder in my react native project and just rebuilt them and it worked fine after that.

Upvotes: 0

Deepak A
Deepak A

Reputation: 41

Delete ~/Library/Developer/Xcode/DerivedData worked for me. Issue is due to cache, since your using pods - you need to remove old references

Upvotes: 4

edwin p
edwin p

Reputation: 11

Delete ~/Library/Developer/Xcode/DerivedData worked for me.

Upvotes: 1

Dave
Dave

Reputation: 69

I used the following steps to get rid of the error:

  • Clean cache from Xcode Product->Clean Build Folder
  • npm install
  • run react-native run-ios
  • Build the app using Xcode.

Upvotes: 0

Sankalp
Sankalp

Reputation: 1128

This has been driving me nuts and I still can not pinpoint the reason for the crash. But a few of these steps or a combination of these seems to remedy it in the meanwhile.

  • Try doing a clean build.
  • Run pod install / pod deintegrate.
  • Run npm install if you are working on a react native app after deleting node_modules
  • Close xcode and then delete ~/Library/Developer/Xcode/DerivedData
  • If nothing works try restarting the system.

Upvotes: 1

Appic SandBox
Appic SandBox

Reputation: 178

I got this error when i was archiving my app with xcode - while running on sim and physical device worked -, but had my physical device still selected as a scheme. Solution worked for me: clean build folder, and select 'Generic IOS Device' as the scheme.

Upvotes: 8

Albert Renshaw
Albert Renshaw

Reputation: 17902

I got this error when I hardcoded a massive array into a .h file. Worked fine on simulator, threw this error on device.

Changed the array to be empty and it compiled just fine.

Upvotes: 0

Related Questions