Building Ruby 2.x on OS X Mavericks Suddenly Fails
Last 10 log lines:
compiling ossl_x509ext.c
1 warning generated.
compiling ossl_x509name.c
compiling ossl_x509req.c
compiling ossl_x509revoked.c
compiling ossl_x509store.c
installing default openssl libraries
linking shared-object openssl.bundle
ld: warning: directory not found for option '-L/usr/local/var/rbenv/versions/2.0.0-p451/lib'
make: *** [build-ext] Error 2
2.1.1 doesn't build either:
Last 10 log lines:
1 warning generated.
compiling ossl_x509ext.c
compiling ossl_x509name.c
compiling ossl_x509req.c
compiling ossl_x509revoked.c
compiling ossl_x509store.c
installing default openssl libraries
linking shared-object openssl.bundle
linking shared-object ripper.bundle
make: *** [build-ext] Error 2
I'm seeing this also. 1.9.3-p484 compiles fine. I ran several homebrew updates this morning, and I have rbenv and ruby-build themselves installed via homebrew as well, so I'm looking suspiciously towards what I updated. Here are some of the relevant logs/output:
- 2.1.1 install log
- 2.0.0 install log
- List of installed brews
- Current SHA of /usr/local
brew infofor openssl
brew doctor shows no warnings. I'm on OSX 10.9.2 with Xcode 5.1.1 on a "Late 2013" 15-inch MBP. Please let me know if I can provide any more information that would assist.
Of mild interest is that rvm 1.25.22 can build the same two Ruby versions successfully. I don't want to use rvm and do not plan to do so, but it does suggest that it may be something specific to how ruby-build does its dependencies and compilation compared to rvm's method.
Really bizarre failures. Does a successful xcode-select --install change anything?
@mislav It does not for me.
I was having the same issue. For what it's worth installing manually from source worked fine for me.
./configure --prefix=/Users/willrax/.rbenv/versions/2.1.1/ --with-openssl-dir=/usr/local/opt/openssl
@mislav xcode-select also does not change anything for me.
I'm seeing this exact error as well with p451 and p353. I reinstalled the command line tools just to make sure but it's still giving me this error.
Can't reproduce on Mavericks with latest Command Line tools, ruby-build and openssl from Homebrew :crying_cat_face:
I also got the same error @nikolay got for 2.1.1 on 2.0.0-p247
2.0.0-p353 doesn't work either. I have the latest Command Line Tools from Xcode 5.1.1 (5B008) and latest Homebrew OpenSSL 1.0.1g (linked or not - it doesn't matter).
Found some other info with similar looking errors here and here but their configuration didn't work for me either.
@Keithbsmiley I tried those yesterday, too, but with no luck similarly to you.
Running into the exact same issue here, too. A friend and I are in the same predicament. I installed 2.1.1 and 2.1.0 a few weeks ago and it worked fine, but not today.
@Trevoke Everything was working on Sunday. Something broke yesterday.
It looks like the problem is readline 6.3. Looking further into it now.
I tried to install the version of readline from homebrew 2 days ago but the source 404'd.
Homebrew's readline got upgraded two days ago: https://github.com/Homebrew/homebrew/commit/1294240c399144786e83d02ff516936a7a7c55bd
I'm checking out this issue: https://github.com/sstephenson/ruby-build/issues/526
I am looking for a readline patch for 2.1.1 which I can apply.
Here's a raw URL from before the 6.3.3 upgrade. (version 6.2.4) https://raw.githubusercontent.com/Homebrew/homebrew/0181c8a1633353affefabe257c170edbd6d7c008/Library/Formula/readline.rb
Downgrading readline to the version @Keithbsmiley linked with a straightforward brew uninstall readline && brew install $RAW_URL did the trick for me for both 2.0.0-p451 and 2.1.1. Huzzah!