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

Document Rosetta 2 as a requirement for installation on Apple silicon (M1, M2, M3) #4368

Merged
merged 3 commits into from Feb 14, 2024

Conversation

mguaypaq
Copy link
Member

Rosetta 2 is needed to translate x86_64 executables (which we rely on) so they can run on the arm64 architecture of Apple silicon chips. This PR documents this requirement on the Mac installation page for SCT and in the SCT installer, which:

  • detects whether the computer is running macOS;
  • if so, it tries to run a builtin command (true) while requesting the x86_64 architecture;
  • if this fails, it offers to install Rosetta 2.

The new code mirrors the check for gcc which appears right below in the installer.

The test uses the arch command, which has different functionality on Linux than on macOS; see the linux manual page for arch and an old macOS manual page for arch. I checked on a recent M2 laptop, and the arch command now also recognizes arm64, arm64e, and x86_64h as architecture names, but otherwise seems to still work the same way.

Fixes #4342.

The installer also offers to launch the installation,
and gives the required command for manual installation.
@mguaypaq mguaypaq added installation category: install_sct or pip/setup.py documentation category: readthedocs, sourceforge, or SCT courses OS: macOS labels Feb 13, 2024
@mguaypaq mguaypaq added this to the 6.2 milestone Feb 13, 2024
Copy link
Member

@joshuacwnewton joshuacwnewton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had some small comments, but the bulk of this PR LGTM!

install_sct Show resolved Hide resolved
@joshuacwnewton joshuacwnewton merged commit f8d6d1f into master Feb 14, 2024
24 checks passed
@joshuacwnewton joshuacwnewton deleted the mgp/apple-rosetta branch February 14, 2024 19:36
@joshuacwnewton joshuacwnewton removed the documentation category: readthedocs, sourceforge, or SCT courses label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation category: install_sct or pip/setup.py OS: macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document better the need for Rosetta 2 on Apple Silicon (M1, M2, M3)
2 participants