Mountain Lion rvm install 1.8.7 x11 error


Después de actualizar a Mountain Lion, intenté instalar 1.8.7, y obtuve un error. No se encontró el archivo X11, instalé Xquarkz, pero nada cambió. ¿Qué pasa?

Fail to find [tclConfig.sh, tkConfig.sh]
Use MacOS X Frameworks.

Find Tcl/Tk libraries. Make tcltklib.so which is required by Ruby/Tk.
clang -I. -I../.. -I../../. -I../.././ext/tk -DHAVE_RB_SAFE_LEVEL -DHAVE_RB_HASH_LOOKUP -DHAVE_RB_PROC_NEW -DHAVE_RB_OBJ_TAINT -DHAVE_ST_PTR -DHAVE_ST_LEN -DRUBY_VERSION=\"1.8.7\" -DRUBY_RELEASE_DATE=\"2012-06-29\"  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -DWITH_TCL_ENABLE_THREAD=0 -fno-common -g -O2  -fno-common -pipe -fno-common   -c stubs.c
In file included from stubs.c:10:
/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
#       include <X11/Xlib.h>
                ^
1 error generated.
make[1]: *** [stubs.o] Error 1
make: *** [all] Error 1
Author: three, 2012-07-26

5 answers

Intente instalar X11 a través de http://xquartz.macosforge.org/landing / establezca la ruta correcta a la biblioteca X11 para el compilador con:

export CPPFLAGS=-I/opt/X11/include

Luego intente reinstalar ruby, pasando al compilador donde está gcc-4.2:

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

Sin CC Tengo muchos fallos de segmentación.

 142
Author: Matteo Alessani,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-07-26 10:25:26

Me las arreglé para hacer lo siguiente en OSX 10.8.2 sin un problema:

rvm install 1.8.7 --with-gcc=clang --without-tcl --without-tk
 18
Author: Laurynas,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-12-09 17:09:28

Si no necesita tcl o tk y está usando rbenv, esto debería funcionar:

brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb

CC=/usr/local/bin/gcc-4.2 CONFIGURE_OPTS="--without-tcl --without-tk" rbenv install 1.8.7-p358
 5
Author: Neal,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-12-03 05:09:15

Incluso después de la corrección de X11 estaba recibiendo este error de compilación.

compiling stubs.c
In file included from stubs.c:16:
/usr/include/tk.h:23:3: error: #error Tk 8.5 must be compiled with tcl.h from Tcl 8.5
make[2]: *** [stubs.o] Error 1
make[1]: *** [ext/tk/all] Error 2
make: *** [build-ext] Error 2

Después de muchos arañazos en la cabeza, noté esta línea en la salida make.

Use ActiveTcl libraries (if available).

Resulta que tenía ActiveTcl 8.4 instalado instalado hace años, pero estaba recogiendo tk.h de / usr / include que es la versión 8.5.

No podía averiguar cómo desinstalar ActiveTcl de forma segura y las instrucciones de desinstalación de ActiveTcl no eran correctas, pero instalé ActiveTcl 8.5 y eso solucionó el problema. ActiveTcl Descargar aquí.

Frustrante. De todos modos espero que esto ayude a alguien más.

 3
Author: bgebhardt,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-09-09 07:10:49

Aquí está mi .rvmrc bootstrap file por ahora, espero que ayude:

if (uname -a | grep '12.0.0 Darwin' >/dev/null); then
    CC=/usr/local/bin/gcc-4.2 CPPFLAGS=-I/opt/X11/include rvm --install --create --disable-tcl --disable-tk use ree@gemset_name
else
    rvm --install --create --disable-tcl --disable-tk use ree@gemset_name
fi

if ! which bundle >/dev/null; then
    gem install bundler --pre --no-ri --no-rdoc && bundle install
fi


if ! bundle check >/dev/null; then
    bundle install
fi
 0
Author: Riku Räisänen,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-08-01 22:19:18