Skip to content

Conversation

@Biki-das
Copy link
Contributor

@Biki-das Biki-das commented Nov 2, 2024

Summary:
I was trying to build the rn-tester app on Apple Silicon Mac (M3 Pro) and encountered build failures with command PhaseScriptExecution failed with a nonzero exit code. Installing Rosetta 2 resolved this issue, indicating it's required for proper x86_64 command execution on Apple Silicon. This PR documents this requirement.
Changelog:
[INTERNAL] [FIXED] - updated build instructions for RN Tester in Apple silicon based machines
Test Plan:
Running xcworkspace in Xcode resulted in error, now the app builds successfully.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 2, 2024
@react-native-bot
Copy link
Collaborator

react-native-bot commented Nov 2, 2024

Warnings
⚠️ 📋 Missing Summary - Can you add a Summary? To do so, add a "## Summary" section to your PR description. This is a good place to explain the motivation for making this change.
⚠️ 📋 Missing Test Plan - Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.

Generated by 🚫 dangerJS against 63e0f4a

@Biki-das Biki-das changed the title updated build instructions for Apple silicon based machines updated build instructions for RN Tester in Apple silicon based machines Nov 2, 2024
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 2, 2024
@Biki-das
Copy link
Contributor Author

Biki-das commented Nov 2, 2024

cc @huntie @hoxyq

@facebook-github-bot
Copy link
Contributor

@EdmondChuiHW has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@cortinico
Copy link
Contributor

I was trying to build the rn-tester app on Apple Silicon Mac (M3 Pro) and encountered build failures with command PhaseScriptExecution failed with a nonzero exit code. Installing Rosetta 2 resolved this issue, indicating it's required for proper x86_64 command execution on Apple Silicon

That's actually not necessary. I've been building RNTester on a M1 Max without rosetta installed without problems. You probably had a different issue.
@cipolleschi can also tell you more about M1 support for building React Native.

@cortinico cortinico closed this Nov 4, 2024
@Biki-das
Copy link
Contributor Author

Biki-das commented Nov 4, 2024

Yeah i might be wrong but can we execute x84 commands? if rosetta is not installed by default, i was getting the hermes phase execution error. As i installed rosetta, it happened to make build successfully.

@cipolleschi
Copy link
Contributor

cipolleschi commented Nov 5, 2024

@Biki-das I suggest you to expand the error in Xcode to actually understand what you are missing.
Rosetta is not necessary, but there are a number of possible causes for the error you are seeing:

  1. you have not setup the NODE_BINARY variable properly in your xcode.env.local file
  2. you might have a stale version of Hermes
  3. Some other issue we have to investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants