Closed dhughes closed 2 years ago
The exit 77
suggests a possible issue with your build tools. Are you still having this issue with Ruby 2.7.6? Can you double check xcode-select --install
and open XCode to confirm there aren't Command Line Tools needing an install? This does appear to be an upstream issue so I'll update the label.
If so, this can be closed by ruby/ruby#5799.
On that redmine issue, it seems a mix of extremely new not-even-released clang + old autoconf. So updating your autoconf to 2.70+ should help if it's the same issue.
Looking at the logs the error comes from failing to find libobjc:
ld: library not found for -lobjc
collect2: error: ld returned 1 exit status
configure:13404: $? = 1
Looks like autoconf is picking up a GCC that comes from Nix on your macOS system which could be why it can't find libobjc. Nix generally likes to isolate its closure from system libraries.
I would make sure which clang
points to Apple's Clang, and run ruby-install like:
$ CC=clang ruby-install ...
That should let it find the right libraries.
I'm quite late getting back to this, but I wanted to say that @XrXr's suggestion worked like a charm! I was able to get Ruby 2.7.5 installed successfully.
Description
I have been able to successfully use ruby-install to install Ruby 2.6.9 and Ruby 3.03. However, I am unable to use it to install Ruby 2.7.5.
When running
ruby-install ruby 2.7.5
the output terminates with:I am running ruby-install 0.8.3, which I understand to be the latest version.
Ruby 2.7.5 is a maintained version.
I am not installing on an old system. I am running on a brand new M1 Pro Mac running Monterey and the latest versions of the command line tools (upgraded today).
This does not appear to be a compilation bug, but a configuration validation bug, since it's failing in the configuration phase of the install process.
I can reproduce this problem by trying to compile Ruby manually. I realize that the issue reporting guidelines say to report this issue directly to the Ruby issue tracker. I did so.. They have asked me to report it here, so I'm doing that too.
Steps To Reproduce
Steps to reproduce the bug:
ruby-install ruby 2.7.5
I assume there is some dependency problem, but I am at a loss for determining what it is or how to fix it.
Expected Behavior
I would expect that the configure and build process would complete successfully, resulting in the successful installation of Ruby 2.7.5 that I can switch to with
chruby
.Actual Behavior
The configuration process fails with the following messages:
Ruby 2.7.5 is not successfully built or installed for use.
The config log can be seen here.
Environment
ruby-install: 0.8.3
Darwin dougs-mbp.lan 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000 arm64
gcc (GCC) 11.2.0
OpenSSL 1.1.1l 24 Aug 2021
Note: The OpenSSL 1.1.1l is the system-provided OpenSSL. I believe ruby-install is trying to use the version from homebrew which is
1.1.1m
and is not what is used when I executeopenssl
.