Getting FXRuby to work on MacOSX 10.2

Raphael Marmier wrote:

I've been trying to use FXRuby on MacOSX 10.2.2 and 10.2.3 the past week without success. I guess my problems come from the fact that 10.2 is built with gcc 3.1, which is now the default compiler now.

I tried fox-1.0.28/29 and FXRuby-1.0.16/17.

Fox compiles with gcc 3.1 but is unreliable (./test/hello fails with Bus error).

MacOSX allows to switch back to gcc 2.95 so I decided to try compiling everything, including ruby (1.6.7), with it. It just required a few hack.

Fox just works, even with opengl.

Just to confirm so far: you're saying that if you compile FOX with gcc-2.95, FOX (including its OpenGL stuff) works properly. But if you compile FOX with gcc-3.1 it breaks? That's interesting (not in a good way, but interesting nevertheless). FOX seemed to transition from the gcc-2.9x series to gcc-3.x just fine under Linux et al.

FXRuby compiles and installs fine. But when I try equire 'fox' in irb, it explodes with the following:

[pomme:~/Work] raphael% /usr/local/bin/irb
irb(main):001:0> require 'fox'
(irb):1: [BUG] Bus Error
ruby 1.6.7 (2002-03-01) [powerpc-darwin6.0]
Abort

Yes. This is consistent with what I, and everyone else who's tried it under Mac OS X, has seen.

hmmm. From here on I have no clue.

You are in good company. None of us has a clue about what to try next :wink: Before I left town for the holidays I had begun building debug versions on the Mac OS X node of the SourceForge compile farm, to see if I had any shot at all with debugging the problem, but I don't know if that will really tell us anything we don't already know. The crash is definitely occurring while Ruby is trying to dynamically load the shared library (fox.so) that implements the FXRuby extension module, but I don't yet know why.