prefix is now /opt/homebrew
as opposed to Intel
using $(brew --prefix)
was slowing down my terminal to a degree, hence a static path approach
end up loading both as still having both styles
# Zsh search path for executable
path=(
/opt/homebrew/{bin,sbin}
/usr/local/{bin,sbin}
$path
)
A bunch of binaries requires manual bindings as below:
brew install libffi libyaml zlib readline
export optflags="-Wno-error=implicit-function-declaration"
export LDFLAGS="-L/opt/homebrew/opt/libffi/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libffi/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/libffi/lib/pkgconfig"
☁ ~ export optflags="-Wno-error=implicit-function-declaration"; export LDFLAGS="-L/opt/homebrew/opt/libffi/lib"; export CPPFLAGS="-I/opt/homebrew/opt/libffi/include"; export PKG_CONFIG_PATH="/opt/homebrew/opt/libffi/lib/pkgconfig"; export CONFIGURE_OPTS="--build aarch64-apple-darwin20"; asdf install ruby 2.6.0
export RUBY_CONFIGURE_OPTS="--with-zlib-dir=/opt/homebrew/opt/zlib --with-openssl-dir=/opt/homebrew/opt/[email protected] --with-readline-dir=/opt/homebrew/opt/readline --with-libyaml-dir=/opt/homebrew/opt/libyaml"
export RUBY_CFLAGS="-Wno-error=implicit-function-declaration"
export CONFIGURE_OPTS="--build aarch64-apple-darwin20"
asdf install ruby 2.6.6
Now installing nokogiri requires as usual native but ffi is causing issues
bundle config build.nokogiri --use-system-librarie
I fixed it since 👍🏼gem install ffi:1.14.2 -- --enable-libffi-alloc
works but we are currently using 1.9.18
🤦
References
- asdf-vm/asdf-ruby#198 (comment)
- asdf-vm/asdf-ruby#210 (comment)
- asdf-vm/asdf-ruby#184
- https://betterprogramming.pub/ruby-on-apple-silicon-m1-macs-fb159849b2f5
- http://iftheshoefritz.com/m1/macbook/rosetta/arm64/ruby/rbenv/asdf/2021/05/21/life-on-m1-building-ruby-from-source-part-2.html
Versions < v14 aren't published for Apple M1 but are as of v16? Using Rosetta otherwise:
arch -x86_64 asdf install nodejs 14.17.5
npm install --target_arch=x64
References
- asdf-vm/asdf-nodejs#189
- node-sass sass/node-sass#3033
https://edipox.medium.com/error-installing-pg-gem-in-macos-catalina-b1a2ba6b6264 https://stackoverflow.com/questions/36455625/postgresql-gem-install-pg-0-18-4-passes-bundle-install-fails