22 ms·
Run x86 Apps (including homebrew) in the Terminal on Apple Silicon
- Aperocky 6y agoThat's not needed though, I manually extracted brew to /opt/homebrew per https://docs.brew.sh/Installation 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.
- macintux 6y agoIt doesn’t look like it’s fully baked yet. https://github.com/Homebrew/brew/issues/7857 https://github.com/Homebrew/brew/issues/7857
- Aperocky 6y agoYes I received very specific warning that I'm in uncharted waters. But I still wanted ARM binaries, the ones I did (htop, imagemagick, tmux etc) all worked.
- Smoosh 6y ago* not fully fermented
- saagarjha 6y agoFully brewed?
- Hackbraten 6y agoHopfully it’ll be ready soon.
- teilo 6y agoNo, not even close. There is more that doesn't work than works. Of what I use, all I got was python3 and git. But no python3.8, no ffmpeg, no erlang, no gnutls, and on and on. https://github.com/Homebrew/brew/issues/7857 https://github.com/Homebrew/brew/issues/7857
- x0x0 6y agoI looked through brew.sh. Apologies if I'm missing something, but I don't think I am. There's something really offensive about apple being too cheap to just pay some homebrew devs. And dumping the work of the arch swap onto charity effort.
- teilo 6y agoI just linked you to the official page which shows what works and what doesn't work, and your response is that you're still right and everything works?
- FraKtus 6y agoThere is no need of homebrew to install ffmpeg on Apple Silicon. I could just ./configure and make on the DTK. ffmpeg has so many configure options, I always avoid building it with brew.
- teilo 6y agoNot all of the dependencies are ready (most notably, gnutls won't yet compile), so it would be the same result. And for what I do, the default ffmpeg in Homebrew works fine.
- alwillis 6y agoKeep 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] /bin/zsh (for architecture x86_64): Mach-O 64-bit executable x86_64 /bin/zsh (for architecture arm64e): Mach-O 64-bit executable arm64e The Homebrew team is making progress; I've been seeing Big Sur "bottles" for a couple of days now.
- Aperocky 6y agoThat'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.
- lights0123 6y agoHuh, 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?).
- brigade 6y agoIn 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)
- saagarjha 6y agoThat remains true today.
- olliej 6y agoI good case where this would be necessary is if anything has in process plugins - I saw at least one review where the person had to restart their app (final cut maybe?) because the codec was an x86 binary - which it seemed to do more or less automatically.
- alwillis 6y agoEverything Apple’s responsible for is a Universal (or fat) binary. You can boot either architecture from a Big Sur drive.
- saagarjha 6y agoThe kernel is multiple files. There’s “kernel” for Intel Macs, “kernel.release.t8020” for DTK users, and “kernel.release.t8101” for the M1.
- crb002 6y agoWhat is the binutil to strip the x86? Is it still this command? http://hints.macworld.com/article.php?story=20050810112422666 http://hints.macworld.com/article.php?story=2005081011242266... --edit-- Sweet it works. cd /Applications; ditto --rsrc --arch arm64 GarageBand.app GarageBand-arm64.app
- qiqitori 6y agoPlease don't hijack the arrow keys on web pages. People use them to scroll. Apologies for being off-topic.
- JoshuaMulliken 6y agoNo 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.
- AlchemistCamp 6y agoInteresting. What made you pick Notion instead of a free WP site with default everything?
- wilg 6y agoMy guess is "I use Notion for a lot of stuff"
- JoshuaMulliken 6y agoLol yeah I just didn't feel like putting in the time to set anything else up.
- beowulfey 6y agoNotion is a notes app first and foremost but it’s possible to post a link to your notes publicly. It’s a neat feature but I didn’t realize they did that to the arrow keys
- _jal 6y agoReason #687 to run with JS off.
- gruez 6y ago
- ryancnelson 6y agoThere'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/install.sh https://raw.githubusercontent.com/Homebrew/install/master/in...)"
- Aperocky 6y agoDoes this make brew compile subsequent binaries in x86 though? Or is it purely cosmetic.
- woodruffw 6y agoHomebrew 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.
- Aperocky 6y agoAh.. I've extracted homebrew manually and it's been compiling ARM binaries for me - which is what I wanted it to do.
- Hackbraten 6y agoIf you’re ok with numerous formulae still breaking, you’ll be fine.
- frakkingcylons 6y agoOff-topic: Thanks for working on Homebrew btw! It just occurred to me that I've never donated despite using it so much but now I have. Link for others: https://github.com/homebrew/brew#donations https://github.com/homebrew/brew#donations
- woodruffw 6y agoThank you for the kind words, and for the donation!
- fnord77 6y agoa little more info on rosetta2 https://en.wikipedia.org/wiki/Rosetta_(software)#Rosetta_2 https://en.wikipedia.org/wiki/Rosetta_(software)#Rosetta_2
- saagarjha 6y agoThat’s really not a lot of information.
- teilo 6y agoOr just use iTerm, which is Intel-only so far.
- teilo 6y agoI 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.
- uranusjr 6y agoApple 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.
- teilo 6y agoYes, I understand that we can and should always install our own, and I have for years either with Homebrew or Conda. (Actually most of my development is python on Linux via Vagrant). But on the M1 Mini, out of the box, you can open Terminal, and python3 launches the Python 3.8 REPL. Python 2.7 also launches out of the box. So, can you explain what you mean by "direct access" not being allowed? I'm not following your distinction. It's damn convenient having python always available when managing a fleet of Macs with JAMF.
- my123 6y agoPython 3.8 for example got moved from the base OS install to Xcode's command line toolset. For developers, that doesn't change much.
- teilo 6y agoIt's in the base OS actually.
- my123 6y agoNope. Python2 is inbox, but Python3 redirects to the Xcode/developer tools copy. % sw_vers ProductName: macOS ProductVersion: 11.1 BuildVersion: 20C5048k % ls /Library/Python/ 2.7 % ls /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/ Headers Python3 Resources Versions % ls /System/Library/Frameworks/Python.framework/ Python Resources Versions
- Ericson2314 6y agoI wonder if Nix on macOS could become a better homebrew-killer by supporting Apple Silicon first. We already do aarch64-linux natively and some iOS cross compilation, so that should give us a head start.
- deleted 6y ago[deleted]
- rswail 6y agomacports is a better homebrew-killer IMHO. Follows MacOS guidelines and frameworks, integrates with the MacOS way in terms of launch agents etc.
- dehrmann 6y agoI gave up on homebrew and switched to macports after having to change directory permissions one time too many.
- Siira 6y agoMacports doesn’t install for me with no error messages.
- rbanffy 6y agoThat's very odd. Did you try to run the installer from a terminal to check if it says something?
- mschuster91 6y agoAnd especially it follows common Unix traditions - packages are installed in a system wide way without permission fuck-ups.
- soraminazuki 6y agoNix also runs and integrates with macOS too. Does macports do something that Nix doesn’t?
- 6y ago
- asveikau 6y agoI 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"?
- saagarjha 6y agoThis 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.
- varenc 6y agoHomebrew 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.
- asveikau 6y agoBut 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.
- zymhan 6y agoDoes Macports support Apple ARM? They have a Big Sur compatible version, so I'm inclined to think it can at least try compiling natively. https://www.macports.org/install.php https://www.macports.org/install.php
- saagarjha 6y agoYes, it does.
- rswail 6y agoNot all the ports in macports are big sur ready for x86. There are some dependencies in autoconf about warnings vs errors in defining implicit functions that has caught out some ports and others that use the "search for the .so" instead of dlopen to check for a library. clang now defaults to error if you turn on the implicit-function-definition warning. [1] Big Sur doesn't actually store the .so files for system libraries, it has one big .sym/.so for all of them. [2] [1] https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes https://developer.apple.com/documentation/xcode-release-note... under Apple Clang Compiler: Clang now reports an error when you use a function without an explicit declaration when building C or Objective-C code for macOS (-Werror=implicit-function-declaration flag is on). This additional error detection unifies Clang’s behavior for iOS/tvOS and macOS 64-bit targets for this diagnostic. (49917738) [2] https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-release-notes https://developer.apple.com/documentation/macos-release-note... under Kernel: New in macOS Big Sur 11.0.1, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache. (62986286)
- harrygeez 6y agoyes if a precompiled version doesn't exist it will compile on your machine
- deleted 6y ago[deleted]
- obilgic 6y agoOr manually install by just git cloning, so that everything else compiles for the m1, instead of using x86
- codecamper 6y agocrazy apple forgot to do this. they are forgetting their base, as per usual.
- arthurcolle 6y agoHi OP, sorry for the aside, but how do you take good looking terminal photos like the first pic in the post?
- the_mitsuhiko 6y agoTaking a screenshot on a mac.
- arthurcolle 6y agoLike the window screenshot? Got it. How does it have the cool fade shadow, automatic?
- kec 6y agohttps://support.apple.com/en-us/HT201361 https://support.apple.com/en-us/HT201361 yes, the drop shadow is automatic if you use the window capture mode.
- janfoeh 6y agoBy the way, you can capture windows without drop shadow if you hold Option while selecting the window: 1. Press CMD + Opt + 4 to enter selection mode 2. Press Space to switch to window selection mode 3. Hold Opt and click
- a-dub 6y agoare there any benchmarks of x86-64 homebrew ports running under rosetta2 vs the last generation of intel macs? how about stuff like python, webservers or java apps running in x86-64 linux docker containers? very curious what the effects are of the new arch on common developer use cases. (without having to recompile/rebuild everything for apple arm)
- ricardobeat 6y agoNot for Homebrew but some benchmarks here: https://www.anandtech.com/show/16252/mac-mini-apple-m1-tested/6 https://www.anandtech.com/show/16252/mac-mini-apple-m1-teste...
- a-dub 6y agoi guess the gcc bench confirms, "yep, it's not native." cool that they do as much transpilation as possible at install time, and then jit the rest at runtime though. i'm curious how this all works in context of linux container runtime and if there are additional overheads...
- a-dub 6y agoall that said, i think the big screwup here is that the SoC only supports two displays where the intel chipset supported three or four. only being able to drive a single external display (after years of supporting multiple) is pretty bad, i doubt jobs would have let that one slip... (no matter how much cool engineering went into making the arm arch a reality)
- supergirl 6y agowhy do people keep using this marketing fluff word "Apple Silicon"? should just call it Apple M1
- therealmarv 6y agoThat won't help running Docker and VirtualBox. There's also a big chance VirtualBox will never make it to M1 ;(
- jeroenhd 6y agoAS has support for virtualisation so VirtualBox will probably make it, but most likely only for running operating systems that run on ARM. There's very little preventing VB for being used as a tool to run the ARM versions of Linux or your favourite flavour of BSD, but Windows probably won't work (not until MS releases a download for Windows on ARM, at least). So, VirtualBox itself will work, but using it to run Windows applications won't. The same is true for Docker, when someone gets a Linux VM to boot, Docker becomes a possibility just like on a normal version of macOS. In the end I think it's only a matter of time before someone manages to combine Rosetta and virtualisation instructions (even though Apple says they don't support it) and fast-ish x64 emulation becomes a possibility. It will likely require some huge hacks that won't be allowed into the app store, but if Apple doesn't lock down the platform more with upcoming OS releases, developers and other technical-minded people will run that stuff just fine.
- WatchDog 6y agoThere are windows aarch64 builds available via various means. Although the windows arm software ecosystem is dismal.
- my123 6y agoVarious means? The official way is at https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewARM64 https://www.microsoft.com/en-us/software-download/windowsins...
- my123 6y agoVirtualBox won't be ported to any Arm64 platform, Oracle explicitly said that they wouldn't do it. However, Parallels and VMWare Fusion will. You'll also have other solutions around. Also, no App Store requirement on macOS at all.
- sjmulder 6y agopkgsrc, 'the portable package manager', support Apple Silicon: http://pkgsrc.org/ http://pkgsrc.org/ No binary packages yet, but using it from source is pretty much a matter of downloading and extracting the 'current bz2', then: cd pkgrsc/bootstrap ./bootstrap --prefix=/opt/pkg The default prefix is /usr/pkg, but that's protected by macOS' SPI. You might want to add /opt/pkg/bin and sbin to your $PATH. Then to install a package: cd pkgsrc/sysutils/nnn bmake install clean Full documentation, including on how to create your own packages: http://www.netbsd.org/docs/pkgsrc/ http://www.netbsd.org/docs/pkgsrc/
- pierrebeaucamp 6y agoThanks so much for the comment - I was trying to do that with the stable source yesterday evening with no success. Saw your tweet too, but don't have Twitter to ask you over there. Current source works fine
- jzer0cool 6y agoDoes this mean you can run almost any app you had before M1 in x86 mode?
- saagarjha 6y agoYes.
- reacharavindh 6y agoalmost* No x86 virtual machines though. Apple doesnt allow emulation and virtualisation together.
- mathfailure 6y agono, thanks.
- varispeed 6y agoWould running X86 require licensing? If Intel doesn't say anything then could Apple in a couple of years develop their own X86 CPU by turning Rosetta into a hardware solutions? Technically it should be possible - as Transmeta has done something similar, but cannot find if they got a license from Intel or it was not needed. https://en.wikipedia.org/wiki/Transmeta https://en.wikipedia.org/wiki/Transmeta
- soraminazuki 6y agoIt’s likely not what Apple needs, though. They probably need a solution they can maintain long enough to let the transition through, but not any longer. They’d drop support for x86 as soon as enough applications gain support and existing x86 products get dated. Maybe 5 years?
- mlindner 6y agoI've read that Rosetta 2 doesn't actually emulate x86 and only emulates x86_64 which is owned by AMD, not Intel.
- bstar77 6y agoDoes anyone know if arm64 compiled javascript binaries will work on x86 systems?
- cmiljkovic 6y agowhen software like brew finally becomes available on Apple Silicon natively. How can I delete all this stuff I need to download under Rosetta? I don't want to have duplicate stuff
- JoshuaMulliken 6y agoYou can replace `install.sh` in the install script with `uninstall.sh`
- cmiljkovic 6y agothanks!
- lukasM1 6y agoI'm trying to run some python code (from Pycharm). Since the specific version of tensorflow i need is not compatible with M1, I already get stuck at import tensorflow. How can i tell my mac to Rosetta 2? I know when I want to run something specific from the terminal, I can use "arch -x86_64"... but what do I do here?