Failed to build older Ruby versions on Catalina #1852
-
Hello, since the last update to XCode and Command Line Tools, which puts you on Here's the log output:
Log file output
|
Beta Was this translation helpful? Give feedback.
Replies: 11 comments
-
Same issue here I tried a lot of alternatives as follows: via openssl1.0 and openssl > 1.0(same result) via zlib |
Beta Was this translation helpful? Give feedback.
-
Same here with OS X 10.15.7. I'm unable to install any 2.2.x version of ruby. I've install openssl@1 with homebrew. This is the output of one of my attempts: skip installing bundle gems because of lacking zlib Please note that installing 2.3.8 worked fine. I can confirm @coding-bunny assumption: using the Command_Line_Tools_for_Xcode_11.4.1 WORKS (I had to remove Xcode 12 but maybe you don't use it). |
Beta Was this translation helpful? Give feedback.
-
Using however the Command Line Tools for XCode v11 on a Cataline System with XCode 12 installed introduces other problems however. You'll notice that you won't be able to compile the mysql2 gem for example unless you reset your Even if you use |
Beta Was this translation helpful? Give feedback.
-
coding-bunny you can however do the opposite procedure after compiling ruby versions. |
Beta Was this translation helpful? Give feedback.
-
I can, but I shouldn't have to....
|
Beta Was this translation helpful? Give feedback.
-
Sounds like #1489 |
Beta Was this translation helpful? Give feedback.
-
If Apple indeed changed/removed underlying CFlags from the compiler, then yes it could very well be the main cause why stuff stopped working. The question is whether ruby-build is going to be able to work around this... |
Beta Was this translation helpful? Give feedback.
-
This worked for me on 10.15.7 macOS |
Beta Was this translation helpful? Give feedback.
-
#1489 Did not work for me and the errors I get are: |
Beta Was this translation helpful? Give feedback.
-
I think this is an issue with M1 arch. I had the same issue and resolved it by using the following:
|
Beta Was this translation helpful? Give feedback.
-
Answering for posterity, since people keep discovering these outdated threads in search results: As macOS and its Command Line Tools get upgrades, older versions of Ruby will become harder or impossible to build. This is just the state of the world that we live in. Compatibility is further complicated by newer Mac machines having moved to Apple Silicon architecture, where it is even less likely to build an older version of Ruby. The solution: update Ruby in your application. Some people discover and share workarounds such as setting arcane CFLAGS settings or using Upgrade your Ruby version to a currently maintained Ruby release or, if that is not an option for your app, create a development environment for your app within a virtual machine or a container. |
Beta Was this translation helpful? Give feedback.
Answering for posterity, since people keep discovering these outdated threads in search results:
As macOS and its Command Line Tools get upgrades, older versions of Ruby will become harder or impossible to build. This is just the state of the world that we live in. Compatibility is further complicated by newer Mac machines having moved to Apple Silicon architecture, where it is even less likely to build an older version of Ruby. The solution: update Ruby in your application.
Some people discover and share workarounds such as setting arcane CFLAGS settings or using
arch -x86_64
to trick things to be compiled foramd64
architecture even while onarm64
, but these workarounds are more trouble…