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

Unable to install 1.9.3-head on OS X Lion 10.7.2 #534

Closed
mrgrauel opened this issue Oct 28, 2011 · 31 comments
Closed

Unable to install 1.9.3-head on OS X Lion 10.7.2 #534

mrgrauel opened this issue Oct 28, 2011 · 31 comments
Milestone

Comments

@mrgrauel
Copy link

I have OS X Lion 10.7.2 and RVM 1.9.0 installed. I currently have 1.9.2-head installed and wanted to update to 1.9.3-head, but I get an Error.

rvm install 1.9.3-head
Installing Ruby from source to: /Users/ag/.rvm/rubies/ruby-1.9.3-head, this may take a while depending on your cpu(s)...

ruby-1.9.3-head - #fetching
HEAD is now at 4197f33 merges r32345 from trunk into ruby_1_9_2.
Checking out files: 100% (1694/1694), done.
Switched to branch 'ruby_1_9_3'
From git://github.com/ruby/ruby

  • branch ruby_1_9_3 -> FETCH_HEAD
    Already up-to-date.
    Copying from repo to src path...
    Running autoreconf
    Fetching yaml-0.1.4.tar.gz to /Users/ag/.rvm/archives
    Extracting yaml-0.1.4.tar.gz to /Users/ag/.rvm/src
    Configuring yaml in /Users/ag/.rvm/src/yaml-0.1.4.
    Compiling yaml in /Users/ag/.rvm/src/yaml-0.1.4.
    Installing yaml to /Users/ag/.rvm/usr
    ruby-1.9.3-head - #configuring
    ERROR: Error running ' ./configure --prefix=/Users/ag/.rvm/rubies/ruby-1.9.3-head --enable-shared --disable-install-doc --with-libyaml-dir=/Users/ag/.rvm/usr ', please read /Users/ag/.rvm/log/ruby-1.9.3-head/configure.log
    ERROR: There has been an error while running configure. Halting the installation.

cat /Users/ag/.rvm/log/ruby-1.9.3-head/configure.log
[2011-10-28 14:08:47] ./configure --prefix=/Users/ag/.rvm/rubies/ruby-1.9.3-head --enable-shared --disable-install-doc --with-libyaml-dir=/Users/ag/.rvm/usr
checking build system type... x86_64-apple-darwin11.2.0
checking host system type... x86_64-apple-darwin11.2.0
checking target system type... x86_64-apple-darwin11.2.0
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.

I can install any other kind of ruby version but not any 1.9.3 version.

@mpapis
Copy link
Member

mpapis commented Oct 28, 2011

what is your Xcode version, do you have llvm and gcc installed , is $GCC variable set to something ?

@mrgrauel
Copy link
Author

Xcode 4.2 AppStore Version so llvm and gcc is installed. The variable I'll check as soon as I am at home

@ghost
Copy link

ghost commented Oct 28, 2011

@mpapis @angrauel

Its because 4.2 does not have the gcc-4.2 binary. We set CC to that. When no binary is found, it reports that it can not make executables. (That and when the bin is set to wrong permissions such as readonly). With 4.2 its all llvm-gcc. They removed the normal gcc entirely. Thats the problem. the llvm-gcc doesn't build items correctly and some of the rubies have issues. thats all I can say. I can't track it down to THIS EXACT ITEM level. We need the configure.log and make log at the least to be able to determine anything at all. This is not an overnight "we got the solution" issue. This is going to take some time to suss out.

Back out Xcode 4.2 completely and install Xcode 4.1. The link is in rvm requirements output.

@ghost
Copy link

ghost commented Oct 28, 2011

Also, no offense but users need to start reading the docs locally, and on the site. The installation and rvm requirements both specifically state:

"** Lion Users: DO NOT use Xcode Version 4.2.x for OS X Lion. It currently fails to build several rubies and gems,
as well as several Homebrew and Macports packages as well. Xcode Version 4.1 (4B110) works.
You can find Xcode 4.1 for OS X Lion at:
https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.1_for_lion/xcode_4.1_for_lion.dmg
"

@mpapis
Copy link
Member

