Skip to content

Can't build macOS project with Hermes #2523

Open
@teodorciuraru

Description

@teodorciuraru

Environment

react-native -v:
react-native-cli: 2.0.1
react-native: 0.78.2
npm ls react-native-macos:
0.78.3
node -v: v22.16.0
npm -v: 10.9.2
yarn --version: 3.6.1
xcodebuild -version:
Xcode 16.4
Build version 16F6

Steps to reproduce the bug

  1. Install react-native-macos inside a RN project.
  2. Enabled Hermes in the Podfile:
    :hermes_enabled => true
  3. cd macos; pod install
    While installing, under hermes-engine you will see:
    Fetching podspec for `hermes-engine` from `../node_modules/react-native-macos/sdks/hermes-engine/hermes-engine.podspec`[Hermes] Using the latest commit from main.
  4. yarn macos or build from Xcode.

Expected Behavior

Building the macOS app successfully.

Actual Behavior

Xcode build will fail and you will get:

Node found at: /Users/teodorc/.nvm/versions/node/v22.16.0/bin/node
++ hermesc_dir_path=/Users/teodorc/.../example/macos/Pods/hermes-engine/build_host_hermesc
++ shift
++ jsi_path=/Users/teodorc/../example/macos/Pods/../../node_modules/react-native/ReactCommon/jsi
+++ xcode-select -p
++ SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
++ env -i SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /opt/homebrew/bin/cmake -S /Users/teodorc/.../example/macos/Pods/hermes-engine -B /Users/teodorc/.../example/macos/Pods/hermes-engine/build_host_hermesc -DJSI_DIR=/Users/teodorc/.../example/macos/Pods/../../node_modules/react-native/ReactCommon/jsi
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
Command PhaseScriptExecution failed with a nonzero exit code```

I'm hinting there's a problem with the `hermes-engine` pod that forces using latest commit on `main`, which is not in sync with `react-native: 0.78.2`.

### Reproducible Demo

_No response_

### Additional context

_No response_

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions