-
Notifications
You must be signed in to change notification settings - Fork 787
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruby 2.2.2 build fail error on macOS 11.1 #1700
Comments
@laynejohnson Having same issue with 2.3.3.Have you found any workaround yet. |
@rahulpuroht Yes! It seems to have been an issue with XCode 12 (Apple changed the default |
Having the same problem on Mac M1
:( |
Hi there, Yes - also trying to get Ruby installed on Mac Silicone m1. What I've found so far... `Steves-MacBook-Air:~ steve$ arch -x86_64 /bin/bash -c 'CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.2.5' Installing ruby-2.2.5... WARNING: ruby-2.2.5 is past its end of life and is now unsupported. ruby-build: using readline from homebrew BUILD FAILED (macOS 11.1 using ruby-build 20201225) Inspect or clean up the working tree at /var/folders/4v/zps5vz_n3xjdmvq8pl_lf9780000gn/T/ruby-build.20210116112712.11791.4koc3o Last 10 log lines: Using: and I added: But as you see its not working. My next attempt followed this: https://stackoverflow.com/questions/64029645/rbenv-ruby-build-installs-fail-for-ruby-versions-1-9-3-2-2-0-2-2-5-with-xcod which suggests installing command line tools v11, and the setting that in Xcode preferences. However, on downloading the latest CLTs for v11 (11.5) - the installation says it is not compatible with m1 silicon. Has anyone got older Ruby with rbenv working on m1 yet? Or found any other steps forward? Many thanks, Steve. |
There is no way to build the old ruby at M1 macOS with arm arch. |
I'm sure there'll be a way - else there'll be a very upset group of devs not able to work on older ruby versions. |
@stevenjohn Maybe, the old Rubies can work under the Rosseta2 environment. But I have only Apple DTK, I couldn't investigate macOS with M1 chip. |
Cheers @hsbt - I've tried using
as a prefix which I believe uses Rosseta2 By using this I can see my installation went lot further than before - but I think the issue now is with the v12 command line tools, I'm seeing a lot of references to needing to use v11 - but not sure these can be installed on m1. |
I know that this is a rbenv post. But I want to comment that I was able to install an old Ruby (2.3.8) on my M1 with Big Sur 11.1, running XCode 12.3 with RVM using the following commands:
|
That's greatly appreciated - I will try it out and report back. |
Is there a consensus here on whether 2.2.2 can indeed be built on M1 Silicon with ARM? I'm seeing the following error on install:
after trying #1700 (comment)
Are we just not able to build this version of ruby for ARM and have to use Rosetta? |
@bradical in my case, I ended using Old rubies compiled with Rosseta 2, and the newest Rubies compiled for ARM. |
Thanks @eveevans! This is interesting. It seems to have gotten pretty far and perhaps is just failing in some final symlinking step due to a badly named file
Full log attached |
@ThomasKoppensteiner i saw you mentioned you got this working: #1700 (comment). Were you on M1 Silicon or Intel? @stevenjohn any luck on your end since: #1700 (comment)? I agree with you: #1700 (comment) that this is going to be a problem for devs (myself included) who are supporting/maintaining legacy apps. |
@bradical I'm using a Intel Core i7. |
thanks a lot, worked for me. |
you are doing this in Rosetta terminal or normal? @eveevans |
@eveevans I am having issues installing it with openssl. Later when It requires openssl it gives me error saying reinstall using openssl |
The following worked for me:
|
is the bottom line that it's not possible to build 2.2.2 for arm64? |
Hi @bradical - the above worked for me with 2.2.2 for arm64. For context, I'm on an M1 Macbook running Big Sur 11.5.2. |
But if i'm understanding your code you're actually building for x86 using rosetta, no?
|
Yes, you're right. It's the only way I could make it work, at least with the older Rubies. |
On Ruby 2.6 I'm seeing $ file $(rbenv which ruby)
[...]/.rbenv/versions/2.6.5/bin/ruby: Mach-O 64-bit executable arm64 But then: $ ruby -e "puts RUBY_PLATFORM"
-darwin21 So the the "badly named file" ( |
@crgc can you confirm the versions of readline and openssl that you have installed and also your macOS version and whether you installed them with x86_64 on homebrew or arm64? I'm trying your command #1700 (comment) but it's not working for me. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hello there! (And, Happy New Year!) I hope I am posting this in the right place! 🙏
I am trying to install Ruby 2.2.2 on macOS 11.1 for a project, but am running into the following error when running:
rbenv install 2.2.2
Error:
I have tried the workarounds in issue #1353 and have downloaded OpenSSL 1.0 on my system, but still no luck! Has anyone had a similar issue that they were able to resolve? Many thanks 🙏
UPDATE
Solution:
$ CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.2.2
#1489 (comment)
The text was updated successfully, but these errors were encountered: