Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
39.45k stars 9.24k forks source link

macOS 11 Big Sur compatibility on Apple Silicon #7857

Closed claui closed 3 years ago

claui commented 3 years ago

Latest news on native ARM compatibility


A detailed description of the proposed feature

This is an overview of compatibility issues and work items related to native ARM Homebrew installations on macOS 11.0 (Big Sur). Homebrew doesn’t support it right now but we need to track and triage those items nonetheless.

The motivation for the feature

macOS 11.0 (Big Sur) has been released to the public, and our goal is for Homebrew to support it.

How the feature would be relevant to at least 90% of Homebrew users

In the long run, more than 90 % of Homebrew (macOS) users are going to run Apple Silicon hardware.

What alternatives to the feature have been considered

No alternatives.


Major blockers

Status of core formulae

Formula Works1
on 11.0
Comments
ack 🥇
adns 🥇
adwaita-icon-theme
aircrack-ng
ansible
ant Re-check when openjdk works
aom 🥇 Patched for now
apache-spark
apr-util 🥇
apr 🥇
argon2 🥇
arpack
asciidoc 🥇
asdf
aspell 🥇
atk
augeas 🥇
autoconf 🥇
autojump
automake 🥇
aws-elasticbeanstalk 🥇
aws-iam-authenticator Re-check when go works
awscli ⚠️ Build fails with a distutils.errors.DistutilsClassError, see logs.
Possibly related to setuptools: https://github.com/pypa/setuptools/pull/2231
azure-cli 🥇
bash-completion 🥇
bash ⚠️ make says, redefinition of 'sys_siglist' with a different type: 'char *[32]' vs 'const char *const [32]'. Logs
bat Re-check when rust works
bazel Re-check when openjdk@11 works
bdw-gc
berkeley-db 🥇
binutils 🥇
bison 🥇
blueutil 🥇
boost 🥇 Patched for now
brotli 🥇
c-ares 🥇
cabal-install Re-check when ghc works
cairo 🥇
cargo-c Builds in rust prereleases; will work when a stable Rust with Apple Silicon support ships
carthage 🥇 Patched for now
cask Re-check when emacs works
ccache 🥇

Used to work, no longer builds. Logs

Says:

invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size

ceres-solver
certbot 🥇
cfitsio 🥇
cgal Re-check when qt works
circleci Re-check when go works
clang-format 🥇
cloc 🥇
cmake 🥇
cocoapods ⚠️ Error Unrecognized Mach-O load command: 0x80000034 in ffi_c.bundle
colordiff 🥇
composer 🥇
consul Re-check when go works
coreutils 🥇
cscope 🥇
ctags 🥇
cunit 🥇
curl 🥇
curl-openssl 🥇
cython 🥇
dav1d 🥇
daemontools 🥇
deno Re-check when llvm and rust work
dep Re-check when go works
dialog 🥇 Patched for now
direnv Re-check when go works
dnsmasq 🥇
docbook-xsl 🥇
docbook 🥇
docker Re-check when go works
docker-completion 🥇
docker-machine Re-check when go works
doctl Re-check when go works
dos2unix 🥇
doxygen 🥇
duti 🥇 Patched for now. PR also submitted upstream.
eigen 🥇
elasticsearch Re-check when gradle and openjdk work
elixir Re-check when erlang works
emacs Re-check when gnutls works
epsilon 🥇
epstool Re-check when ghostscript works
erlang ⚠️ Either we need to backport https://github.com/erlang/otp/pull/2700 or wait for upstream release 23.1.
Same with https://github.com/erlang/otp/pull/2687.
exiftool 🥇
expat 🥇
fastlane 🥇
fd Re-check when rust works
ffmpeg Re-check when gnutls, libbluray and several other dependencies work
fftw Re-check when gcc and open-mpi work
fig2dev Re-check when ghostscript and netpbm work
figlet 🥇
findutils 🥇
fish 🥇
flac 🥇
fltk
fontconfig 🥇 Patched for now
fontforge
freetds 🥇
freetype 🥇
freexl ⚠️ Build error: implicitly declaring library function 'printf' Logs
frei0r 🥇
fribidi 🥇
fswatch
fzf
gawk 🥇
gcal 🥇
gcc ⚠️

@Iains has some work in progress on https://github.com/iains/gcc-darwin-arm64 to port the GCC backend to Apple Silicon.

Mind that Apple Silicon support is going to require GCC 11 even in the best case. The first stable release of GCC 11 may come out in mid-2021 or later. If you absolutely require a stable GCC, or any formula that depends on it, you may want to hold off your Apple Silicon Mac purchase decisions until it’s clear if or when GCC will support it.

For limited testing on Apple Silicon, Homebrew may consider shipping an unstable GCC 11 but that’s yet to be decided.

gdal Re-check when expat, freexl, geos, hdf5 and a dozen of other dependencies work
gdbm 🥇
gdb
gdk-pixbuf
gd 🥇
geckodriver
geos ⚠️ Squeals about duplicate symbol BasicSegmentString in inlines.o vs. libnoding.a. Logs
gettext 🥇
gflags
ghc ⚠️ Re-check when https://github.com/Homebrew/homebrew-core/pull/57892 is merged
ghc@8.8
ghostscript ⚠️ Re-check when https://github.com/Homebrew/homebrew-core/pull/58493 is merged
giflib 🥇
git ⚠️ Lots of Undefined symbols for architecture arm64. Possibly related to libintl and pcre2. Logs
git-flow
git-gui
git-lfs
gitlab-runner
gl2ps
glew
glib-networking
glib 🥇
glog
glpk
gmp 🥇
gnu-getopt 🥇
gnu-sed 🥇
gnu-tar 🥇
gnupg Re-check when gnutls works
gnuplot
gnutls Re-check pending
gobject-introspection 🥇
go ⚠️

Bootstrapped go (x86_64) is killed at build time. Logs

Re-check when upstream 1.16 is released

gpatch 🥇
gpgme
gradle Re-check when openjdk works
grafana
graphicsmagick
graphite2 🥇
graphviz Re-check when gts works
grep 🥇
groonga 🥇
groovy
grpc
gsettings-desktop-schemas
gsl
gst-plugins-bad
gstreamer
gtk+3
gtk+
gtk-mac-integration
gts Re-check when netpbm works
guile 🥇 Fixed
harfbuzz 🥇
hdf5 Re-check when gcc works
helm Re-check when go works
helm@2 Re-check when glide and go work
hicolor-icon-theme
highlight 🥇
htop 🥇
httpd 🥇
httpie 🥇
hub Re-check when go works
hugo Re-check when go works
hwloc 🥇
icu4c 🥇
ideviceinstaller 🥇
ilmbase 🥇
imagemagick@6 🥇
imagemagick Re-check when ghostscript, libheif and libomp work
inetutils 🥇
ios-deploy 🥇
ios-webkit-debug-proxy 🥇
iperf3 🥇
ipython 🥇
isl 🥇
itstool 🥇
jansson 🥇
jasper 🥇
jemalloc 🥇
jenkins Re-check when openjdk@11 works
jenkins-lts Re-check when openjdk@11 works
jenv 🥇
jmeter
jpeg 🥇
jq 🥇
json-c 🥇
jupyterlab Re-check when pandoc works
kafka Re-check when openjdk (or some other form of Java) and zookeeper work
kops
kotlin Re-check when openjdk (or some other form of Java) works
krb5 🥇 Patched for now. Patch submitted to upstream issue tracker.
kubectx
kubernetes-cli Re-check when go works
kustomize
lame 🥇
ldns
leptonica 🥇
libarchive
libassuan 🥇
libass 🥇
libb2
libbluray Re-check when openjdk (or some other form of Java) works
libcbor
libcerf
libcroco
libdap
libde265 ⚠️ ARM assembly/macros/directives fail at build time. Re-check needed with the correct triple. Logs
libepoxy
libevent 🥇
libev 🥇
libexif
libffi 🥇 Patched for now, awaiting upstream patches: https://github.com/libffi/libffi/pull/565
libfido2
libgcrypt 🥇
libgeotiff
libgit2 🥇
libgpg-error 🥇
libheif Re-check when libde265 works
libiconv 🥇
libidn2 🥇
libidn 🥇
libilbc 🥇
libimobiledevice 🥇
libksba 🥇
liblqr 🥇
libmagic 🥇
libmaxminddb 🥇
libmetalink 🥇
libmpc 🥇
libnet
libogg 🥇
libomp ⚠️ make install fails while trying to make sense of x86_64 assembly for Linux. Logs
libp11
libplist 🥇
libpng 🥇
libpq 🥇
libpsl
librdkafka
libressl
librsvg
libsamplerate 🥇
libscrypt 🥇
libsmi 🥇
libsndfile 🥇
libsodium 🥇
libsoup
libsoxr 🥇
libspatialite
libspiro
libssh 🥇
libssh2 🥇
libtasn1 🥇
libtermkey
libtiff 🥇
libtool 🥇
libuninameslist
libunistring 🥇
libusb-compat
libusbmuxd 🥇
libusb 🥇
libuv 🥇
libvidstab 🥇
libvirt
libvorbis 🥇
libvpx 🥇
libvterm
libwebsockets
libxml2 🥇
libxslt
libyaml 🥇
libzip 🥇
little-cms2 🥇
llvm 🥉 Builds if OpenMP is disabled. Stable builds don't work, but HEAD does and 11.0.0 will be compatible.
lua 🥇
lua@5.1 🥇
luajit ⚠️ Fails with 2.0.5 but should work when upstream 2.1.0 is released.
luarocks 🥇
lynx 🥇 Patched for now
lz4 🥇
lzo 🥇
macvim
mad ⚠️ Configure error: /bin/ksh ./config.sub -apple-darwin20.0.0 failed Logs
make
mariadb Re-check when groonga works
mas 🥇 Fixed
maven Re-check when openjdk works
mbedtls
mcrypt
mecab 🥇
mecab-ipadic 🥇
memcached
mercurial 🥇
meson 🥇
metis
midnight-commander
minikube
minizip 🥇
mitmproxy
mkcert
mkvtoolnix
mono
mosh
mpfr 🥇
mpv
msgpack 🥇
mtr
mujs
mutt
mysql ⚠️ The build proceeds to completion but mysqld_safe fails with syntax error near unexpected token 'then' in line 831.
mysql@5.6 ⚠️ make errors out after building the target event_extra. Logs
mysql@5.7 ⚠️ Builds but mysqld_safe fails: syntax error near unexpected token 'then' in line 804.
mysql-client 🥇
nano 🥇
nasm 🥇
ncdu
ncurses 🥇
neofetch
neovim ⚠️ Upstream PR in progress: https://github.com/neovim/neovim/pull/12624
netcdf
netpbm Re-check when subversion works
nettle 🥇 Patched for now
nghttp2 🥇
nginx 🥇
ninja 🥇
nmap 🥇 Fixed
node 🥇

Patched for now.

See also https://github.com/nodejs/node/issues/34043 and https://github.com/nodejs/TSC/issues/886 for upstream progress.

node@10
node@12 🥇
node-build
nodebrew
npth 🥇
nspr 🥇
nss ⚠️ Build fails while loading softokn3. Logs
ntfs-3g
numpy
nvm
ocaml Upstream PR merged, see https://github.com/ocaml/ocaml/pull/9699.
4.10 backport in progress, see https://github.com/ocaml/ocaml/pull/10026.
4.10 formula-patches PR: https://github.com/Homebrew/formula-patches/pull/318
octave
oniguruma 🥇
opam
open-mpi Re-check when gcc works
openblas
openconnect
opencore-amr
opencv
openexr 🥇
openjdk ⚠️ Needs to be ported (logs). See also related JEP draft: MacOS/AArch64 Port
openjdk@11
openjpeg 🥇
openldap 🥇
openssh
openssl aka openssl@1.1 🥇

Patched for now.

Works well enough until the upstream fix is released.

openvpn 🥇
opusfile 🥇
opus 🥇
orc
p11-kit 🥇
p7zip 🥇
packer Re-check when go works
pandoc Re-check when cabal-install and ghc work
pango 🥇 Patched for now
parallel 🥇
pcre2 🥇 Note: JIT disabled for now. See https://github.com/Homebrew/homebrew-core/pull/57419
pcre 🥇 Note: JIT disabled for now. See https://github.com/Homebrew/homebrew-core/pull/57410
perl 🥇 Patched for now
php@7.2 ⚠️ Seems more difficult to fix than php. Might want to triage as 🚫.
php@7.3 ⚠️ Seems more difficult to fix than php. Might want to triage as 🚫.
php 🥇 Fixed
pinentry 🥇
pipenv 🥇
pixman 🥇
pkcs11-helper 🥇
pkg-config 🥇
plantuml
poppler Re-check when nss and qt work
popt 🥇
portaudio 🥇
postgis Re-check when gdal, geos, gpp and sfcgal work
postgresql 🥇
postgresql@9.6
postgresql@10
postgresql@11
pre-commit 🥇
proj 🥇
protobuf 🥇
protobuf-c 🥇
pstoedit
pstree 🥇
pulumi
putty 🥇
py3cairo
pyenv ⚠️ Bash crashes due to code signature error when trying to load pyenv-realpath.dylib as a builtin. Log
pyenv-virtualenv
pygobject3
pyqt
python@3.7 ⚠️ Patch https://github.com/python/cpython/pull/21249 fails. Re-check when upstream arm64 support stabilises.
python@3.8 🥉

Patched for now but brew test fails.

Re-check after https://github.com/Homebrew/homebrew-core/pull/64872 is merged.

python aka python@3.9 🥉

brew test currently fails.

Re-check after https://github.com/Homebrew/homebrew-core/pull/64869 is merged.

qemu
qhull
qrupdate
qt ⚠️ Fails running find_sdk.py late in the build. (logs, full make log)
rabbitmq Re-check when erlang works
rav1e Re-check when cargo-c and rust work
rbenv
rclone
readline 🥇
redis 🥇 Patched for now
rename
ripgrep
rsync
rtmpdump 🥇
rubberband
ruby-build
ruby@2.5
ruby 🥇
rust ⚠️ Upstream tracking issue: https://github.com/rust-lang/rust/issues/73908
rustup-init
s-lang
s3cmd
sbcl
sbt
scala
scrcpy
screenresolution 🥇
sdl2
sdl 🥇
sfcgal Re-check when cgal works
shared-mime-info 🥇
shellcheck Re-check when cabal-install, ghc@8.8 and pandoc work
sip
skaffold
snappy 🥇
socat
source-highlight 🥇
sox Re-check when mad works
spandsp 🥇
speedtest-cli
speex 🥇
sphinx-doc 🥇
sqlite 🥇
sqlmap
srt ⚠️ Fails with 'GLES/gl.h' file not found during make install. Logs
ssh-copy-id
sshfs
sshpass
sshuttle
starship
stoken
subversion 🥉 Works but brew test fails. Logs.
suite-sparse
sundials
swagger-codegen
swiftformat
swiftlint 🥇
swig 🥇
szip 🥇
tbb 🥇 Patched for now
tcl-tk
telnetd 🥇
telnet 🥇
terraform Re-check when go works
terragrunt
tesseract 🥇
texinfo 🥇
tfenv
tflint
thefuck 🥇
theora 🥇
the_silver_searcher
tidy-html5 🥇
tig
tmux 🥇
tomcat
tor 🥇
tree 🥇
uchardet
unar 🥇
unbound 🥇
unibilium
unixodbc 🥇
unrar 🥇
utf8proc 🥇
v8
vala Re-check when graphviz works
valgrind
vapoursynth
vault
vde
vim 🥇
vips
watchman
watch
webp 🥇
wget 🥇
wimlib
winetricks
wireshark
wxmac
x264 🥇 Patched for now
x265 🥇
xcodegen ⚠️ Not compatible with Xcode 12.
Re-check with upstream version > 2.17.0 once released.
xerces-c
xmlto 🥇
xvid 🥇
xxhash 🥇
xz 🥇
yara 🥇
yarn 🥇
yasm 🥇 Note: doesn’t support ARM targets
youtube-dl 🥇
yq Re-check when go works
zeromq 🥇
zimg 🥇
zlib 🥇
zookeeper Re-check when ant works
zsh 🥇
zsh-autosuggestions 🥇
zsh-completions 🥇
zsh-syntax-highlighting 🥇
zstd 🥇
Source
curl -sLS \
  'https://formulae.brew.sh/api/analytics/install/90d.json' \
  | jq -r '.items
    | map(select (.formula | contains("/") | not) | .formula)[:512]
    | sort
    | [""] + map("`\(.)`")
    | map([., "", ""] | @csv)
    | .[]
    ' \
  | pandoc -f csv -t gfm \
  | sed -e 's/\\`/`/g'

1 For Works on 11.0, the key is:

Bo98 commented 3 years ago

Homebrew’s linkage checker doesn’t support the shared dyld cache yet

It does as of 9c4aaa9719c74b78ff5dca4667788b3426a48678.

MikeMcQuaid commented 3 years ago
  • [ ] install.sh downloads macOS 10.16 CLT

Fixed in https://github.com/Homebrew/install/pull/317

jedisct1 commented 3 years ago

libsodium formulae work fine on Apple Silicon.

Both the release and HEAD.

claui commented 3 years ago

Thanks @jedisct1. Noted.

indirect commented 3 years ago

The fiddle issue is fixable by installing HEAD:

$ git clone https://github.com/ruby/fiddle
$ cd fiddle
$ bundle install --path vendor/bundle
$ bundle exec rake build
$ sudo gem install pkg/fiddle-1.0.1.gem

OpenSSL works with a workaround config change.

dmzimmerman commented 3 years ago

$ bundle install --vendor/bundle should be $ bundle install --path vendor/bundle, above.

indirect commented 3 years ago

@dmzimmerman thank you, fixed!

claui commented 3 years ago

Updated issue description with @indirect’s workaround. Thanks!

BytesGuy commented 3 years ago

htop seems to work fine, builds to native arm with no problems:

adam@Adams-Mac ~ % file /usr/local/bin/htop 
/usr/local/bin/htop: Mach-O 64-bit executable arm64
BytesGuy commented 3 years ago

Telnet works but builds for x86_64. PR submitted to build for arm64 https://github.com/Homebrew/homebrew-core/pull/57303

FigBug commented 3 years ago

I'm getting the following error, any idea how to continue?

Error: Could not find an SDK that supports macOS 11.0.
You may have have an outdated or incompatible CLT.
Homebrew found the following SDKs in the CLT install:
  10.16
  10.15

Please update CLT or uninstall it if no updates are available.
claui commented 3 years ago

@FigBug If you’re on macOS 11, you need Xcode 12 for macOS Universal Apps beta installed. Then run:

sudo xcode-select --switch /Applications/Xcode-beta.app/Contents/Developer
FigBug commented 3 years ago

@claui I'm running macOS 11.0 Beta (20A5299w) with Xcode 12.0 beta (12A8158a) on the DTK. After running xcode-select as you suggested, I still get the above error.

MikeMcQuaid commented 3 years ago

@FigBug Please don't ask us for help while you're running an unsupported version of macOS.

Bo98 commented 3 years ago

I tried to make the error as clear as possible.

Please update CLT or uninstall it if no updates are available.

If it isn't, please open a pull request making it clearer.

axello commented 3 years ago

First timer here: How can we help Big Sur compatibility on ARM Macs if we are indeed running an unsupported version of macOS? I see in this list that cocoapods is unchecked yet. But I needed it, so I tried to install. "Error: Failed to read Mach-O binary." on all the "ffi_c.bundle" files.

Should I create a new 'issue', or is this part of the 'Big Sur compatibility' list?

claui commented 3 years ago

Should I create a new 'issue', or is this part of the 'Big Sur compatibility' list?

Thank you for reaching out, and welcome to the Homebrew community @axello.

Please don’t create an issue. Homebrew does not yet support Big Sur so issues aren’t helpful right now. cocoapods being unchecked means we didn’t even get around to checking it yet for Big Sur compatibility.

Your options are to either wait until it’s cocoapods’s turn to be checked and fixed, or help us by filing a pull request.

Bo98 commented 3 years ago

I believe the Cocoapods issue is known by Apple themselves, as I think it is a system Ruby bug.

MikeMcQuaid commented 3 years ago

How can we help Big Sur compatibility on ARM Macs if we are indeed running an unsupported version of macOS?

Submit PRs to fix things. Almost every issue we have had so far has been already known. We know things aren't working. We need help fixing things not telling us what isn't working.

gregcotten commented 3 years ago

re: ilmbase - looks like this pull request straightens out arm64 macOS support. Once cmake build is fixed there shouldn't be a problem building openexr and ilmbase.

HaydenPeake commented 3 years ago

Is feedback on untested Formula in the above table useful? For example, I've installed and tested zlib on the DTK, and it appears to work correctly.

claui commented 3 years ago

