Mountain Lion Rvm Install 1.8.7 X11 Error

Mountain Lion rvm install 1.8.7 x11 error

Try to install X11 via http://xquartz.macosforge.org/landing/ set the correct path to the X11 library for the compiler with:

export CPPFLAGS=-I/opt/X11/include

then try to reinstall ruby, passing to the compiler where gcc-4.2 is:

CC=/usr/local/bin/gcc-4.2 rvm reinstall 1.8.7

Without CC I got a lot of segmentation faults.

Mountain Lion rvm install 1.8.7 x11 error

Try to install X11 via http://xquartz.macosforge.org/landing/ set the correct path to the X11 library for the compiler with:

export CPPFLAGS=-I/opt/X11/include

then try to reinstall ruby, passing to the compiler where gcc-4.2 is:

CC=/usr/local/bin/gcc-4.2 rvm reinstall 1.8.7

Without CC I got a lot of segmentation faults.

Getting Ruby 1.8.7 installed on Mountain Lion (10.8)

I just figured it out! Please reference this question on SO

rvm can no longer install 1.8.7-p352 on Mac OS X Mountain Lion

rvm reinstall 1.8.7 --without-tcl --without-tk

Alternatively, try this installation order if you have Homebrew.

brew install tcl-tk

rvm reinstall 1.8.7

rvm can no longer install 1.8.7-p352 on Mac OS X Mountain Lion

it is problem in detecting tcl/tk by ruby 1.8.7, the solution is to disable it:

rvm reinstall 1.8.7 --without-tcl --without-tk

the other solution when tcl/tk is needed: https://stackoverflow.com/a/11666019/497756

configure: error: X11 library not found in Mountain Lion

This worked: ./configure F77=gfortran LDFLAGS=-L/opt/X11/lib.
It seems the key was to not edit CPPFLAGS.

rvm install ree looks for /opt/local on Mountain Lion with XCode - but I don't have MacPorts

I figured out how to get past this. All the stuff about /opt/local was a red herring. The fact that I don't have /opt/local was not causing any problems.

The real problem was farther down in the install.log:

/usr/include/tk.h:78:23: error: X11/Xlib.h: No such file or directory

The fix is to use --without-tk --without-tcl when installing ree:

rvm install ree --without-tk --without-tcl

I'm still having other unrelated problems installing ree, but at least this part is no longer a problem.

Mountain Lion X11 libraries can't ./configure

The toolchain won't find X11 in /opt. You need to either install X11 to a place where it can be found by the compiler/linker by default, or pass relevant -I and -L flags down to the corresponding tools. I hear this works:

 env CPPFLAGS="-I/opt/X11/include" LDFLAGS="-L/opt/X11/lib" your-build-command

though I personally just symlink everything to /usr/{lib,include}.



Related Topics



Leave a reply



Submit