question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS] Upgraded from 0.64.2 to 0.65.1 - RTC-Folly failed build

See original GitHub issue

After I made the migration, I am getting this error in the ios build.

** BUILD FAILED **


The following build commands failed:
	CompileC /Users/username/Library/Developer/Xcode/DerivedData/AppName-ajqemcdetclskwggzeuetwuikmht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/VirtualEventBase.o /Users/username/projects/appname/ios/Pods/RCT-Folly/folly/io/async/VirtualEventBase.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

After trying to run the build for the second or third time, I get this

** BUILD FAILED **


The following build commands failed:
	CompileC /Users/username/Library/Developer/Xcode/DerivedData/AppName-ajqemcdetclskwggzeuetwuikmht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/TimeoutManager.o /Users/username/projects/appname/ios/Pods/RCT-Folly/folly/io/async/TimeoutManager.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Anything that can be done?

Edit: I did while upgrading other packages, but now, downgraded back to 0.64.2 and only had to downgrade react-native-reanimated back to 2.2.0 and that was enough to get it back working.

Btw, I am on a M1 Macbook, but build is happening on AppCenter. Got the error in both locally and there.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

47reactions
Navipro70commented, Sep 23, 2021

@dougg0k Replace your post_install function in Podfile with:

 post_install do |installer|
    react_native_post_install(installer)

    # Apple Silicon builds require a library path tweak for Swift library discovery or "symbol not found" for swift things
    installer.aggregate_targets.each do |aggregate_target| 
      aggregate_target.user_project.native_targets.each do |target|
        target.build_configurations.each do |config|
          config.build_settings['LIBRARY_SEARCH_PATHS'] = ['$(SDKROOT)/usr/lib/swift', '$(inherited)']
        end
      end
      aggregate_target.user_project.save
    end

     # Flipper requires a crude patch to bump up iOS deployment target, or "error: thread-local storage is not supported for the current target"
    # I'm not aware of any other way to fix this one other than bumping iOS deployment target to match react-native (iOS 11 now)
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
       end
    end

    # ...but if you bump iOS deployment target, Flipper barfs again "Time.h:52:17: error: typedef redefinition with different types"
    # We need to make one crude patch to RCT-Folly - set `__IPHONE_10_0` to our iOS target + 1
    # https://github.com/facebook/flipper/issues/834 - 84 comments and still going...
    `sed -i -e  $'s/__IPHONE_10_0/__IPHONE_12_0/' #{installer.sandbox.root}/RCT-Folly/folly/portability/Time.h`
  end

And also check this guide for setup build environment on Mac m1

11reactions
kshitejcommented, Feb 20, 2022

Tried the fix mentioned in this thread and it didn’t work for

CompileC /Users/username/Library/Developer/Xcode/DerivedData/projectName-awyiegslnefckyesnveuttxiurbm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/arm64/SysUio.o /Users/username/Desktop/Personal/Personal\ Projects/projectName/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)

React Native version : 0.67 XCode version : 13

Read more comments on GitHub >

github_iconTop Results From Across the Web

M1 Mac react-native iOS build error (in target 'RCT-Folly' from ...
I ran into a similar issue when updating the project target OS version. ... version of react-native: npx react-native@0.64.2 init MyApp .
Read more >
Upgrading a React Native app from 0.60 to 0.65 - YouTube
Jamon attempts to upgrade a React Native app from 0.60 to 0.65 with ... mixed results. -- Watch live at https://www.twitch.tv/jamonholmgren.
Read more >
Upgrading a React Native App - Bionic Julia
This was an upgrade from version 0.63.3 to 0.65.1. ... run the build process for iOS and Android, see it fail, google the...
Read more >
What's New in React Native 0.70 — How to Upgrade and Why ...
Most importantly, it adds more consistency between the iOS and Android build and development process, helping to fulfill the true promise of ...
Read more >
Xcode Build error with React Nativ… | Apple Developer Forums
Xcode Build error with React Native “___cxa_increment_exception_refcount” ... error: linker command failed with exit code 1 (use -v to see invocation). iOS.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found