Live data from Hacker News

Run x86 Apps (including homebrew) in the Terminal on Apple Silicon

notion.so

31–40 of 148 posts

Re: Run x86 Apps (including homebrew) in the Terminal on Apple Silicon

#33
post #2

That's not needed though, I manually extracted brew to /opt/homebrew per https://docs.brew.sh/Installation , and it works just fine in the native terminal. file htop returns htop: Mach-O 64-bit executable arm64 So this version of brew is compiling native arm64 code.

It doesn’t look like it’s fully baked yet. https://github.com/Homebrew/brew/issues/7857

* not fully fermented

Re: Run x86 Apps (including homebrew) in the Terminal on Apple Silicon

#34

Huh, so Apple is installing both the ARM and x86 version of apps, even on ARM computers. I guess that makes sense for portability, but I don't know if other parts of the root filesystem are one architecture only, such as the path to the kernel (unless that's a fat binary too?).

The kernel is multiple files. There’s “kernel” for Intel Macs, “kernel.release.t8020” for DTK users, and “kernel.release.t8101” for the M1.

Re: Run x86 Apps (including homebrew) in the Terminal on Apple Silicon

#38

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"?

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.

Re: Run x86 Apps (including homebrew) in the Terminal on Apple Silicon

#40
post #4

Huh, so Apple is installing both the ARM and x86 version of apps, even on ARM computers. I guess that makes sense for portability, but I don't know if other parts of the root filesystem are one architecture only, such as the path to the kernel (unless that's a fat binary too?).

In the PPC -> x86 transition, the same hard drive could be used to boot both PPC and x86 Macs (e.g. via target disk mode or external HDDs)

That remains true today.
Post reply on HN