Continually experimenting with new ideas and techniques — Reconstructing, Developing, Modernising.
New versions of ruby 1.8.7, 1.9.3, and 2.0.0 came out recently to fix a security issue, and for the first time I have tried building an old (1.8.x) on OS X 10.8.4 (Mountain Lion).
I tried rbenv install 1.8.7-p374, and it ended like this:
Inspect or clean up the working tree at /var/folders/f3/6zk_yypd73jc88n1p6ww2f_00000gn/T/ruby-build.20130628064809.97811
Results logged to /var/folders/f3/6zk_yypd73jc88n1p6ww2f_00000gn/T/ruby-build.20130628064809.97811.log
Last 10 log lines:
tcltklib.c:9862: error: expected ‘;’ before ‘event’
tcltklib.c:9892: error: ‘struct dummy_TkMenu’ has no member named ‘menuType’
tcltklib.c:9897: error: ‘struct dummy_TkMenu’ has no member named ‘menuType’
tcltklib.c:9915: error: ‘event’ undeclared (first use in this function)
tcltklib.c:9916: error: ‘ConfigureNotify’ undeclared (first use in this function)
tcltklib.c:9917: error: ‘Tk_FakeWin’ has no member named ‘display’
tcltklib.c:9919: error: ‘Tk_FakeWin’ has no member named ‘window’
tcltklib.c:9920: error: ‘Tk_FakeWin’ has no member named ‘display’
make: *** [tcltklib.o] Error 1
make: *** [all] Error 1
As X11 is no longer part of the OS I had to install XQuartz to get the X11 headers and libraries installed, and I needed to add CPPFLAGS=-I/opt/X11/include/ to the command line:
CPPFLAGS=-I/opt/X11/include/ rbenv install 1.8.7-p374
This worked fine, the only other change I needed to make was to comment out pry-plus from my ~/.rbenv/default-gems to build and install this old version of ruby.
I hope this helps somebody out there save a couple of minutes!
(Edited 2013-10-26 to include Mavericks in the title and body, as it works on that too)