Live data from Hacker News

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

notion.so

21–30 of 148 posts

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

#21

There's also the "arch" command, to run commands under rosetta2 I just installed Homebrew on my new m1 MacBook Air with: $ arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/in... )"

Awesome! I didn't know that. Thanks for sharing that will definitely come in handy!

Be warned that:

> Homebrew maintainer here. We don’t officially support Big Sur yet, but installing it via Rosetta will cause it to fetch x86 bottles instead of ARM ones. At least, that’s the plan.

It will create X86 binaries instead of ARM ones. (which might be a plus at the current moment)

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

#22
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.

Keep in mind that if you're using a Homebrew version of something Apple ships with macOS, for now, you'll get x86-64 binaries while Apple's version is a universal app and will run natively on the M1. Zsh from Homebrew: /usr/local/bin/zsh: Mach-O 64-bit executable x86_64 Apple's Zsh: /bin/zsh: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e…

That's good to know, have any of you tried bash? Bash for some reason can't be launched on multiple terminals and if tried it crashes.

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

#23
post #5

Please don't hijack the arrow keys on web pages. People use them to scroll. Apologies for being off-topic.

No worries. I use Notion for a lot of stuff and I just wanted to quickly throw something up on the web just in case it could help someone. Sorry it is not as accessible but I don't have a blog I own that I can make that kind of design decision on.

Interesting. What made you pick Notion instead of a free WP site with default everything?

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

#24

Earlier quoted context omitted.

No worries. I use Notion for a lot of stuff and I just wanted to quickly throw something up on the web just in case it could help someone. Sorry it is not as accessible but I don't have a blog I own that I can make that kind of design decision on.

Interesting. What made you pick Notion instead of a free WP site with default everything?

My guess is "I use Notion for a lot of stuff"

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

#25
post #18

I was surprised to see that we got native Ruby 2.6 and Python 3.8 in the box. I thought Apple had deprecated scripting languages.

Apple deprecated direct access to system-provided interpreter installations, which is a good thing. Interpreter support was not and will not be a problem, the implication of the deprecation is you should install your own copy of those interpreters instead.

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

#26
post #24

Earlier quoted context omitted.

Interesting. What made you pick Notion instead of a free WP site with default everything?

My guess is "I use Notion for a lot of stuff"

Lol yeah I just didn't feel like putting in the time to set anything else up.

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

#30
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"?
Post reply on HN