mpapis commented Oct 28, 2011

@angrauel you can try to experiment with Xcode 4.2 - but we can not guaranty any results, easiest way most likely will be to link llvm compile binary to /usr/bin/gcc-4.2 ...

@mpapis mpapis closed this as completed Oct 28, 2011
@mrgrauel
Copy link
Author

Thank for your help, but as an iOS Developer I do need Xcode 4.2 and cannot go back to 4.1. Are you gonna fix it in an upcoming release?

@mpapis
Copy link
Member

mpapis commented Oct 28, 2011

@angrauel as i wrote already you need to try by yourself to link one of C++ compilers available in Xcode 4.2 to /usr/bin/gcc-4.2 - if you have any success compiling it this way please let us know and we will try to include your solution in RVM

@mrgrauel
Copy link
Author

"CC=/usr/bin/gcc rvm install 1.9.3-head" this one is working

rvm list

rvm rubies

=> ruby-1.9.2-head [ i386 ]
ruby-1.9.3-head [ x86_64 ]

@mrgrauel
Copy link
Author

ok there seems to be a problem with gem now....
rvm gem upgrade --system
WARN: Please note that rvm gem ... is only an alias to rvm do gem ...,
it might work different as in earlier versions of RVM and will be shortly removed!
WARN: rvm do gem upgrade '--system' is depracated, use rvm all do gem upgrade '--system' or rvm 1.9.2 do gem upgrade '--system' instead.
ERROR: While executing gem ... (RuntimeError)
Unknown command upgrade
ERROR: While executing gem ... (RuntimeError)
Unknown command upgrade

when i change to ruby 1.9.2 everything is working.

@mpapis
Copy link
Member

mpapis commented Oct 28, 2011

@angrauel could I also ask for gcc -v - does it also allow to compile other rubies like 1.9.2 or 1.8.7, rbx, jruby ?

@mrgrauel
Copy link
Author

MacBook-Air:BuyersGuide ag$ /usr/bin/gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)

@mpapis
Copy link
Member

mpapis commented Oct 28, 2011

@angrauel maybe this is the issue which made requirement for older Xcode ?

@jrozner
Copy link

jrozner commented Oct 30, 2011

rvm install 1.9.3-p0 --with-gcc=clang works as of rvm 1.9.1 with XCode 4.2

@mpapis mpapis reopened this Oct 30, 2011
@mpapis
Copy link
Member

mpapis commented Oct 30, 2011

as instructed here: http://svn.ruby-lang.org/repos/ruby/tags/v1_9_3_0/NEWS we should be able to use Xcode 4.2 using --with-gcc=clang

@edruder
Copy link

edruder commented Oct 30, 2011

rvm install 1.9.3-p0 --with-gcc=clang successfully built 1.9.3-p0 with Xcode 4.2 on Lion 10.7.2.

More info:

$ which clang; clang -v
/usr/bin/clang
Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin11.2.0
Thread model: posix

@mpapis
Copy link
Member

mpapis commented Oct 30, 2011

fixed as of 2c8d9cd

is enough to just write:

rvm install 1.9.3

@mpapis mpapis closed this as completed Oct 30, 2011
mpapis added a commit that referenced this issue Oct 31, 2011
@levinalex
Copy link

as of 8adc780

rvm install 1.9.3

no longer works with XCode 4.2 when gcc is not installed:

$ rvm install 1.9.3-p0 --with-gcc=clang
ERROR: The autodetected CC(clang) is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`, and set CC=/path/to/gcc .

@martinstreicher
Copy link

Running Lion 10.7.2, Xcode 4.2.1, building with command rvm install 1.9.3-head --with-gcc=clang yields my old favorite...

configuring zlib
/bin/sh: line 0: cd: ext/-test-/add_suffix: No such file or directory
make[1]: *** [ext/-test-/add_suffix/all] Error 1
make: *** [build-ext] Error 2

Any suggestions?

@mpapis
Copy link
Member

mpapis commented Dec 1, 2011

as discussed yesterday on #RVM it looks like ruby-head/compilation stack issue, please discuss with ruby(mri) team

@frodera
Copy link

frodera commented Jan 17, 2012

Running Lion 10.7.2, Xcode 4.2.1. and GCC installed from https://github.com/kennethreitz/osx-gcc-installer

rvm install 1.9.3 --with-gcc=gcc-4.2

Worked for me.
Just my 2 cents.

@mpapis
Copy link
Member

mpapis commented Jan 17, 2012

@frodera i need to warn you that Xcode 4.2.1 and osx-gcc-installer not always play nice together - especially for native extension gems

@frodera
Copy link

frodera commented Jan 22, 2012

Thanks @mpapis for the warning. I do not really need Xcode, so I have uninstalled it and left osx-gcc-installer. Hombrew seems happy with that and gems are getting installed properly on rvm.

@Jaybuz
Copy link

Jaybuz commented Feb 29, 2012

@frodera Thank you so much for sharing this! They should probably update RVM with that.

@ghost
Copy link

ghost commented Feb 29, 2012

@Jaybuz nothing to update in rvm. We don't install, manage, control, or otherwise dictate the compiler. Thats all you, as the user. We have gone way out on limbs trying to find the correct combination of settings for RVM to help you get compilations right once you do have a compiler installed that is usable.

The problem stems from Apple's changes to their Xcode package and their compiler. Has nothing to do with RVM. We just get to clean up the mess because the users don't understand that.

And btw, we all do advocate the ox-gcc-installer. Its just that a lot of the users need the headers that are stripped out to make it smaller for such things as Node.js (Carbon headers) ect. And we can not stop supporting Xcode as thats the defacto compiler suite on OS X. (Which I run myself)

@Jaybuz
Copy link

Jaybuz commented Feb 29, 2012

@deryldoucette I'm using the ox-gcc-installer. No xcode here.

@ghost
Copy link

ghost commented Feb 29, 2012

@Jaybuz OK, but thats individualistic. We have to support Xcode and the osx-gcc-installer. The great majority of the OSX user base uses Xcode not osx-gcc-installer. More are moving over, but we have to support Xcode, itself, directly. RVM can not just support the stripped down and repackaged Xcode (which is what osx-gcc-installer actually is). Its a "the majority rules" thing.

@Jaybuz
Copy link

Jaybuz commented Feb 29, 2012

Well can't you just add a little comment about it? I spent hours looking for a fix.

@mpapis
Copy link
Member

mpapis commented Feb 29, 2012

@Jaybuz have you read rvm requirements ?

@ghost
Copy link

ghost commented Feb 29, 2012

∴ rvm requirements

Notes for Mac OS X 10.7.3, Xcode 4.1.

For JRuby: Install the JDK. See http://developer.apple.com/java/download/ # Current Java version "1.6.0_26"
For IronRuby: Install Mono >= 2.6
For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'

You can use & download osx-gcc-installer: https://github.com/kennethreitz/osx-gcc-installer
** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer.

To use an RVM installed Ruby as default, instead of the system ruby:

rvm install 1.8.7 # installs patch 357: closest supported version
rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems
rvm alias create default 1.8.7

And reopen your terminal windows.

Xcode 4.2:

  • is only supported by ruby 1.9.3+ using command line flag: --with-gcc=clang
  • it breaks gems with native extensions, especially DB drivers.

Please read the documentation next time. Thank you!

On 2012-02-29, at 12:19 PM, Michal Papis wrote:

@Jaybuz have you read rvm requirements ?


Reply to this email directly or view it on GitHub:
#534 (comment)

@Jaybuz
Copy link

Jaybuz commented Feb 29, 2012

I'm on about setting the gcc version: --with-gcc=gcc-4.2

@ghost
Copy link

ghost commented Feb 29, 2012

Dude, we had already done that. sheesh!

This message contains confidential information and is intended for those listed in the "To:", "CC:", and/or "BCC:" fields of the message header.If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

On 2012-02-29, at 12:26 PM, Jason Busby wrote:

I'm on about setting the gcc version: --with-gcc=gcc-4.2


Reply to this email directly or view it on GitHub:
#534 (comment)

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

8 participants