Building FOX and FXRuby on Mac OS X Leopard
I’ve run into a few snags trying to build and run FOX and FXRuby on Mac OS X Leopard, and so I wanted to capture those problems (and the solutions) here.
The first problem occurs at build time. FOX compiles OK, but at link time you may see this error message:
This is due to an apparent bug in the Xcode Developer Tools version 3.0 (the latest release). The workaround is to modify the setting of the
ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
LDFLAGSenvironment variable to include an additional flag:
Note that you’ll need to do a
make cleanand re-configure the build for this change to take affect.
The next problem occurrs at runtime. When you run a sample FOX application, such as adie, you may see a flood of error messages in the console window, along the lines of:
There are also several visual artifacts, such as disabled menu items being drawn incorrectly, that indicate something’s wrong. Fortunately, the Xquartz project is providing more up-to-date builds of the X server. Download their latest pre-built binary of the X server, and copy it over the installed version of
X Error: code 8 major 62 minor 0: BadMatch (invalid parameter attributes). X Error: code 8 major 62 minor 0: BadMatch (invalid parameter attributes). X Error: code 8 major 62 minor 0: BadMatch (invalid parameter attributes). ...
With these changes in place, FOX and FXRuby should work fine.
bunzip ~/Downloads/Xquartz-1.3a1.bz2 sudo cp ~/Downloads/Xquartz-1.3a1 /usr/X11/bin/Xquartz
P.S. Apologies for the formatting glitches; this WordPress theme isn’t particularly conducive to posting code snippets.