[ruby-opengl-devel] Building on Mac OS X
jmg3000 at gmail.com
Sun Nov 5 23:30:37 EST 2006
On 11/5/06, Shannon Holland <holland at loser.net> wrote:
> On Nov 5, 2006, at 2:38 PM, John Gabriele wrote:
> > Yeah, it should work for OS X one way or another, but not with the
> > current top-level Rakefile.
> > Please try installing mkrf (http://rubyforge.org/projects/mkrf/) from
> > svn source, and then running the ruby-opengl build.sh script. If that
> > works for you, I'll remove the compiling/linking commands from the
> > top-level Rakefile, since they're currently broken anyway.
> "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:
> 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
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.
More information about the ruby-opengl-devel