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

Need to prevent MRI from using gcc-4.2 on Yosemite #651

Closed
mislav opened this issue Oct 12, 2014 · 15 comments
Closed

Need to prevent MRI from using gcc-4.2 on Yosemite #651

mislav opened this issue Oct 12, 2014 · 15 comments

Comments

@mislav
Copy link
Member

mislav commented Oct 12, 2014

Newer MRI installs are broken on Yosemite for people who have Homebrew apple-gcc42 installed. Previously MRIs would find gcc-4.2 in PATH and use it over /usr/bin/gcc/clang and it would be fine either way, but that doesn't work in Yosemite for some reason.

The workaround is easy: set CC=/usr/bin/gcc or CC=clang for the build and Ruby will use clang instead of detecting gcc-4.2 in PATH.

We can't expect each person to figure this out by themselves. I propose that on Yosemite we default to CC=clang for MRI >= 1.9.3-p0 if an explicit CC wasn't set.

Original issue: rbenv/rbenv#610

/cc @hsbt @jeremy

@mislav
Copy link
Member Author

mislav commented Oct 12, 2014

On the other hand, we might need to require using gcc-4.2 for MRI up to 1.9.3-p547, per rbenv/rbenv#596 /cc @michiels

❓ 😕 ❓

@hsbt
Copy link
Member

hsbt commented Oct 13, 2014

👍

apple-gcc4.2 is compiled by darwin11 arch. it's not compatible Yosemite. Probably it works under darwin13(marvericks) arch.

After Yosemite release, We need to use clang or /usr/bin/gcc (aliases clang) or gcc-4.9 with homebrew.

@debo
Copy link

debo commented Oct 27, 2014

Hi everyone, I'm sorry to ruin this but apparently despite I followed all the advises mentioned in the various thread I'm still not able to compile the latest Ruby on Yosemite.

I'm currently trying to install 2.1.4 but the following is the log I get:

https://gist.github.com/88b061616c44948a00b1

I tried exporting CC with both gcc or clang and I also tried the --without-gcc option and none of them helped. Any additional idea?

@hsbt
Copy link
Member

hsbt commented Oct 28, 2014

@marcodebortoli Please uninstall apple-gcc42

@debo
Copy link

debo commented Oct 28, 2014

@hsbt thanks that was spot on. So are you guys suggesting, in general, to don't use apple-gcc42 anymore under Yosemite whatsoever?

@mislav
Copy link
Member Author

mislav commented Oct 28, 2014

On Oct 28, 2014, at 12:54 AM, Marco De Bortoli [email protected] wrote:

I tried exporting CC with both gcc or clang

Did you literally try setting CC=clang? Can you try again? Because this is enough to tell Ruby build to not look for gcc-4.2 on np the system and is a workaround I'm baking into ruby-build since yesterday.=

@debo
Copy link

debo commented Oct 28, 2014

Yes @mislav, I tried setting CC to clang, /urs/bin/gcc, the flag, I also updated the command line tools as suggested in other thread. I'm not sure if the fact I'm using fish shell has anything to do with the failure but definitely something to investigate further. For the time being I uninstalled apple-gcc42 as @hsbt suggested and it compiled. If you need any assistance and you want a guinea pig feel free to ping me :-)

@marktran
Copy link

@marcodebortoli, how did you set CC to clang in fish? Was it env CC=clang ruby-build 2.1.4 ...?

@debo
Copy link

debo commented Oct 28, 2014

@marktran nope, $ set CC clang; rbenv install 2.14

@hsbt
Copy link
Member

hsbt commented Oct 28, 2014

We removed priority configuration for apple-gcc42 at r48174

@mislav
Copy link
Member Author

mislav commented Oct 28, 2014

@marcodebortoli That doesn't seem like you've exported the CC variable to subprocesses. That only sounds like you've set the value for the current shell.

@debo
Copy link

debo commented Oct 28, 2014

@mislav you are correct, I forgot to add the -x switch... I'll try tonight when I get home and let you know. Sorry for overlooking that.

@marktran
Copy link

@marcodebortoli env CC=clang rbenv install 2.1.4 should work. I use fish too 😄

@mislav mislav closed this as completed in 194e007 Oct 28, 2014
@debo
Copy link

debo commented Oct 29, 2014

@mislav @marktran I can confirm that the following fishshell compatible command works:

set -x CC clang; rbenv install 2.1.4

Sorry again for the misleading comment.

@sahilbathla
Copy link

+1

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

No branches or pull requests

5 participants