Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Apple Silicon M1 ARM64 Native Info #198

Closed
fearoffish opened this issue Jan 17, 2021 · 7 comments
Closed

Apple Silicon M1 ARM64 Native Info #198

fearoffish opened this issue Jan 17, 2021 · 7 comments

Comments

@fearoffish
Copy link

I had no end of trouble figuring out the exact configuration of ENV vars and tools to use for this, so I thought I'd just document it here for others. With this I have Ruby 2.6.3, 2.6.6 and 2.7.2 installed through asdf-ruby.

  • Homebrew native installation (arm64)
  • Homebrew packages: libffi, libyaml, zlib, readline
  • ENV vars
    • export RUBY_CONFIGURE_OPTS="--with-zlib-dir=/opt/homebrew/opt/zlib --with-openssl-dir=/opt/homebrew/opt/openssl@1.1 --with-readline-dir=/opt/homebrew/opt/readline --with-libyaml-dir=/opt/homebrew/opt/libyaml"
    • export RUBY_CFLAGS="-Wno-error=implicit-function-declaration"
@fearoffish
Copy link
Author

Closing as this is information only.

@Stratus3D
Copy link
Member

Feel free to update the readme if you think it could be improved!

@ryanmtaylor-tunecore
Copy link

ryanmtaylor-tunecore commented Aug 16, 2022

I'd just like to add that maybe a better more future-proof version of the RUBY_CONFIGURE_OPTS might be:

export RUBY_CONFIGURE_OPTS="--with-zlib-dir=$(brew --prefix zlib) --with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline) --with-libyaml-dir=$(brew --prefix libyaml)"

@mabid
Copy link

mabid commented Nov 15, 2022

had the same issue this is what worked for me. had to add gdbm
export RUBY_CONFIGURE_OPTS="--with-zlib-dir=$(brew --prefix zlib) --with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline) --with-libyaml-dir=$(brew --prefix libyaml) --with-gdbm-dir=$(brew --prefix gdbm)"

and export the following as well

export CFLAGS="-Wno-error=implicit-function-declaration"

@pdenya
Copy link

pdenya commented Mar 23, 2023

All of the above as one block

brew install zlib readline libyaml libffi
export RUBY_CONFIGURE_OPTS="--with-zlib-dir=$(brew --prefix zlib) --with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline) --with-libyaml-dir=$(brew --prefix libyaml) --with-gdbm-dir=$(brew --prefix gdbm)"
export CFLAGS="-Wno-error=implicit-function-declaration"

@pboling
Copy link

pboling commented Mar 23, 2023

Ruby 2.6.10 will not install on Apple silicon + XCode 14 + MacOS Ventura, even with these settings, due to
rbenv/ruby-build#2072, which is ultimately due to https://bugs.ruby-lang.org/issues/18912

It may work with Xcode 13.4, but you can't downgrade if you are already on MacOS Ventura.

@carflynn2009
Copy link

All of the above as one block

brew install zlib readline libyaml libffi
export RUBY_CONFIGURE_OPTS="--with-zlib-dir=$(brew --prefix zlib) --with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline) --with-libyaml-dir=$(brew --prefix libyaml) --with-gdbm-dir=$(brew --prefix gdbm)"
export CFLAGS="-Wno-error=implicit-function-declaration"

I can confirm this now works for me running MacOS Sonoma 14.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants