[ruby-opengl-devel] Building on Mac OS X

Shannon Holland holland at loser.net
Mon Nov 6 13:30:50 EST 2006

On Nov 5, 2006, at 8:30 PM, John Gabriele wrote:

> On 11/5/06, Shannon Holland <holland at loser.net> wrote:
>> On Nov 5, 2006, at 2:38 PM, John Gabriele wrote:
>> "rake gem" got
>> me a mkrf gem which I could then install.
>> But, I'm still failing in the build. running build.sh gets me a bunch
>> of errors, a top listing of which is:
>> Cleaning up previous build products ...
>> Building common/rbogl.o ...
>> (in /Users/holland/Source/ruby/ruby-opengl/trunk/ext/common)
>> cc -c -g -Os -pipe -fno-common -pipe  -fno-common -pipe -fno-common -
>> I/usr/lib/ruby/1.8/universal-darwin8.0 -F/System/Library/Frameworks -
>> o rbogl.o rbogl.c
>> Making Rakefile for gl ...
>> Building gl ...
>> (in /Users/holland/Source/ruby/ruby-opengl/trunk/ext/gl)
>> gcc  -fno-common -g -Os -pipe -fno-common -pipe  -fno-common -pipe -
>> fno-common   -I/usr/include -I/usr/lib/ruby/1.8/universal-darwin8.0 -
>> I/usr/lib/ruby/site_ruby/1.8 -I. -c -o gl.o gl.c
>> cc $(RC_CFLAGS) -bundle  -L"/usr/lib/ruby/1.8" -o gl.bundle gl.o ../
>> common/rbogl.o -lpthread -ldl -lobjc
>> sh: line 1: RC_CFLAGS: command not found
>> /usr/bin/ld: Undefined symbols:
>> _glAccum
>> _glAlphaFunc
>> Thanks for your help!
> Doing a quick search, I see that this has come up before on ruby-talk.
> It seems that the version of Ruby that comes with OS X has a broken
> rbconfig.rb. You'll be best off grabbing and installing the most
> current Ruby.
> I've got no experience with installing Ruby on OS X. I'm guessing you
> leave the older one in-place, install the fresh one with the usual
> incantations (such that it will end up in /usr/local I presume), and
> then make sure your $PATH is set up such that you always hit the Ruby
> that you just installed before Apple's. You may have to look around
> for Apple-specific Ruby install instructions on the net (I'm sure it's
> come up on ruby-talk in the past).
> You'll also want to change the shebang line in your scripts from
> /usr/bin/ruby (?) to wherever you install the current version.
> *Then* you can install the bleeding-edge mkrf, and then build ruby- 
> opengl.

OK, thanks for your help John - I will go ahead and try that. I have  
had to do that before to get rails working, just hadn't done so on  
this machine yet. Hopefully Apple will get around to fixing it soon!


More information about the ruby-opengl-devel mailing list