1.9.3 fails to install via rvm on OS X Lion

So here's the story

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

    ...

    ruby-1.9.3-p0 - #configuring
    ERROR: Error running ' ./configure
--prefix=/Users/darth/.rvm/rubies/ruby-1.9.3-p0 --enable-shared
--disable-install-doc --with-libyaml-dir=/Users/darth/.rvm/usr ', please
read /Users/darth/.rvm/log/ruby-1.9.3-p0/configure.log
    ERROR: There has been an error while running configure. Halting the
installation.

    $ cat /Users/darth/.rvm/log/ruby-1.9.3-p0/configure.log
    [2011-11-24 09:11:23] ./configure
--prefix=/Users/darth/.rvm/rubies/ruby-1.9.3-p0 --enable-shared
--disable-install-doc --with-libyaml-dir=/Users/darth/.rvm/usr
    configure: WARNING: unrecognized options: --with-libyaml-dir
    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 whether the C compiler works... no
    configure: error: in `/Users/darth/.rvm/src/ruby-1.9.3-p0':
    configure: error: C compiler cannot create executables
    See `config.log' for more details

It looks like 1.9.3 doesn't like my C compiler, but I have no idea why.
Could this be caused by wrong version of Xcode? I'm running on 4.2
(4D199) on OS X Lion.

···

--
Posted via http://www.ruby-forum.com/.

[...]

It looks like 1.9.3 doesn't like my C compiler, but I have no idea why.
Could this be caused by wrong version of Xcode? I'm running on 4.2
(4D199) on OS X Lion.

Well, on Snow Leopard I have 7 flavours of C compiler to choose from with
Xcode 3. Try passing a flag at ./configure & see which one Lion deems fit
for purpose (I've installed 1.9.3 via rvm so I don't reckon it's that).

Cheers,

    Phil...

···

On 24/11/11 08:21, "Jakub Arnold" <darthdeus@gmail.com> wrote:

--
Nothing to see here... move along, move along

I had what looks like the same problem last week. After updating the rvm
and reading this SO answer:

I ran the following from Terminal:

$ rvm install 1.9.3 --with-gcc=clang

Hope this works.

Cheers
Pascal

···

--
Posted via http://www.ruby-forum.com/.

I struggled with this also. I eventually just resorted to installing
osx-gcc-installer over the top of Xcode 4.2 which seems to have worked.
All the other work arounds like --with-gcc=clang didn't work for me.

Here's where you can find osx-gcc-installer:

···

--
Posted via http://www.ruby-forum.com/.

The problem wasn't with clang, but with a buggy version of autoconf. It is fixed now so I'd recommend against your workaround.

···

On Nov 27, 2011, at 15:32, Tom Wardrop <tom@tomwardrop.com> wrote:

I struggled with this also. I eventually just resorted to installing
osx-gcc-installer over the top of Xcode 4.2 which seems to have worked.
All the other work arounds like --with-gcc=clang didn't work for me.