folly icon indicating copy to clipboard operation
folly copied to clipboard

folly/coro/Coroutine.h file not found after upgrading to 0.80.1

Open nazacity opened this issue 7 months ago • 5 comments

Image

System: OS: macOS 15.5 CPU: (10) arm64 Apple M1 Max Memory: 218.41 MB / 32.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 18.20.6 path: ~/.nvm/versions/node/v18.20.6/bin/node Yarn: version: 1.22.22 path: ~/.nvm/versions/node/v18.20.6/bin/yarn npm: version: 10.9.2 path: ~/.nvm/versions/node/v18.20.6/bin/npm Watchman: version: 2023.12.04.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 24.5 - iOS 18.5 - macOS 15.5 - tvOS 18.5 - visionOS 2.5 - watchOS 11.5 Android SDK: API Levels: - "23" - "27" - "29" - "30" - "31" - "33" - "34" - "35" Build Tools: - 28.0.3 - 29.0.2 - 30.0.2 - 30.0.3 - 31.0.0 - 33.0.0 - 33.0.1 - 34.0.0 - 35.0.0 System Images: - android-29 | Intel x86 Atom_64 - android-29 | Google APIs Intel x86 Atom - android-30 | ARM 64 v8a - android-30 | Google APIs ARM 64 v8a - android-30 | Google Play ARM 64 v8a - android-31 | Google APIs ARM 64 v8a - android-31 | Google Play ARM 64 v8a - android-33 | ARM 64 v8a - android-33 | Google APIs ARM 64 v8a - android-34 | ARM 64 v8a - android-34 | Google APIs ARM 64 v8a - android-34 | Google Play ARM 64 v8a - android-35 | ARM 64 v8a - android-35 | Google APIs ARM 64 v8a - android-35 | Google Play ARM 64 v8a - android-VanillaIceCream | Google APIs ARM 64 v8a - android-VanillaIceCream | Google Play ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2024.2 AI-242.23726.103.2422.12816248 Xcode: version: 16.4/16F6 path: /usr/bin/xcodebuild Languages: Java: version: 17.0.10 path: /usr/bin/javac Ruby: version: 2.6.10 path: /usr/bin/ruby npmPackages: "@react-native-community/cli": installed: 19.0.0 wanted: ^18.0.0 react: installed: 19.1.0 wanted: 19.1.0 react-native: installed: 0.80.1 wanted: 0.80.1 react-native-macos: Not Found npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: true newArchEnabled: true iOS: hermesEnabled: true newArchEnabled: true

nazacity avatar Jul 02 '25 03:07 nazacity

Check this https://github.com/facebook/folly/issues/2297 it solved my issue.

Check this #2297 it solved my issue.

what's the actual fix? Changing the post install script?

pierroo avatar Jul 08 '25 13:07 pierroo

Check this #2297 it solved my issue.

Could you please explain a little bit more about the solution?

matin0728 avatar Sep 10 '25 02:09 matin0728

Follow the link to #2297 above: same problem, adding "-DFOLLY_CFG_NO_COROUTINES=1" to pbxproj NOT solved the issue.

matin0728 avatar Sep 12 '25 02:09 matin0728

In our case, we found that this is a problem with dependencies (in the Pods project) not having the same -DFOLLY_CFG_NO_COROUTINES=1 flag as project.pbxproj

We added the following to fix this:

  post_install do |installer|
    # Add after all other code

    # Avoid `mobile/ios/Pods/Headers/Public/RCT-Folly/folly/Expected.h:1587:10:
    # 'folly/coro/Coroutine.h' file not found"`
    #
    # This flag is copied from the the project.pbxproj for the main project, but
    # we also need it for the Pods project since Expo imports Folly too.
    installer.pods_project.build_configurations.each do |config|
      config.build_settings['OTHER_CPLUSPLUSFLAGS'] ||= ['$(OTHER_CFLAGS)']
      config.build_settings['OTHER_CPLUSPLUSFLAGS'] << '-DFOLLY_CFG_NO_COROUTINES=1'
    end
  end

hsource avatar Nov 20 '25 01:11 hsource