This seems to be an OSX 10.5 Leopard problem, so this is a heads-up, but maybe something similar has been seen on other platforms?
-----
some background:
Leopard updated to X11R7 - Tiger, Panther have R6.
Apple dropped the "Rn" part of the name, so it's just /usr/X11 now. The side effect makes new X11-linked software incompatible with Tiger. There is also a symlink from X11R6 to X11 so old Tiger X11 software can run on Leopard (assuming they're compatible).
It looks like Tiger's default is to build multi-module libraries (one for each object file), while now it's single-module libraries.
-----
First, linking -L/usr/X11/lib -lGL on OSX causes a weird link problem:
ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
After some digging around, this appears to be a common problem on Leopard, and the workaround is to use the -dylib_file flag:
-dylib_file /usr/X11/lib/libGL.dylib:/usr/X11/lib/libGL.dylib
So, this works for GRASS/NVIZ. But now there is another problem - maybe OSX-specific. Togl can't find ANY _glX* symbols in libGL:
Undefined symbols for architecture i386:
"_glViewport", referenced from:
_Togl_EventProc in togl.o
"_glXChooseVisual", referenced from:
_Togl_CreateWindow in togl.o
"_glPixelStorei", referenced from:
_Togl_DumpToEpsFile in togl.o
...
Linking with -undefined dynamic_lookup solves the build problem. NVIZ also runs, so it's finding those symbols at runtime. Though there are some visual glitches in the view pane that are mostly cleared up by resizing the window.
Another issue with X11/Tcltk in Leopard - gis.m won't run. I get an error:
GRASS 6.3.cvs (spearfish60):~ > X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 70 (X_PolyFillRectangle)
Serial number of failed request: 2296
Current serial number in output stream: 2337
Maybe this is a problem with Tcltk 8.5? Or the newer X11? or both? The error is meaningless to me, and there is no crash+crashlog to help figure it out.
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
The equator is so long, it could encircle the earth completely once.