Hacker News new | past | comments | ask | show | jobs | submit login

I haven't kept up too much about how they did this. Is this ultimately just about faking uname(2) in the homebrew scripts? I would imagine Apple would make the mach-o loader transparently run rosetta when they see an x86 binary in response to execve(2). In other words, why doesn't it "just work"?



Homebrew is just Ruby, so there’s no way for macOS to independently know that it should present a fake x86 system to this particular Ruby script (or shell script). But when you run an x86 binary, it should just work like you describe.


But wouldn't it load the right ruby interpreter? And anything installed via homebrew, it would also know how to exec?

The only problem I see is if you have a mix of different architectures wrt libraries.


This is because it tells Terminal (a universal binary) to launch in Rosetta, which will impose the preference on anything run inside of it. By default binaries with an arm64 slice will launch that preferentially.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: