[GRASS-dev] nviz broken on G5 iMac

I just compiled a cvs version I updated a few minutes ago, and nviz bombed. The rest of GRASS runs OK. I tried to start nviz just to see what is happening. It started the OSX tcltk aqua and then crashed.

I’m using a G5 iMac (not Intel) with OS X 10.4.7.

I’m putting the compiler errors below. Problems both with OGSF and NVIZ.

Michael


Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

=======================
Errors in:
/Users/cmbarton/grass_dev/grass6/lib/ogsf

anthgradpc7:~/grass_dev/grass6/lib/ogsf cmbarton$ makegcc -I/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include -I/usr/local/grasslib/include -g -O2 -I/usr/local/grasslib/include -fno-common -DPACKAGE="“grasslibs”" -I/usr/local/grasslib/include -I/usr/X11R6/include -DPACKAGE="“grasslibs”" -I/usr/X11R6/include -I/usr/local/grasslib/include -I/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include \ -o OBJ.powerpc-apple-darwin8.7.0/GS2.o -c GS2.cIn file included from /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/gstypes.h:340, from GS2.c:30:/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:200: warning: parameter names (without types) in function declaration/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:201: error: parse error before ‘GLuint’/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:458: error: parse error before ‘gsd_set_font’/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:458: warning: data definition has no type or storage class
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:461: error: parse error before ‘float’
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:474: error: parse error before ‘GLuint’
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:494: error: parse error before ‘GLuint’
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:555: error: parse error before ‘int’
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:747: error: parse error before ‘gsd_put_legend’
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:747: error: parse error before ‘GLuint’
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:747: warning: data definition has no type or storage class
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:748: warning: parameter names (without types) in function declaration
GS2.c:47: error: parse error before ‘*’ token
GS2.c: In function ‘GS_set_Narrow’:
GS2.c:436: error: ‘GLdouble’ undeclared (first use in this function)
GS2.c:436: error: (Each undeclared identifier is reported only once
GS2.c:436: error: for each function it appears in.)
GS2.c:436: error: parse error before ‘modelMatrix’
GS2.c:437: error: ‘GLint’ undeclared (first use in this function)
GS2.c:458: error: ‘GL_MODELVIEW_MATRIX’ undeclared (first use in this function)
GS2.c:458: error: ‘modelMatrix’ undeclared (first use in this function)
GS2.c:459: error: ‘GL_PROJECTION_MATRIX’ undeclared (first use in this function)
GS2.c:459: error: ‘projMatrix’ undeclared (first use in this function)
GS2.c:460: error: ‘GL_VIEWPORT’ undeclared (first use in this function)
GS2.c:460: error: ‘viewport’ undeclared (first use in this function)
GS2.c:463: error: parse error before ‘out_near’
GS2.c:469: error: parse error before ‘pt’
GS2.c:472: error: parse error before ‘pt’
GS2.c:478: error: ‘factor’ undeclared (first use in this function)
GS2.c:478: error: ‘out_near’ undeclared (first use in this function)
GS2.c:478: error: ‘out_far’ undeclared (first use in this function)
GS2.c:480: error: ‘out’ undeclared (first use in this function)
GS2.c: At top level:
GS2.c:673: error: parse error before ‘GLuint’
GS2.c: In function ‘GS_draw_legend’:
GS2.c:680: error: ‘name’ undeclared (first use in this function)
GS2.c:680: error: ‘fontbase’ undeclared (first use in this function)
GS2.c:680: error: ‘size’ undeclared (first use in this function)
GS2.c:680: error: ‘flags’ undeclared (first use in this function)
GS2.c:680: error: ‘range’ undeclared (first use in this function)
GS2.c:680: error: ‘pt’ undeclared (first use in this function)
GS2.c: At top level:
GS2.c:686: error: parse error before ‘list_id’
GS2.c: In function ‘GS_draw_list’:
GS2.c:692: error: ‘list_id’ undeclared (first use in this function)
GS2.c: At top level:
GS2.c:710: error: parse error before ‘list_id’
GS2.c: In function ‘GS_delete_list’:
GS2.c:713: error: ‘list_id’ undeclared (first use in this function)
GS2.c: In function ‘GS_zoom_setup’:
GS2.c:2400: error: ‘GLint’ undeclared (first use in this function)
GS2.c:2400: error: parse error before ‘tmp’
GS2.c:2402: error: ‘tmp’ undeclared (first use in this function)
GS2.c:2402: error: ‘num’ undeclared (first use in this function)
GS2.c: In function ‘GS_init_view’:
GS2.c:2806: error: ‘GL_MODELVIEW’ undeclared (first use in this function)
GS2.c:2826: error: ‘GL_DEPTH_TEST’ undeclared (first use in this function)
GS2.c:2827: error: ‘GL_LEQUAL’ undeclared (first use in this function)
GS2.c: In function ‘GS_clear’:
GS2.c:2887: error: ‘GL_DEPTH_BUFFER_BIT’ undeclared (first use in this function)
GS2.c:2887: error: ‘GL_COLOR_BUFFER_BIT’ undeclared (first use in this function)
GS2.c: In function ‘GS_get_aspect’:
GS2.c:2900: error: ‘GLint’ undeclared (first use in this function)
GS2.c:2900: error: parse error before ‘tmp’
GS2.c:2912: error: ‘GL_VIEWPORT’ undeclared (first use in this function)
GS2.c:2912: error: ‘tmp’ undeclared (first use in this function)
make: *** [OBJ.powerpc-apple-darwin8.7.0/GS2.o] Error 1

Errors in:
/Users/cmbarton/grass_dev/grass6/visualization/nviz

anthgradpc7:~/grass_dev/grass6/visualization/nviz cmbarton$ make
cd src ; make
gcc -I/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include -I/usr/local/grasslib/include -g -O2 -I/usr/local/grasslib/include -I/usr/local/grasslib/include -I/usr/local/grasslib/include -I/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include -I/usr/local/grasslib/include -I/usr/local/grasslib/include -DPACKAGE="“grassmods”" -I/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include
-o OBJ.powerpc-apple-darwin8.7.0/nvizAppInit.o -c nvizAppInit.c
In file included from togl.h:16,
from nvizAppInit.c:8:
togl_ws.h:14:3: error: #error None of OPENGL_X11, OPENGL_AQUA or OPENGL_WINDOWS defined
In file included from nvizAppInit.c:8:
togl.h:53:23: error: GL/gl.h: No such file or directory
In file included from nvizAppInit.c:8:
togl.h:165: error: parse error before ‘Togl_LoadBitmapFont’
togl.h:165: warning: data definition has no type or storage class
togl.h:166: error: parse error before ‘GLuint’
togl.h:215: error: parse error before ‘left’
In file included from /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/gstypes.h:340,
from interface.h:23,
from nvizAppInit.c:9:
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:200: warning: parameter names (without types) in function declaration
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:201: error: parse error before ‘GLuint’
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:458: error: parse error before ‘gsd_set_font’
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:458: warning: data definition has no type or storage class
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:461: error: parse error before ‘float’
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:474: error: parse error before ‘GLuint’
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:494: error: parse error before ‘GLuint’
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:555: error: parse error before ‘int’
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:747: error: parse error before ‘gsd_put_legend’
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:747: error: parse error before ‘GLuint’
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:747: warning: data definition has no type or storage class
/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:748: warning: parameter names (without types) in function declaration
In file included from nvizAppInit.c:9:
interface.h:67: error: parse error before ‘FontBase’
interface.h:67: warning: data definition has no type or storage class
interface.h:280: error: parse error before ‘load_font’
interface.h:280: warning: data definition has no type or storage class
make[1]: *** [OBJ.powerpc-apple-darwin8.7.0/nvizAppInit.o] Error 1
make: *** [nvwish] Error 2

On Jul 17, 2006, at 1:17 PM, Michael Barton wrote:

I just compiled a cvs version I updated a few minutes ago, and nviz bombed. The rest of GRASS runs OK. I tried to start nviz just to see what is happening. It started the OSX tcltk aqua and then crashed.

I’m using a G5 iMac (not Intel) with OS X 10.4.7.

I’m putting the compiler errors below. Problems both with OGSF and NVIZ.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

=======================
Errors in:
/Users/cmbarton/grass_dev/grass6/lib/ogsf

anthgradpc7:~/grass_dev/grass6/lib/ogsf cmbarton$ makegcc -I/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include -I/usr/local/grasslib/include -g -O2 -I/usr/local/grasslib/include -fno-common -DPACKAGE=\""grasslibs"\" -I/usr/local/grasslib/include -I/usr/X11R6/include -DPACKAGE=\""grasslibs"\" -I/usr/X11R6/include -I/usr/local/grasslib/include -I/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include \ -o OBJ.powerpc-apple-darwin8.7.0/GS2.o -c GS2.cIn file included from /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/gstypes.h:340, from GS2.c:30:/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:200: warning: parameter names (without types) in function declaration/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:201: error: parse error before 'GLuint'/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:458: error: parse error before 'gsd_set_font'/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:458: warning: data definition has no type or storage class

I haven't had this problem with a Tcltk aqua build. Maybe something to do with the next one, since the OpenGL headers won't be included without any OPENGL_* defined.

Errors in:
/Users/cmbarton/grass_dev/grass6/visualization/nviz

anthgradpc7:~/grass_dev/grass6/visualization/nviz cmbarton$ make
cd src ; make
gcc -I/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include -I/usr/local/grasslib/include -g -O2 -I/usr/local/grasslib/include -I/usr/local/grasslib/include -I/usr/local/grasslib/include -I/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include -I/usr/local/grasslib/include -I/usr/local/grasslib/include -DPACKAGE=\""grassmods"\" -I/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include \
        -o OBJ.powerpc-apple-darwin8.7.0/nvizAppInit.o -c nvizAppInit.c
In file included from togl.h:16,
                 from nvizAppInit.c:8:
togl_ws.h:14:3: error: #error None of OPENGL_X11, OPENGL_AQUA or OPENGL_WINDOWS defined

How did you configure GRASS for the Aqua Tcl/Tk? There is the new --with-opengl=aqua option which you should use in place of manually setting include and lib dirs (--with-opengl-includes=, --with-opengl-libs=). This will set the correct OPENGL_* define. Though it's supposed to default to OPENGL_X11.

I started writing an email for the list to describe the new options, but got distracted.

Did you build your own Tcl/Tk Aqua, or use my package, or the old Tcl/Tk Aqua, or Apple's from Tiger?

-----
William Kyngesburye <kyngchaos@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

William,

I had some other 'funny' performance, so I did a make clean and recompiled.
Now everything compiles fine...but nviz still doesn't work. Here is what
happens when I try to run it.

GRASS 6.1.cvs (spearfish60_test):~ > nviz elevation=elevation_dem
Loading Data
Update elev null mask
Loading Data
translating colors
Segmentation fault

I've tried running it using x11 and aqua tcl both, with and without -q, from
the GUI and the command line. Same result.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: William Kyngesburye <woklist@kyngchaos.com>
Reply-To: William Kyngesburye <kyngchaos@kyngchaos.com>
Date: Mon, 17 Jul 2006 14:27:17 -0500
To: <grass-dev@grass.itc.it>
Cc: Michael Barton <michael.barton@asu.edu>
Subject: Re: nviz broken on G5 iMac

On Jul 17, 2006, at 1:17 PM, Michael Barton wrote:

I just compiled a cvs version I updated a few minutes ago, and nviz
bombed. The rest of GRASS runs OK. I tried to start nviz just to
see what is happening. It started the OSX tcltk aqua and then crashed.

I¹m using a G5 iMac (not Intel) with OS X 10.4.7.

I¹m putting the compiler errors below. Problems both with OGSF and
NVIZ.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

=======================
Errors in:
/Users/cmbarton/grass_dev/grass6/lib/ogsf

anthgradpc7:~/grass_dev/grass6/lib/ogsf cmbarton$ makegcc -I/Users/
cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include -I/
usr/local/grasslib/include -g -O2 -I/usr/local/grasslib/include -
fno-common -DPACKAGE=\""grasslibs"\" -I/usr/local/grasslib/
include -I/usr/X11R6/include -DPACKAGE=\""grasslibs"\" -I/usr/
X11R6/include -I/usr/local/grasslib/include -I/Users/cmbarton/
grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include \ -o
OBJ.powerpc-apple-darwin8.7.0/GS2.o -c GS2.cIn file included from /
Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/
include/grass/gstypes.h:340, from GS2.c:30:/Users/
cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include/
grass/ogsf_proto.h:200: warning: parameter names (without types) in
function declaration/Users/cmbarton/grass_dev/grass6/dist.powerpc-
apple-darwin8.7.0/include/grass/ogsf_proto.h:201: error: parse
error before 'GLuint'/Users/cmbarton/grass_dev/grass6/dist.powerpc-
apple-darwin8.7.0/include/grass/ogsf_proto.h:458: error: parse
error before 'gsd_set_font'/Users/cmbarton/grass_dev/grass6/
dist.powerpc-apple-darwin8.7.0/include/grass/ogsf_proto.h:458:
warning: data definition has no type or storage class

I haven't had this problem with a Tcltk aqua build. Maybe something
to do with the next one, since the OpenGL headers won't be included
without any OPENGL_* defined.

Errors in:
/Users/cmbarton/grass_dev/grass6/visualization/nviz

anthgradpc7:~/grass_dev/grass6/visualization/nviz cmbarton$ make
cd src ; make
gcc -I/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-
darwin8.7.0/include -I/usr/local/grasslib/include -g -O2 -I/usr/
local/grasslib/include -I/usr/local/grasslib/include -I/usr/local/
grasslib/include -I/Users/cmbarton/grass_dev/grass6/dist.powerpc-
apple-darwin8.7.0/include -I/usr/local/grasslib/include -I/usr/
local/grasslib/include -DPACKAGE=\""grassmods"\" -I/Users/
cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/include \
        -o OBJ.powerpc-apple-darwin8.7.0/nvizAppInit.o -c
nvizAppInit.c
In file included from togl.h:16,
                 from nvizAppInit.c:8:
togl_ws.h:14:3: error: #error None of OPENGL_X11, OPENGL_AQUA or
OPENGL_WINDOWS defined

How did you configure GRASS for the Aqua Tcl/Tk? There is the new --
with-opengl=aqua option which you should use in place of manually
setting include and lib dirs (--with-opengl-includes=, --with-opengl-
libs=). This will set the correct OPENGL_* define. Though it's
supposed to default to OPENGL_X11.

I started writing an email for the list to describe the new options,
but got distracted.

Did you build your own Tcl/Tk Aqua, or use my package, or the old Tcl/
Tk Aqua, or Apple's from Tiger?

-----
William Kyngesburye <kyngchaos@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

On Jul 17, 2006, at 2:44 PM, Michael Barton wrote:

GRASS 6.1.cvs (spearfish60_test):~ > nviz elevation=elevation_dem
Loading Data
Update elev null mask
Loading Data
translating colors
Segmentation fault

That looks like the crash I get on Intel OSX. But NVIZ ran for me on PPC (and an iMac G5 at that).

There should be a crashlog for NVIZ that will give you the thread details. Compare that to my crash in bug #4768 to make sure it's the same crash.

Would it be possible for you to try my packages on your iMac (with your Tcl/Tk Aqua first, then mine if that doesn't work - it'll probably overwrite yours since it's a default framework install). If you built GRASS beta 1, my GRASS installer will overwrite that.

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

"Those people who most want to rule people are, ipso-facto, those least suited to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy

GRASS 6.1.cvs (spearfish60_test):~ > nviz elevation=elevation_dem
Loading Data
Update elev null mask
Loading Data
translating colors
Segmentation fault

tip:

to get more NVIZ debug info, edit

$GISBASE/etc/nviz2.2/scripts/nviz2.2_script

and near the top of the file, change DEBUG to "1"

#If set to 1 output debug statements
global DEBUG
set DEBUG 1

maybe it helps narrow down the problem.

Hamish