Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc-4.9: error: unrecognized command line option '-V' on rbenv install 1.8.7-p374 #778

Closed
Nakilon opened this issue Sep 6, 2015 · 3 comments

Comments

@Nakilon
Copy link

Nakilon commented Sep 6, 2015

I want to install Ruby of an old version the same as at Travis CI available:

$ rbenv install 1.8.7-p374
Downloading ruby-1.8.7-p374.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/876eeeaaeeab10cbf4767833547d66d86d6717ef48fd3d89e27db8926a65276c
Installing ruby-1.8.7-p374...

BUILD FAILED (OS X 10.9.4 using ruby-build 20150818)
...
configure: error: C compiler cannot create executables
See `config.log' for more details
...

Here is config.log:

...
Thread model: posix
gcc version 4.9.2 (Homebrew gcc 4.9.2_1) 
configure:3191: $? = 0
configure:3180: /usr/local/bin/gcc-4.9 -V >&5
gcc-4.9: error: unrecognized command line option '-V'
gcc-4.9: fatal error: no input files
compilation terminated.
...
@Nakilon
Copy link
Author

Nakilon commented Sep 6, 2015

The same with ruby-1.9.2-p330

@Nakilon
Copy link
Author

Nakilon commented Sep 6, 2015

Fixed by sudo removing from /usr/local/bin/ruby-build those lines gnprice/ruby-build@9c3e164 that add clang flags to /usr/local/bin/gcc-4.9 that is used when I do rbenv install.

rbenv/ruby-build#319
rbenv/ruby-build#325

@mislav
Copy link
Member

mislav commented Oct 10, 2015

Glad you solved it. Since this is a ruby-build issue, please post future updates in existing https://github.com/sstephenson/ruby-build/issues tickets or open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants