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

John Gabriele jmg3000 at gmail.com
Sun Nov 5 17:38:18 EST 2006


On 11/5/06, Shannon Holland <holland at loser.net> wrote:
> I hope this doesn't wind up being too dumb of a question, being quite
> new to ruby and all, but I'm having difficulties on building ruby-
> opengl on a Mac OS X 10.4.8 (intel) system.

Hi Shannon.

> When I run the build.sh script I get:

Actually, from the looks of that output, it looks more like your ran
"rake" rather than the build.sh script.

Note: that build.sh script is just a quick hack to use mkrf for each
of the components of ruby-opengl. Incidentally, I believe that
(unfortunately) the current *release* of mkrf is broken, so you'd need
to grab and install mkrf from svn for it to work correctly with
ruby-opengl.

> ============================== compiling: ext/gl/gl.c --> ext/gl/gl.o
> cc -g -Os -pipe -fno-common -pipe  -fno-common -pipe -fno-common -I/
> usr/lib/ruby/1.8/universal-darwin8.0 F/System/Library/Frameworks -c -
> o ext/gl/gl.o ext/gl/gl.c
>
> ============================== linking ext/gl/gl.bundle
> cc -bundle -lruby -framework GLUT -framework OpenGL -o ext/gl/
> gl.bundle ext/gl/gl.o ext/common/rbogl.o -lGL
> /usr/bin/ld: can't locate file for: -lGL
> collect2: ld returned 1 exit status
> rake aborted!
> Command failed with status (1): [cc -bundle -lruby -framework GLUT -
> framewo...]
>

Ouch. You know what Shannon? I think I broke the top-level Rakefile
for Mac OS X a little while back without realizing it (I'm on Debian
and Ubuntu GNU/Linux). Anyhow, writing those build commands ourself in
that Rakefile is pretty fragile anyway. Keep reading.

> I'm assuming -lGL is referring to the OpenGL library, but won't that
> have already been handled via the "-framework OpenGL" option?

Yes, you're right.

> I'm getting a few other build errors as well. [snip]
>
> Should this all be working on OS X? Might there be something else I
> needed to have done?

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.

If anyone else can let us know if the build.sh script + current mkrf
(from svn) works on OS X, that would be helpful.

Note, further development of ruby-opengl is pretty much stalled at the
moment. If anyone wants to get involved either as a developer or admin
for ruby-opengl, please let me know.

Thanks,
---John


More information about the ruby-opengl-devel mailing list