Run x86 Apps (including homebrew) in the Terminal on Apple Silicon
41–50 of 148 posts
Re: Run x86 Apps (including homebrew) in the Terminal on Apple Silicon
#42I 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"?
Re: Run x86 Apps (including homebrew) in the Terminal on Apple Silicon
#43There'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... )"
Re: Run x86 Apps (including homebrew) in the Terminal on Apple Silicon
#44That'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.
No, 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
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.
Re: Run x86 Apps (including homebrew) in the Terminal on Apple Silicon
#45Re: Run x86 Apps (including homebrew) in the Terminal on Apple Silicon
#46I 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.
Re: Run x86 Apps (including homebrew) in the Terminal on Apple Silicon
#47Please don't hijack the arrow keys on web pages. People use them to scroll. Apologies for being off-topic.
Re: Run x86 Apps (including homebrew) in the Terminal on Apple Silicon
#48Earlier quoted context omitted.
Does this make brew compile subsequent binaries in x86 though? Or is it purely cosmetic.
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.
Re: Run x86 Apps (including homebrew) in the Terminal on Apple Silicon
#49Does 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
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-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-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)