Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xcode 16.2] React-Native projects cannot be compiled on macOS 15.0 #47203

Open
xiaokang00010 opened this issue Oct 25, 2024 · 6 comments
Open
Assignees
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available

Comments

@xiaokang00010
Copy link

Description

When I upgraded my macOS to 15.0, I upgraded my Xcode version to 16.2. However, all of my react-native projects failed to compile in new Xcode versions. And they all gave me an error related to glog, like the following screenshot.

At first, I doubted that it is a problem of improper package versions. I tried deleting package-lock.json and installing it again, and I also tried upgrading my expo sdk version. None of these approaches works.

Then I tried to add /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1 to Header Search Paths, the result remained the same.

Steps to reproduce

  1. Install the Xcode version 16.2 with macOS 15.0
  2. Use npx create-expo-project to create a new expo project
  3. Run npx expo prebuild and npx run:ios

React Native Version

0.74.5

Affected Platforms

Runtime - iOS

Output of npx react-native info

info Fetching system and libraries information...
System:
  OS: macOS 15.0
  CPU: (8) arm64 Apple M1
  Memory: 81.98 MB / 8.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.0.0
    path: ~/.nvm/versions/node/v18.0.0/bin/node
  Yarn: Not Found
  npm:
    version: 8.6.0
    path: ~/.nvm/versions/node/v18.0.0/bin/npm
  Watchman:
    version: 2024.10.14.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
  Xcode:
    version: 16.2/16B5100e
    path: /usr/bin/xcodebuild
Languages:
  Java: Not Found
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.5
    wanted: 0.74.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

info React Native v0.76.0 is now available (your project is running on v0.74.5).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.76.0
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.74.5
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".

Stacktrace or Logs

❯ sudo xcode-select -s /Applications/Xcode-beta.app
❯ npx expo run:ios --device
✔ Select a device › 🔌 宵宫最可爱了 (18.0)
› Using --device 00008101-000215EC24C1401E
› Auto signing app using team(s): R2G5SB35CA
› Planning build
› Executing react-native Pods/hermes-engine » [CP-User] [Hermes] Replace Hermes for the right configuration, if needed
› Preparing Pods/React-Core-RCTI18nStrings » ResourceBundle-RCTI18nStrings-React-Core-Info.plist
› Preparing Pods/ExpoSystemUI-ExpoSystemUI_privacy » ResourceBundle-ExpoSystemUI_privacy-ExpoSystemUI-Info.plist
› Preparing Pods/ExpoFileSystem-ExpoFileSystem_privacy » ResourceBundle-ExpoFileSystem_privacy-ExpoFileSystem-Info.plist
› Preparing Pods/EXConstants-ExpoConstants_privacy » ResourceBundle-ExpoConstants_privacy-EXConstants-Info.plist
› Preparing expo-constants Pods/EXConstants-EXConstants » ResourceBundle-EXConstants-EXConstants-Info.plist
› Compiling react-native Pods/glog » vlog_is_on.cc

❌  fatal error: too many errors emitted, stopping now [-ferror-limit=]


› Compiling react-native Pods/glog » utilities.cc

❌  fatal error: too many errors emitted, stopping now [-ferror-limit=]


› Compiling react-native Pods/glog » symbolize.cc

❌  fatal error: too many errors emitted, stopping now [-ferror-limit=]


› Compiling react-native Pods/glog » signalhandler.cc

❌  fatal error: too many errors emitted, stopping now [-ferror-limit=]


› Compiling react-native Pods/glog » raw_logging.cc

❌  fatal error: too many errors emitted, stopping now [-ferror-limit=]


› Compiling react-native Pods/glog » logging.cc

❌  fatal error: too many errors emitted, stopping now [-ferror-limit=]


› Compiling react-native Pods/glog » demangle.cc

❌  fatal error: too many errors emitted, stopping now [-ferror-limit=]


› Compiling react-native Pods/fmt » format.cc

❌  fatal error: too many errors emitted, stopping now [-ferror-limit=]


    Run script build phase '[CP-User] [RN]Check rncore' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Fabric' from project 'Pods')
    Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
    Run script build phase '[CP-User] [Hermes] Replace Hermes for the right configuration, if needed' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'hermes-engine' from project 'Pods')

› 8 error(s), and 3 warning(s)

CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.

Reproducer

https://github.com/XtherDevTeam/XmediaCenterMusic

Screenshots and Videos

image image
@react-native-bot
Copy link
Collaborator

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.74.6. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot react-native-bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Oct 25, 2024
@react-native-bot
Copy link
Collaborator

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

@react-native-bot
Copy link
Collaborator

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot
Copy link
Collaborator

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:

@cortinico cortinico changed the title React-Native projects cannot be compiled on macOS 15.0 [Xcode 16.2] React-Native projects cannot be compiled on macOS 15.0 Oct 25, 2024
@cortinico
Copy link
Contributor

@xiaokang00010 could you try to downgrade to Xcode 16.1 and report back if the issue is solved? We haven't had the time to integrate React Native with 16.2 so there might be the need for a point release

@xiaokang00010
Copy link
Author

@xiaokang00010 could you try to downgrade to Xcode 16.1 and report back if the issue is solved? We haven't had the time to integrate React Native with 16.2 so there might be the need for a point release

I've tried using Xcode 16 stable release to build, the result remained the same.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available
Projects
None yet
Development

No branches or pull requests

5 participants