Is feedback on untested Formula in the above table useful? For example, I've installed and tested zlib on the DTK, and it appears to work correctly.

@HaydenPeake Feedback on formulae that work correctly is welcome. It means we can update the table immediately, which benefits everyone.

DodgyTim commented 3 years ago

I've submitted a PR to get pcre working on arm64: https://github.com/Homebrew/homebrew-core/pull/57410 This is only a surface level fix at this point; it just turns off JIT. Edit: disabling JIT also fixes the crash in pcre2, I have yet to submit a PR for this. Again, it seems like a short term fix only.

segiddins commented 3 years ago

brew install cmake --HEAD seems to work for me! (the big sur release notes say Workaround: Update to CMake 3.18rc1. so I'm not terribly surprised)

gregcotten commented 3 years ago

brew install cmake --HEAD seems to work for me! (the big sur release notes say Workaround: Update to CMake 3.18rc1. so I'm not terribly surprised)

Not sure how you did that unless python3.8 was patched a few hours ago... Unless you aren’t building on Apple Silicon.

segiddins commented 3 years ago

sorry, should've been more specific -- python@3.8 only required the 3 linked PRs patched in: https://github.com/indirect/homebrew-core/commit/273ca33444d627421992cc71bbe2d597487f94b4

some of the stuff downstream from cmake works as well, such as tmux

DodgyTim commented 3 years ago

Created a PR for the pcre2 segfault -- again, just a workaround: https://github.com/Homebrew/homebrew-core/pull/57419

DodgyTim commented 3 years ago

For table update purposes, here's a list of formula with incomplete status which I happen to have tried on the DTK. I did an install and test and they seemed to function correctly:

frustum commented 3 years ago

Hello All,

This is a simple patch to fix Python@3.8 formula on arm64.

python.diff.txt

BytesGuy commented 3 years ago

I think it would also be good to check whether formula are building arm64 or x86_64. Even though x86_64 will (mostly) work, the way forward is to get everything building natively 🙂

For example, telnet did build and work, but was x86_64 until my patch https://github.com/Homebrew/homebrew-core/pull/57303

Bo98 commented 3 years ago

I think it would also be good to check whether formula are building arm64 or x86_64.

I absolutely agree. The wish is to have an audit which verifies if the output binaries are built natively - it's just that no one has done it yet.

The audit likely requires a way to make exceptions because I do think some formulae intentionally build non-native binaries for some cases, like parts of LLVM for iOS or something.

claui commented 3 years ago

PSA: the preliminary fix for python@3.8 has been merged. Should work now except for Tk support. Formula promoted to 🥉 for now.

BytesGuy commented 3 years ago

I think it would also be good to check whether formula are building arm64 or x86_64.

I absolutely agree. The wish is to have an audit which verifies if the output binaries are built natively - it's just that no one has done it yet.

The audit likely requires a way to make exceptions because I do think some formulae intentionally build non-native binaries for some cases, like parts of LLVM for iOS or something.

I'd be happy to help with this! I've manually gone through some already and a fair number are building arm64 with no updates which is great. If we had an automated setup that would be even better 🙂

BytesGuy commented 3 years ago

FWIW I have been trying to bootstrap go to avoid the x86_64 kill at startup, but with no joy. Just found the tracking issue for this https://github.com/golang/go/issues/38485 Seems like we will be blocked for the moment

frustum commented 3 years ago

PSA: the preliminary fix for python@3.8 has been merged. Should work now except for Tk support. Formula promoted to 🥉 for now.

Thank you! It is possible to build meson with ctype Python fix. Glib and midnight-commander is buildable after that by removing libffi dependency from glib.

brunophilipe commented 3 years ago

After getting GMP to build using https://github.com/Homebrew/homebrew-core/pull/57315/files#diff-e16a29aaf7be91f5224126d4f764738b, nettle fails to build on Apple Silicon because it also uses lots of assembly code. Example:

clang -I.  -DHAVE_CONFIG_H -g -O2 -ggdb3 -Wall -W -Wno-sign-compare   -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes   -Wpointer-arith -Wbad-function-cast -Wnested-externs   -c aes128-set-encrypt-key.c \
    && true
aes-decrypt-internal.s:67:2: error: unrecognized instruction mnemonic
 teq r3, #0
 ^aes-encrypt-internal.s
:75:2: error: unrecognized instruction mnemonic
 teq r3, #0
 ^
BytesGuy commented 3 years ago

After getting GMP to build using https://github.com/Homebrew/homebrew-core/pull/57315/files#diff-e16a29aaf7be91f5224126d4f764738b, nettle fails to build on Apple Silicon because it also uses lots of assembly code. Example:

clang -I.  -DHAVE_CONFIG_H -g -O2 -ggdb3 -Wall -W -Wno-sign-compare   -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes   -Wpointer-arith -Wbad-function-cast -Wnested-externs   -c aes128-set-encrypt-key.c \
  && true
aes-decrypt-internal.s:67:2: error: unrecognized instruction mnemonic
 teq r3, #0
 ^aes-encrypt-internal.s
:75:2: error: unrecognized instruction mnemonic
 teq r3, #0
 ^

Created a PR with a temporary fix for this issue until arm64 support is available upstream https://github.com/Homebrew/homebrew-core/pull/57455

stuartcarnie commented 3 years ago

OpenSSL 1.1.1 PR openssl/openssl/pull/12369 submitted

adib commented 3 years ago

Reporting issue with cocoapods – building from source would fail due to a missing xcodeprojdependency:

Command:

brew install --build-from-source cocoapods

Error:

==> gem install cocoapods-1.9.3.gem
Error: An exception occurred within a child process:
  Errno::ENOENT: No such file or directory - /usr/local/Cellar/cocoapods/1.9.3/libexec/bin/xcodeproj
claui commented 3 years ago

@adib Thank you. We’re really just getting started so reporting breakage isn’t helpful at this time. Appreciate your report but marking it OT to keep the page focused.

BytesGuy commented 3 years ago

Findings from today:

claui commented 3 years ago

PSA: The pcre, pcre2 and gmp fixes have landed. Special thanks to @BytesGuy and @DodgyTim who helped remove those roadblocks. 🎉

claui commented 3 years ago
  • gd - installs fine, passes tests and binaries are arm64
  • libplist - installs fine, passes tests and binaries are arm64

@BytesGuy Noted, thanks for the heads up!

  • libimobiledevice - installs fine, passes tests and binaries are arm64

~PR filed to make libimobiledevice (stable) pass brew audit: https://github.com/Homebrew/homebrew-core/pull/57555~ Update: Installs and works fine now, both stable and --HEAD.

BytesGuy commented 3 years ago

carthage works with this patch and builds a native binary (also resolves issues on Intel): https://github.com/Homebrew/homebrew-core/pull/57572

BytesGuy commented 3 years ago

fish - Installs fine, passes tests, arm64 binary perl - Currently doesn't work on Intel or Apple Silicon, PR opened: https://github.com/Homebrew/homebrew-core/pull/57580 (with this fix it passes tests and the binary is arm64 native)

claui commented 3 years ago

It has come to my attention that carthage has landed (thanks again @BytesGuy) and cmake, too.

stuartcarnie commented 3 years ago

I'm going to take a look at the JIT issues for pcre and pcre2 – I found the same issue with Boxer (DosBox) and resolved it in https://github.com/MaddTheSane/dosbox/commit/794513db66e210fbe28c6a1f69d8acd9a8664e30

BytesGuy commented 3 years ago
                   ^
debug.c:1037:47: error: no member named '__gs' in 'struct __darwin_arm_thread_state64'
        (unsigned long) uc->uc_mcontext->__ss.__gs
                        ~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:1039:51: error: no member named '__esp' in 'struct __darwin_arm_thread_state64'; did you mean '__sp'?
    logStackContent((void**)uc->uc_mcontext->__ss.__esp);
                                                  ^~~~~
                                                  __sp
/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/mach/arm/_structs.h:139:13: note: '__sp' declared here
        __uint64_t __sp;    /* Stack pointer x31 */
                   ^
18 errors generated.
make[1]: *** [debug.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install] Error 2
stuartcarnie commented 3 years ago

@BytesGuy regarding redis, it just so happens I fixed a similar issue in iTerm2. I'll take a look at that.

idyll commented 3 years ago

Erlang is currently not compiling on macOS 11 because:

 error: static declaration of 'in6addr_any' follows non-static declaration

There are separate issues on Apple Silicon that likely require a more difficult fix.

Tracking here: