Building Ruby 2.x on OS X Mavericks Suddenly Fails #550

Closed
nikolay opened this Issue Apr 14, 2014 · 59 comments

Comments

Projects
None yet
@nikolay

nikolay commented Apr 14, 2014

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

This comment has been minimized.

Show comment
Hide comment
@nikolay

nikolay Apr 14, 2014

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 commented Apr 14, 2014

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
@shanesveller

This comment has been minimized.

Show comment
Hide comment
@shanesveller

shanesveller Apr 14, 2014

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.

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.

@mislav

This comment has been minimized.

Show comment
Hide comment
@mislav

mislav Apr 15, 2014

Member

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

Member

mislav commented Apr 15, 2014

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

@nikolay

This comment has been minimized.

Show comment
Hide comment
@nikolay

nikolay Apr 15, 2014

@mislav It does not for me.

nikolay commented Apr 15, 2014

@mislav It does not for me.

@willrax

This comment has been minimized.

Show comment
Hide comment
@willrax

willrax Apr 15, 2014

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 commented Apr 15, 2014

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
@shanesveller

This comment has been minimized.

Show comment
Hide comment
@shanesveller

shanesveller Apr 15, 2014

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

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

@keith

This comment has been minimized.

Show comment
Hide comment
@keith

keith Apr 15, 2014

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 commented Apr 15, 2014

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.

@mislav

This comment has been minimized.

Show comment
Hide comment
@mislav

mislav Apr 15, 2014

Member

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

Member

mislav commented Apr 15, 2014

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

@keith

This comment has been minimized.

Show comment
Hide comment
@keith

keith Apr 15, 2014

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

keith commented Apr 15, 2014

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

@nikolay

This comment has been minimized.

Show comment
Hide comment
@nikolay

nikolay Apr 15, 2014

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 commented Apr 15, 2014

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

@mislav mislav referenced this issue in rbenv/rbenv Apr 15, 2014

Closed

Ruby 2.1.1 build failed on Mavericks #579

@keith

This comment has been minimized.

Show comment
Hide comment
@keith

keith Apr 15, 2014

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

keith commented Apr 15, 2014

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

@nikolay

This comment has been minimized.

Show comment
Hide comment
@nikolay

nikolay Apr 15, 2014

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

nikolay commented Apr 15, 2014

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

@nikolay nikolay changed the title from Building Ruby 2.0.0-p451 on OS X Mavericks Suddenly Fails to Building Ruby 2.x on OS X Mavericks Suddenly Fails Apr 15, 2014

@Trevoke

This comment has been minimized.

Show comment
Hide comment
@Trevoke

Trevoke Apr 15, 2014

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 commented Apr 15, 2014

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.

@nikolay

This comment has been minimized.

Show comment
Hide comment
@nikolay

nikolay Apr 15, 2014

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

nikolay commented Apr 15, 2014

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

@Trevoke

This comment has been minimized.

Show comment
Hide comment
@Trevoke

Trevoke Apr 15, 2014

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

Trevoke commented Apr 15, 2014

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

@keith

This comment has been minimized.

Show comment
Hide comment
@keith

keith Apr 15, 2014

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

keith commented Apr 15, 2014

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

@thomasjo

This comment has been minimized.

Show comment
Hide comment
@thomasjo

thomasjo Apr 15, 2014

Contributor

Homebrew's readline got upgraded two days ago:
Homebrew/legacy-homebrew@1294240

Contributor

thomasjo commented Apr 15, 2014

Homebrew's readline got upgraded two days ago:
Homebrew/legacy-homebrew@1294240

@Trevoke

This comment has been minimized.

Show comment
Hide comment
@Trevoke

Trevoke Apr 15, 2014

I'm checking out this issue: #526

I am looking for a readline patch for 2.1.1 which I can apply.

Trevoke commented Apr 15, 2014

I'm checking out this issue: #526

I am looking for a readline patch for 2.1.1 which I can apply.

@keith

This comment has been minimized.

Show comment
Hide comment
@shanesveller

This comment has been minimized.

Show comment
Hide comment
@shanesveller

shanesveller Apr 15, 2014

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!

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!

@keith

This comment has been minimized.

Show comment
Hide comment
@keith

keith Apr 15, 2014

Oh readline... Hopefully someone can find and submit a patch to fix this issue with Homebrew?

keith commented Apr 15, 2014

Oh readline... Hopefully someone can find and submit a patch to fix this issue with Homebrew?

@mislav

This comment has been minimized.

Show comment
Hide comment
@mislav

mislav Apr 15, 2014

Member

Nice find, @Trevoke. Homebrew's readline is automatically slurped in per 94c15a5, and Ruby doesn't seem to play well with readline 6.3

Member

mislav commented Apr 15, 2014

Nice find, @Trevoke. Homebrew's readline is automatically slurped in per 94c15a5, and Ruby doesn't seem to play well with readline 6.3

@keith

This comment has been minimized.

Show comment
Hide comment
@keith

keith Apr 15, 2014

@mislav does that make this plugin unnecessary? (it looks like it does)

keith commented Apr 15, 2014

@mislav does that make this plugin unnecessary? (it looks like it does)

@Trevoke

This comment has been minimized.

Show comment
Hide comment
@Trevoke

Trevoke Apr 15, 2014

@Keithbsmiley the first line of the README, "This plugin's behavior has been made standard in ruby-build, rendering it obsolete." makes me think that it is indeed the case :)

Trevoke commented Apr 15, 2014

@Keithbsmiley the first line of the README, "This plugin's behavior has been made standard in ruby-build, rendering it obsolete." makes me think that it is indeed the case :)

@Trevoke

This comment has been minimized.

Show comment
Hide comment
@Trevoke

Trevoke Apr 15, 2014

So now the question is .. Where can we find a patch for Ruby 2.x that plays nice with readline 6.3 ? I don't understand readline well enough to do it :/

Trevoke commented Apr 15, 2014

So now the question is .. Where can we find a patch for Ruby 2.x that plays nice with readline 6.3 ? I don't understand readline well enough to do it :/

@keith

This comment has been minimized.

Show comment
Hide comment
@keith

keith Apr 15, 2014

Haha ouch my bad, I just snagged the link from the clone in my dotfiles, haven't looked at the page in ages.

keith commented Apr 15, 2014

Haha ouch my bad, I just snagged the link from the clone in my dotfiles, haven't looked at the page in ages.

@salex

This comment has been minimized.

Show comment
Hide comment
@salex

salex Apr 16, 2014

I'm trying to set up a debian box as a rails server, coming from osx, its been a little challenge. I am also running into a readline problem, this was after an openssl problem. getting error:

    compiling readline.c
    readline.c: In function ‘Init_readline’:
    readline.c:1977:26: error: ‘Function’ undeclared (first use in this function)
         rl_pre_input_hook = (Function *)readline_pre_input_hook;
                              ^
    readline.c:1977:26: note: each undeclared identifier is reported only once for each function it appears in
    readline.c:1977:36: error: expected expression before ‘)’ token
         rl_pre_input_hook = (Function *)readline_pre_input_hook;
                                        ^
    readline.c: At top level:
    readline.c:634:1: warning: ‘readline_pre_input_hook’ defined but not used [-Wunused-function]
     readline_pre_input_hook(void)
     ^
    make[2]: *** [readline.o] Error 1

There is a revision for 2.1.1 (also had error trying 2.1.0) https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/45488.

I modified the file in the /tmp directory and got it to compile, but have no idea how to make install to my .rbenv directory

salex commented Apr 16, 2014

I'm trying to set up a debian box as a rails server, coming from osx, its been a little challenge. I am also running into a readline problem, this was after an openssl problem. getting error:

    compiling readline.c
    readline.c: In function ‘Init_readline’:
    readline.c:1977:26: error: ‘Function’ undeclared (first use in this function)
         rl_pre_input_hook = (Function *)readline_pre_input_hook;
                              ^
    readline.c:1977:26: note: each undeclared identifier is reported only once for each function it appears in
    readline.c:1977:36: error: expected expression before ‘)’ token
         rl_pre_input_hook = (Function *)readline_pre_input_hook;
                                        ^
    readline.c: At top level:
    readline.c:634:1: warning: ‘readline_pre_input_hook’ defined but not used [-Wunused-function]
     readline_pre_input_hook(void)
     ^
    make[2]: *** [readline.o] Error 1

There is a revision for 2.1.1 (also had error trying 2.1.0) https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/45488.

I modified the file in the /tmp directory and got it to compile, but have no idea how to make install to my .rbenv directory

@nikolay

This comment has been minimized.

Show comment
Hide comment
@nikolay

nikolay Apr 17, 2014

For now, the solution is:

brew uninstall readline
brew install https://raw.githubusercontent.com/Homebrew/homebrew/0181c8a1633353affefabe257c170edbd6d7c008/Library/Formula/readline.rb
brew pin readline

nikolay commented Apr 17, 2014

For now, the solution is:

brew uninstall readline
brew install https://raw.githubusercontent.com/Homebrew/homebrew/0181c8a1633353affefabe257c170edbd6d7c008/Library/Formula/readline.rb
brew pin readline
@hackjoy

This comment has been minimized.

Show comment
Hide comment
@hackjoy

hackjoy Apr 17, 2014

@nikolay Following your steps allowed me to install 2.1.1. Previously I was getting the same log that you posted

hackjoy commented Apr 17, 2014

@nikolay Following your steps allowed me to install 2.1.1. Previously I was getting the same log that you posted

@hendricius

This comment has been minimized.

Show comment
Hide comment
@hendricius

hendricius Apr 17, 2014

@nikolay thanks that worked

@nikolay thanks that worked

@supert56

This comment has been minimized.

Show comment
Hide comment
@supert56

supert56 Apr 17, 2014

@nikolay Thanks for this, it's also worked for me o 2.0.0-p247 :)

@nikolay Thanks for this, it's also worked for me o 2.0.0-p247 :)

@nikolay

This comment has been minimized.

Show comment
Hide comment
@nikolay

nikolay Apr 17, 2014

@hackjoy @hendricius @supert56 Yeah, works for now by pinning readline... until the better times come. 😄

nikolay commented Apr 17, 2014

@hackjoy @hendricius @supert56 Yeah, works for now by pinning readline... until the better times come. 😄

@pearofducks pearofducks referenced this issue in postmodern/ruby-install Apr 18, 2014

Closed

Readline 6.3 and Ruby on OSX #144

@tiredpixel

This comment has been minimized.

Show comment
Hide comment
@tiredpixel

tiredpixel Apr 18, 2014

I experienced this also with Ruby 2.0.0-p353:

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

Reinstalling readline and pinning as described by @nikolay worked (#550 (comment)). Thanks! :)

OS X 10.9.2
OpenSSL 0.9.8y 5 Feb 2013 (darwin64-x86_64-llvm) (/System/Library/OpenSSL)
xcode-select version 2333.
xcode-select -p (/Applications/Xcode.app/Contents/Developer)
brew 0.9.5
rbenv 0.4.0
ruby-build 20140408

Peace,
tiredpixel

I experienced this also with Ruby 2.0.0-p353:

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

Reinstalling readline and pinning as described by @nikolay worked (#550 (comment)). Thanks! :)

OS X 10.9.2
OpenSSL 0.9.8y 5 Feb 2013 (darwin64-x86_64-llvm) (/System/Library/OpenSSL)
xcode-select version 2333.
xcode-select -p (/Applications/Xcode.app/Contents/Developer)
brew 0.9.5
rbenv 0.4.0
ruby-build 20140408

Peace,
tiredpixel

@FeipingHunag

This comment has been minimized.

Show comment
Hide comment
@FeipingHunag

FeipingHunag Apr 19, 2014

Install homebrew

$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
$ echo export PATH="/usr/local/bin:$PATH" >> ~/.zprofile

Check homebrew

$ brew doctor

Install ruby 2.1.1

$ brew update
$ brew uninstall openssl && brew install openssl

readline 6.3.3 should be uninstalled, and install readline 6.2.4

$ brew uninstall readline
$ cd /usr/local/
$ git checkout 0181c8a Library/Formula/readline.rb
$ brew install readline

$ RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline) --with-openssl-dir=$(brew --prefix openssl)" rbenv install 2.1.1

$ rbenv versions

Install homebrew

$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
$ echo export PATH="/usr/local/bin:$PATH" >> ~/.zprofile

Check homebrew

$ brew doctor

Install ruby 2.1.1

$ brew update
$ brew uninstall openssl && brew install openssl

readline 6.3.3 should be uninstalled, and install readline 6.2.4

$ brew uninstall readline
$ cd /usr/local/
$ git checkout 0181c8a Library/Formula/readline.rb
$ brew install readline

$ RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline) --with-openssl-dir=$(brew --prefix openssl)" rbenv install 2.1.1

$ rbenv versions

@diek

This comment has been minimized.

Show comment
Hide comment
@diek

diek Apr 19, 2014

When this err happened I thought I had done something dumb. Anyways, nope. @nikolay thanks that worked perfectly. Thanks,
derrick

diek commented Apr 19, 2014

When this err happened I thought I had done something dumb. Anyways, nope. @nikolay thanks that worked perfectly. Thanks,
derrick

@mortik

This comment has been minimized.

Show comment
Hide comment
@mortik

mortik Apr 22, 2014

Which rbenv and ruby-build versions do you use? rbenv und ruby-build are failing on my mac when i use readline 6.2.4

dyld: Symbol not found: _rl_executing_keyseq
  Referenced from: /usr/local/bin/bash
  Expected in: /usr/local/opt/readline/lib/libreadline.6.dylib
 in /usr/local/bin/bash
Trace/BPT trap: 5

mortik commented Apr 22, 2014

Which rbenv and ruby-build versions do you use? rbenv und ruby-build are failing on my mac when i use readline 6.2.4

dyld: Symbol not found: _rl_executing_keyseq
  Referenced from: /usr/local/bin/bash
  Expected in: /usr/local/opt/readline/lib/libreadline.6.dylib
 in /usr/local/bin/bash
Trace/BPT trap: 5
@ladislas

This comment has been minimized.

Show comment
Hide comment
@ladislas

ladislas Apr 22, 2014

same issue as @mortik...

same issue as @mortik...

@Trevoke

This comment has been minimized.

Show comment
Hide comment
@Trevoke

Trevoke Apr 22, 2014

Note! @mislav wrote a patch for 2.1.1 which works, you can find it here:
#526 (comment)

curl -fsSL https://gist.github.com/mislav/a18b9d7f0dc5b9efc162.txt | rbenv install --patch 2.1.1

Trevoke commented Apr 22, 2014

Note! @mislav wrote a patch for 2.1.1 which works, you can find it here:
#526 (comment)

curl -fsSL https://gist.github.com/mislav/a18b9d7f0dc5b9efc162.txt | rbenv install --patch 2.1.1

@lukehorvat

This comment has been minimized.

Show comment
Hide comment
@lukehorvat

lukehorvat Apr 23, 2014

Contributor

Thanks @FeipingHunag, switching from readline 6.3.3 to 6.2.4 (using Homebrew) worked for me. (rbenv 0.4.0)

Contributor

lukehorvat commented Apr 23, 2014

Thanks @FeipingHunag, switching from readline 6.3.3 to 6.2.4 (using Homebrew) worked for me. (rbenv 0.4.0)

@kylemclaren

This comment has been minimized.

Show comment
Hide comment
@kylemclaren

kylemclaren Apr 23, 2014

The readline fix worked for me...

The readline fix worked for me...

@CalderWishne

This comment has been minimized.

Show comment
Hide comment
@CalderWishne

CalderWishne Apr 23, 2014

Same issue as @mortik. Tried janson's unlink && link trick here
Homebrew/legacy-homebrew#23424

Same issue as @mortik. Tried janson's unlink && link trick here
Homebrew/legacy-homebrew#23424

@CalderWishne

This comment has been minimized.

Show comment
Hide comment
@CalderWishne

CalderWishne Apr 23, 2014

...but no dice

...but no dice

@jcapron

This comment has been minimized.

Show comment
Hide comment
@jcapron

jcapron Apr 23, 2014

Nice find @Trevoke! 👍

I had the same issue, switching from readline 6.3 to 6.2 using this raw URL fixed it

$ brew uninstall readline && brew install https://raw.githubusercontent.com/Homebrew/homebrew/0181c8a1633353affefabe257c170edbd6d7c008/Library/Formula/readline.rb

jcapron commented Apr 23, 2014

Nice find @Trevoke! 👍

I had the same issue, switching from readline 6.3 to 6.2 using this raw URL fixed it

$ brew uninstall readline && brew install https://raw.githubusercontent.com/Homebrew/homebrew/0181c8a1633353affefabe257c170edbd6d7c008/Library/Formula/readline.rb
@lsmolic

This comment has been minimized.

Show comment
Hide comment
@lsmolic

lsmolic Apr 26, 2014

+9001, readline fix works for me

lsmolic commented Apr 26, 2014

+9001, readline fix works for me

@keith keith referenced this issue in codahale/bcrypt-ruby Apr 28, 2014

Closed

Compilation error on Mavericks #92

@windvalleyman

This comment has been minimized.

Show comment
Hide comment
@windvalleyman

windvalleyman Apr 28, 2014

readline fix works for me too!

readline fix works for me too!

@mboersma mboersma referenced this issue in deis/deis Apr 29, 2014

Merged

feat(test): add integration tests #837

@nicholsn

This comment has been minimized.

Show comment
Hide comment
@nicholsn

nicholsn Apr 30, 2014

+1 for the readline fix

+1 for the readline fix

@eitch

This comment has been minimized.

Show comment
Hide comment
@eitch

eitch May 5, 2014

I have the same problem. On a fresh OSX installation, i can't install ruby 2.0.0-p451 because readline gives problems. Using the 2.2.x version worked at some point, but now that too fails.

eitch commented May 5, 2014

I have the same problem. On a fresh OSX installation, i can't install ruby 2.0.0-p451 because readline gives problems. Using the 2.2.x version worked at some point, but now that too fails.

@emilford

This comment has been minimized.

Show comment
Hide comment
@emilford

emilford May 5, 2014

I'm in the same boat as @eitch. The readline fix does not work for me and my ruby 2.x are failing.

emilford commented May 5, 2014

I'm in the same boat as @eitch. The readline fix does not work for me and my ruby 2.x are failing.

@emilford

This comment has been minimized.

Show comment
Hide comment
@emilford

emilford May 5, 2014

Nevermind. I checked brew list readline and there were still references to 6.3.3. I tried brew uninstall readline again and brew list readline references 6.2.4. With that, the ruby build was successful. Thanks.

emilford commented May 5, 2014

Nevermind. I checked brew list readline and there were still references to 6.3.3. I tried brew uninstall readline again and brew list readline references 6.2.4. With that, the ruby build was successful. Thanks.

@eitch

This comment has been minimized.

Show comment
Hide comment
@eitch

eitch May 5, 2014

The weird thing now is, that if i have readline 6.2.4 installed and
then run rbenv, i get the following error:

    dyld: Symbol not found: _rl_executing_keyseq
      Referenced from: /usr/local/bin/bash
      Expected in: /usr/local/opt/readline/lib/libreadline.6.dylib
     in /usr/local/bin/bash
    Trace/BPT trap: 5

But if i then again install readline 6.3.3 i don't have the problem,
but rbenv install 2.0.0-p451 fails:

    compiling readline.c
    linking shared-object bigdecimal.bundle
    compiling ripper.c
    readline.c:254:28: warning: '&&' within '||' [-Wlogical-op-parentheses]
                        else if (!('0' <= *s && *s <= '9' || *s == ';')) {
                                   ~~~~~~~~~~^~~~~~~~~~~~ ~~
    readline.c:254:28: note: place parentheses around the '&&' expression to silence this warning
                        else if (!('0' <= *s && *s <= '9' || *s == ';')) {
                                             ^
                                   (                     )
    readline.c:1886:26: error: use of undeclared identifier 'Function'
        rl_pre_input_hook = (Function *)readline_pre_input_hook;
                             ^
    readline.c:1886:36: error: expected expression
        rl_pre_input_hook = (Function *)readline_pre_input_hook;
                                       ^
    1 warning and 2 errors generated.
    make[2]: *** [readline.o] Error 1
    make[1]: *** [ext/readline/all] Error 2

Any ideas?

eitch commented May 5, 2014

The weird thing now is, that if i have readline 6.2.4 installed and
then run rbenv, i get the following error:

    dyld: Symbol not found: _rl_executing_keyseq
      Referenced from: /usr/local/bin/bash
      Expected in: /usr/local/opt/readline/lib/libreadline.6.dylib
     in /usr/local/bin/bash
    Trace/BPT trap: 5

But if i then again install readline 6.3.3 i don't have the problem,
but rbenv install 2.0.0-p451 fails:

    compiling readline.c
    linking shared-object bigdecimal.bundle
    compiling ripper.c
    readline.c:254:28: warning: '&&' within '||' [-Wlogical-op-parentheses]
                        else if (!('0' <= *s && *s <= '9' || *s == ';')) {
                                   ~~~~~~~~~~^~~~~~~~~~~~ ~~
    readline.c:254:28: note: place parentheses around the '&&' expression to silence this warning
                        else if (!('0' <= *s && *s <= '9' || *s == ';')) {
                                             ^
                                   (                     )
    readline.c:1886:26: error: use of undeclared identifier 'Function'
        rl_pre_input_hook = (Function *)readline_pre_input_hook;
                             ^
    readline.c:1886:36: error: expected expression
        rl_pre_input_hook = (Function *)readline_pre_input_hook;
                                       ^
    1 warning and 2 errors generated.
    make[2]: *** [readline.o] Error 1
    make[1]: *** [ext/readline/all] Error 2

Any ideas?

@tbuckl

This comment has been minimized.

Show comment
Hide comment
@tbuckl

tbuckl May 5, 2014

same problem as @eitch here

tbuckl commented May 5, 2014

same problem as @eitch here

@ingemar

This comment has been minimized.

Show comment
Hide comment
@ingemar

ingemar May 6, 2014

Downgrading to readline 6.2.4 worked for me.

ingemar commented May 6, 2014

Downgrading to readline 6.2.4 worked for me.

@baroldgene

This comment has been minimized.

Show comment
Hide comment
@baroldgene

baroldgene May 7, 2014

Just a note that the pinning was key. I did brew uninstall readline which then showed my readline version to be 6.2.4. However after a few minutes I did another brew list readline and the version was again 6.3.3. I had to do brew uninstall readline followed by brew pin readline to get it to stay and thus the ruby 2.1 install to work.

Just a note that the pinning was key. I did brew uninstall readline which then showed my readline version to be 6.2.4. However after a few minutes I did another brew list readline and the version was again 6.3.3. I had to do brew uninstall readline followed by brew pin readline to get it to stay and thus the ruby 2.1 install to work.

@hsbt

This comment has been minimized.

Show comment
Hide comment
@hsbt

hsbt May 9, 2014

Contributor

Please update latest version of ruby-build, and build latest version of Ruby.

Contributor

hsbt commented May 9, 2014

Please update latest version of ruby-build, and build latest version of Ruby.

@hsbt hsbt closed this May 9, 2014

@jonathangwilliams

This comment has been minimized.

Show comment
Hide comment
@jonathangwilliams

jonathangwilliams May 12, 2014

I fixed this problem by deleting non-system ruby files, changing my command line tools to 5.0 in Xcode > Preferences > Locations and then running Bundle Install again. Command line tools can be changed back to 5.1.1 after installation succeeds.

I fixed this problem by deleting non-system ruby files, changing my command line tools to 5.0 in Xcode > Preferences > Locations and then running Bundle Install again. Command line tools can be changed back to 5.1.1 after installation succeeds.

@ABorovenskyi

This comment has been minimized.

Show comment
Hide comment
@ABorovenskyi

ABorovenskyi Jun 25, 2014

I had this issue and fixed it by reinstalling openssl library

I had this issue and fixed it by reinstalling openssl library

@drlube

This comment has been minimized.

Show comment
Hide comment
@drlube

drlube Jul 9, 2014

This worked:

brew uninstall readline && brew install readline 

It replaced my readline version 3.3.3 with version 3.3.6 and allowed me to use rbenv to install 2.0.0 p147.

drlube commented Jul 9, 2014

This worked:

brew uninstall readline && brew install readline 

It replaced my readline version 3.3.3 with version 3.3.6 and allowed me to use rbenv to install 2.0.0 p147.

@aguspagnoni

This comment has been minimized.

Show comment
Hide comment
@aguspagnoni

aguspagnoni Aug 1, 2014

thanks @nikolay the readline fixed it!

thanks @nikolay the readline fixed it!

@jaredhabeck

This comment has been minimized.

Show comment
Hide comment
@jaredhabeck

jaredhabeck Aug 9, 2014

I just feel bad you ruby-build guys have to be plagued by comments like this (even though they are amazingly helpful) when it's an upstream ruby/openssl/readline issue! Thanks for all you do.

I just feel bad you ruby-build guys have to be plagued by comments like this (even though they are amazingly helpful) when it's an upstream ruby/openssl/readline issue! Thanks for all you do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment