[GRASS-dev] Re: [bug #4768] (grass) nviz segfault on startup when

William Kyngesburye woklist at kyngchaos.com
Sun Jul 23 14:00:52 EDT 2006


On Jul 23, 2006, at 12:33 PM, Michael Barton via RT wrote:

> William,
>
> This is great news.
>
> Could you send me the details of how you set this up and configured it
> (including your list of configure flags) so that I can duplicate  
> it? I won't
> be able to do it until at least Tuesday or maybe Wednesday, so  
> there is no
> hurry. But I'd like to try it to see if I can do it too.
>
Actually, simple standard stuff for configuration.  In addition to  
setting includes/libs options for the various graphics, GIS and DB  
libraries, these are the important settings:

--with-tcltk-includes=/usr/local/grasslibs/include \
--with-tcltk-libs=/usr/local/grasslibs/lib \
--with-x --without-motif --without-glw --with-opengl=x11

I suppose with an X11-only build like this, you could add motif and  
glw.  This example assumes an X11 tcltk build in /usr/local/ 
grasslibs, which is where I installed mine.  I think Lorenzo uses  
'grasslib', without the plural, so you could try his tcltk.  Or build  
your own wherever you like, but I suggest an isolated location like  
this so other alternate builds of GRASS (ie Aqua) don't get  
confused.  ie, if you build the X11 tcltk in /usr/X11R6, an Aqua  
build of GRASS that includes X11 support might pick up the X11 tcltk  
at link time, not the Aqua version.

Which brings me to the key here with TclTk - I think the X11 NVIZ  
crash is because of GRASS getting accidentally linked to Apple's Aqua  
TclTk (which is quite old BTW, 8.4.7) instead of the intended X11  
TclTk.  I guess one thing to do is make sure you use --with-tcltk- 
libs=.  And in my case, I had a broken X11 TclTk install, so even  
then it didn't link to it until I fixed it.  If a -L/usr/lib gets  
somehow inserted in the link step before -L/path/to/your/X11/tcltk/ 
lib, that could cause it to grab Apple's TclTk.

A way to check if it linked right is to use otool:

$ otool -L /usr/local/grass-6.1.cvs/bin/nviz

(or you can check the nviz binary in the grass source/dist/bin before  
make install)

This will list all the library paths nviz needs.  Make sure tcl and  
tk libs have the right paths.  Fixing it is another matter, but  
hopefully it will be right the first time.

-----
William Kyngesburye <kyngchaos at kyngchaos.com>
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled  
with hyena offal?
Second Pogril: I don't know.  Why IS life like sticking your head in  
a bucket filled with hyena offal?
First Pogril: I don't know either.  Wretched, isn't it?

-HitchHiker's Guide to the Galaxy




More information about the grass-dev mailing list