[GRASSLIST:3146] Re: NVIZ and TK on Mac OS X
Glynn Clements
glynn.clements at virgin.net
Fri Feb 15 14:25:27 EST 2002
Nick Cahill wrote:
> This is not specifically a GRASS question, but perhaps someone here can help.
>
> I recently installed Grass 5 pre3 precompiled binaries on Mac OSX,
> and am getting an error when I start NVIZ:
>
>
> tsdptr 4729744 datakey 4729744
> start search mainPtr 0
> called create main window
> assigning interp 4700480
> tsd is 4729744 datakey 4729744
> Application initialization failed: Can't find a usable tk.tcl in the
> following d
> irectories:
> /System/Library/Tcl/tk8.3 /usr/local/grass5/etc/lib/tk8.3
> /usr/local/grass5/
> lib/tk8.3 /usr/local/grass5/etc/library /usr/local/grass5/library
> /usr/local/gra
> ss5/tk8.3/library /usr/local/tk8.3/library
>
>
>
> This probably means that tk wasn't installed properly.
Actually, I think that the problem is that the MacOS X version of Tk
locates the files using a "hack" which only works for the supplied
"wish" executable.
Basically, the directories which are searched are relative to the
location of the executable (apart from /System/Library).
If you examine the list of directories:
/System/Library/Tcl/tk8.3
/usr/local/grass5/etc/lib/tk8.3
/usr/local/grass5/lib/tk8.3
/usr/local/grass5/etc/library
/usr/local/grass5/library
/usr/local/grass5/tk8.3/library
/usr/local/tk8.3/library
and note that the executable pathname is:
/usr/local/grass5/etc/nviz2.2/NVWISH2.2
it appears that the search path is effectively:
/System/Library/Tcl/tk8.3
/usr/local/grass5/etc/nviz2.2/../lib/tk8.3
/usr/local/grass5/etc/nviz2.2/../../lib/tk8.3
/usr/local/grass5/etc/nviz2.2/../library
/usr/local/grass5/etc/nviz2.2/../../library
/usr/local/grass5/etc/nviz2.2/../../tk8.3/library
/usr/local/grass5/etc/nviz2.2/../../../tk8.3/library
> There is, however, an installation of tk8.3 at /usr/X11R6/lib. Where
> in Mac OSX do can I tell the system to look here for tk8.3? I don't
> see it in any of the GRASS startup scripts; I think it's somewhere in
> OSX.
AFAICT, the above behaviour is hard-coded into the tk shared library.
This will work for wish, assuming that both wish and the tk8.3
directory are installed into the bin and lib subirectories of a common
parent directory. It won't work for other programs which use the tk
library, though.
The simplest workaround would be to try making a symlink within
$GISBASE/lib, e.g.
ln -s /usr/X11R6/lib/tk8.3 /usr/local/grass5/lib/tk8.3
Also, you're not the first MacOS X user to have this problem, and I
suspect that you won't be the last. It might help other users (not
just of NVIZ, but any executable which uses the tk library) if you
could report this problem to whoever is responsible for the MacOS X
version of Tk.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-user
mailing list