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

Add another path where a Rosetta 2 daemon plist file is possibly located #5388

Merged
merged 1 commit into from
Oct 15, 2021

Conversation

yvt
Copy link
Member

@yvt yvt commented Oct 15, 2021

This PR fixes Rosetta 2 detection on macOS 11.5.0 and later.

#4310 updated Settings::getDefaultExtraPlatforms to detect the presence of Rosetta 2 and include x86_64-darwin automatically when eligible. It does so by checking the existence of a file at /Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist. However, as of macOS 11.5.0, this detection method stopped working because the file is now located in a different path /System/Library/LaunchDaemons/com.apple.oahd.plist. This PR introduces a check for this new path to fix this issue.

@edolstra edolstra merged commit c574ab3 into NixOS:master Oct 15, 2021
matthewbauer added a commit to matthewbauer/nix that referenced this pull request Nov 22, 2021
matthewbauer added a commit to matthewbauer/nix that referenced this pull request Nov 22, 2021
see:

NixOS#5388

and

NixOS#5251
(cherry picked from commit 08b1ac3)
dramforever pushed a commit to dramforever/nix that referenced this pull request Nov 27, 2021
@roberth
Copy link
Member

roberth commented Dec 24, 2021

This change has added x86_64-darwin to my machine, but when I build an x86_64-darwin derivation, it fails without an error message (although the lack of a message may be due to a low level exception handling bug that I'm fixing). When I invoke an intel executable manually, I get a "bad file descriptor" error.
I did not enable Rosetta on the machine; I've only installed nix and then nix-darwin on it.

I use an M1 with

> sw_vers                                                                                                                                                                                                                                                                            ~
ProductName:	macOS
ProductVersion:	11.6
BuildVersion:	20G165

it has the a file in the "new" location but it does not have an oahd process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants