react-native: [FIXED in 0.71.6, 0.70.8, 0.69.9] Xcode 14.3 (14E222b) Build Failed with React Native 0.71.5
EDIT: fixed in 71, 70 and 69 latest patches. Please read this comment for more details.
Description
The following build commands failed:
CompileC /Users/bahadiraraz/Library/Developer/Xcode/DerivedData/mozzarellaui-gbkyyusquvgpyncsiuxkvfpzwcsu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build/Objects-normal/arm64/FBReactNativeSpec-generated.o /Users/bahadiraraz/WebstormProjects/mozzarella/mozzarellaui/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-Codegen' from project 'Pods')
(1 failure)
I encountered the same error in Xcode Version 14.3 (14E222b) released yesterday.
- “react-native”: “0.71.5”
When I tried @travis-mark’s solution issue #36635, it didn’t work either. I also tried using ‘M1’ and other options instead of ‘RC’, but it still didn’t work.
React Native Version
0.71.5
Output of npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 13.2.1
CPU: (8) arm64 Apple M1
Memory: 74.83 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.13.0 - /usr/local/bin/node
Yarn: Not Found
npm: 9.6.1 - /usr/local/bin/npm
Watchman: 2023.03.27.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.0 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 14.3/14E222b - /usr/bin/xcodebuild
Languages:
Java: 19.0.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.5 => 0.71.5
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps to reproduce
npx react-native init Project npx react-native run-ios
Snack, code example, screenshot, or link to a repository
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 22
- Comments: 57 (13 by maintainers)
I also got issue when upgrade xcode this morning
The following build commands failed: CompileC /Users/apple/Library/Developer/Xcode/DerivedData/mobileApp-fczllhwjaxnfricexizepfgaveji/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build/Objects-normal/x86_64/FBReactNativeSpec-generated.o /Users/apple/Documents/book-my-ground/mobileApp/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target ‘React-Codegen’ from project ‘Pods’) (1 failure) ]
👋 everyone!
We have just now finished rolling out new patch releases for the versions in the release support window to address this Xcode 14.3 problem 🎉
Check them out:
We’ll close but unlock the issue now so that you can let us know if they address the problem for you - we are aware that there is a different problem going on for some users that needs to be fixed at the cocoapods level (https://github.com/facebook/react-native/issues/36762), so please be mindful in posting comments here that are not relevant to this specific problem.
same issue with expo & eas build
I have the same issue
@BrianAutomatize after updating react native to 0.71.6, you also have to:
yarn install
bundle exec pod install
To install the new dependencies.Then,
yarn ios
(the equivalent ofnpx react-native run-ios
) should work.Another check you can do is to, make sure that the
React-Codegen
target in the Pods project in Xcode has iOS 12.4 asiOS Deployment Target
:Minimum fix coming soon, hopefully next week, but can’t promise anything: https://github.com/facebook/react-native/pull/36759
ANy progress on this?
HI @cipolleschi I was able to fix this issue by adding below code snippet to
Podfile
as suggested from others.and then go to /ios folder and run
pod install
again. 😃just need to make sure, is this fixed in
0.72.4
?same problem in react-native: 0.65.3
I’ve done as described here and it solved my issue
@travis-mark no, this patch has not been added,because I get the same error if it is added.
@bahadiraraz can you post your current project or Podfile? It’s possible since ruby inside Xcode offers little assistance that you’re missing a piece of the patch.
I had the same error with react native 0.72.0 Works fine with 0.71.7
@cipolleschi Sounds great! I will update my project to 0.71.8 (I am using 0.71.4 right now) 😃
Oh, I see. Actually, we already fixed that bug (introduced by Xcode) in 0.71.8. Just update your project to the last version of your minor and it will work!
Issue is there for version 0.69.3 also
Hi @igortice! IIUC, you are using React Native version 0.65, which is not supported anymore.
I strongly suggest you to update to a more recent version as it is likely that your error has been fixed there.
In any case, I also suggest you to try and open the luigi_jobs.xcworkspace in Xcode and try to build from there.
The attached screenshots are not useful as xcodebuild can fail with error 65 for many different reasons and it’s nearly impossible help you properly without knowing what’s going on.
Also, if you can provide a project that presents the same problems, with the minimum amount of code, this could help us pinpointing the problem.
upgrade rn version 0.71.6 or use Xcode 14.2 or use Xcode 14.2 tool chain with Xcode 14.3
Please try following: step 1: sudo arch -x86_64 gem install ffi step 2: arch -x86_64 pod install
Just to add to @cipolleschi, fixes should be picked for these versions: