ruby-build icon indicating copy to clipboard operation
ruby-build copied to clipboard

Building Ruby 2.x on OS X Mavericks Suddenly Fails

Open nikolay opened this issue 12 years ago • 59 comments

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

nikolay avatar Apr 14 '14 20:04 nikolay

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

nikolay avatar Apr 14 '14 20:04 nikolay

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:

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.

shanesveller avatar Apr 14 '14 21:04 shanesveller

Really bizarre failures. Does a successful xcode-select --install change anything?

mislav avatar Apr 15 '14 02:04 mislav

@mislav It does not for me.

nikolay avatar Apr 15 '14 02:04 nikolay

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

willrax avatar Apr 15 '14 03:04 willrax

@mislav xcode-select also does not change anything for me.

shanesveller avatar Apr 15 '14 15:04 shanesveller

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.

keith avatar Apr 15 '14 15:04 keith

Can't reproduce on Mavericks with latest Command Line tools, ruby-build and openssl from Homebrew :crying_cat_face:

mislav avatar Apr 15 '14 16:04 mislav

I also got the same error @nikolay got for 2.1.1 on 2.0.0-p247

keith avatar Apr 15 '14 16:04 keith

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).

nikolay avatar Apr 15 '14 16:04 nikolay

Found some other info with similar looking errors here and here but their configuration didn't work for me either.

keith avatar Apr 15 '14 16:04 keith

@Keithbsmiley I tried those yesterday, too, but with no luck similarly to you.

nikolay avatar Apr 15 '14 16:04 nikolay

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 avatar Apr 15 '14 19:04 Trevoke

@Trevoke Everything was working on Sunday. Something broke yesterday.

nikolay avatar Apr 15 '14 19:04 nikolay

It looks like the problem is readline 6.3. Looking further into it now.

Trevoke avatar Apr 15 '14 19:04 Trevoke

I tried to install the version of readline from homebrew 2 days ago but the source 404'd.

keith avatar Apr 15 '14 19:04 keith

Homebrew's readline got upgraded two days ago: https://github.com/Homebrew/homebrew/commit/1294240c399144786e83d02ff516936a7a7c55bd

thomasjo avatar Apr 15 '14 19:04 thomasjo

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.

Trevoke avatar Apr 15 '14 19:04 Trevoke

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

keith avatar Apr 15 '14 19:04 keith

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!

shanesveller avatar Apr 15 '14 20:04 shanesveller