skip to Main Content

On an M1 Mac, with npm 8.3.1 & node 17.4, when I run npx react-native run-ios I receive 2 errors:

The following build commands failed:
    CompileC /Users/Steven/Library/Developer/Xcode/DerivedData/HelloSteve-hghgfcwemhoaiacfwlophutqqzbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/arm64/SysUio.o /Users/Steven/Documents/Projects/React Native/HelloSteve/ios/Pods/RCT-Folly/folly/portability/SysUio.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
    CompileC /Users/Steven/Library/Developer/Xcode/DerivedData/HelloSteve-hghgfcwemhoaiacfwlophutqqzbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/arm64/NetOps.o /Users/Steven/Documents/Projects/React Native/HelloSteve/ios/Pods/RCT-Folly/folly/net/NetOps.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
(2 failures)

From this answer, the line flipper_post_install(installer) didn’t exist in the Podfile.

From this answer, I commented out # use_flipper!() in the Podfile, ran pod install then npx react-native run-ios and received a similar error:

The following build commands failed:
        CompileC /Users/Steven/Library/Developer/Xcode/DerivedData/HelloSteve-hghgfcwemhoaiacfwlophutqqzbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/arm64/SysUio.o /Users/Steven/Documents/Projects/React Native/HelloSteve/ios/Pods/RCT-Folly/folly/portability/SysUio.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
(1 failure)

I tried the solution here, (commenting out the line typedef uint8_t clockid_t; in Time.h) but that didn’t work either.

Help appreciated.

2

Answers


  1. I ran into a similar issue when updating the project target OS version.

    Actually Xcode will ask you to change the target OS version for the different packages, which then lead to not finding the RCT package anymore for me.

    So when xcode tells you there is a good option to change the target settings for different pods, be very careful with that. Either do it step by step and try out or leave it as is, as long as it is building and running.

    npm install then pod install respectively arch -x86_64 pod install since I am also running on M1.

    Since it might have to do something with that as well I would also disable arm64 in xcode your projects target build phases under build settings "excluded architectures" and only install pods with arch -x86_64 pod install.

    Login or Signup to reply.
  2. I also faced this issue but not on M1 Mac

    I found that if I create a project in a folder that contain a white space Learning RN/NewProject, there’re an error when we run pod install

    I tried to remove the whitespace in folder name LearningRN/NewProject and it worked well.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search