[GRASSLIST:402] 5.0.2 & snpsh20030614 Compilation errors

Hello,
I'm trying to compile the 5.0.2 version (finally...), along with the CVS
version (snapshot 2003_06_14).

The "src.contrib/GMSL/g3d" module compiles without problem in v5.0.2 , but the
snaphsot version gives me this:

make[1]: Entering directory
`/opt/src/grass5/grass50_exp_2003_06_14/src.contrib/GMSL/NVIZ2.2/src'
gcc -I/opt/src/grass5/grass50_exp_2003_06_14/src/include -g -O2
-I/usr/X11R6/include
-I/opt/src/grass5/grass50_exp_2003_06_14/src/libes/ogsf -D_NO_PROTO
-D__STDC__ -c nvizAppInit.c -o OBJ.i686-pc-linux-gnu/nvizAppInit.o
In file included from nvizAppInit.c:9:
interface.h:259: conflicting types for `Tk_SetAppName'
/usr/local/include/tkDecls.h:568: previous declaration of `Tk_SetAppName'
make[1]: *** [OBJ.i686-pc-linux-gnu/nvizAppInit.o] Error 1
make[1]: Leaving directory
`/opt/src/grass5/grass50_exp_2003_06_14/src.contrib/GMSL/NVIZ2.2/src'
make: *** [nvwish] Error 2

************************************************************************

Both v5.0.2. and snapshot fail to compile NVIZ2.2, and they both give me the
same error (FYI, I run tcltk8.4):

make[1]: Entering directory
`/opt/src/grass5/grass50_exp_2003_06_14/src.contrib/GMSL/NVIZ2.2/src'
gcc -I/opt/src/grass5/grass50_exp_2003_06_14/src/include -g -O2
-I/usr/X11R6/include
-I/opt/src/grass5/grass50_exp_2003_06_14/src/libes/ogsf -D_NO_PROTO
-D__STDC__ -c nvizAppInit.c -o OBJ.i686-pc-linux-gnu/nvizAppInit.o
In file included from nvizAppInit.c:9:
interface.h:259: conflicting types for `Tk_SetAppName'
/usr/local/include/tkDecls.h:568: previous declaration of `Tk_SetAppName'
make[1]: *** [OBJ.i686-pc-linux-gnu/nvizAppInit.o] Error 1
make[1]: Leaving directory
`/opt/src/grass5/grass50_exp_2003_06_14/src.contrib/GMSL/NVIZ2.2/src'
make: *** [nvwish] Error 2

************************************************************************

d.text.freetype also fails to compile (on both version):
#################################################################
/opt/src/grass5/grass50_exp_2003_06_14/src/display/d.text.freetype
  make -f OBJ.i686-pc-linux-gnu/make.rules

gcc -I/opt/src/grass5/grass50_exp_2003_06_14/src/include -g -O2
-I/usr/local/include/freetype2/freetype -c main.c -o
OBJ.i686-pc-linux-gnu/main.o
main.c:75: parse error before `library'
main.c:76: parse error before `face'
main.c:78: parse error before `face'
main.c:80: parse error before `*'
main.c:81: parse error before `FT_Face'
main.c:83: parse error before `FT_Face'
main.c: In function `main':
main.c:118: `FT_Library' undeclared (first use in this function)
main.c:118: (Each undeclared identifier is reported only once
main.c:118: for each function it appears in.)
main.c:118: parse error before `library'
main.c:119: `FT_Face' undeclared (first use in this function)
main.c:120: `FT_Vector' undeclared (first use in this function)
main.c:299: `face' undeclared (first use in this function)
main.c:299: `library' undeclared (first use in this function)
main.c:346: `pen' undeclared (first use in this function)
main.c: In function `convert_text':
main.c:726: warning: passing arg 2 of `iconv' from incompatible pointer type
main.c: At top level:
main.c:815: parse error before `library'
main.c: In function `set_font':
main.c:817: `face' undeclared (first use in this function)
main.c:819: `library' undeclared (first use in this function)
main.c:819: `path' undeclared (first use in this function)
main.c: At top level:
main.c:826: parse error before `face'
main.c: In function `get_dimension':
main.c:829: `FT_Matrix' undeclared (first use in this function)
main.c:829: parse error before `matrix'
main.c:830: `FT_Vector' undeclared (first use in this function)
main.c:832: `matrix' undeclared (first use in this function)
main.c:834: `pen' undeclared (first use in this function)
main.c:837: `l' undeclared (first use in this function)
main.c:839: `out' undeclared (first use in this function)
main.c:841: `face' undeclared (first use in this function)
main.c:845: `FT_LOAD_DEFAULT' undeclared (first use in this function)
main.c:847: `ft_render_mode_mono' undeclared (first use in this function)
main.c:878: `dim' undeclared (first use in this function)
main.c: At top level:
main.c:885: parse error before `face'
main.c: In function `get_ll_coordinates':
main.c:888: `FT_Vector' undeclared (first use in this function)
main.c:888: parse error before `dim'
main.c:890: `align' undeclared (first use in this function)
main.c:892: `face' undeclared (first use in this function)
main.c:892: `out' undeclared (first use in this function)
main.c:892: `l' undeclared (first use in this function)
main.c:892: `dim' undeclared (first use in this function)
main.c:899: `pen' undeclared (first use in this function)
main.c:899: `rotation' undeclared (first use in this function)
main.c:897: warning: unreachable code at beginning of switch statement
main.c:911: warning: unreachable code at beginning of switch statement
main.c: At top level:
main.c:930: parse error before `*'
main.c: In function `set_matrix':
main.c:932: `matrix' undeclared (first use in this function)
main.c:932: `FT_Fixed' undeclared (first use in this function)
main.c:932: `rotation' undeclared (first use in this function)
main.c: At top level:
main.c:941: parse error before `FT_Face'
main.c: In function `draw_character':
main.c:948: `face' undeclared (first use in this function)
main.c:948: `matrix' undeclared (first use in this function)
main.c:948: `pen' undeclared (first use in this function)
main.c:950: `ch' undeclared (first use in this function)
main.c:952: `FT_LOAD_DEFAULT' undeclared (first use in this function)
main.c:954: `ft_render_mode_mono' undeclared (first use in this function)
main.c:966: `win' undeclared (first use in this function)
main.c:979: `color' undeclared (first use in this function)
main.c: At top level:
main.c:1019: parse error before `FT_Face'
main.c: In function `draw_text':
main.c:1023: `FT_Matrix' undeclared (first use in this function)
main.c:1023: parse error before `matrix'
main.c:1025: `matrix' undeclared (first use in this function)
main.c:1025: `rotation' undeclared (first use in this function)
main.c:1027: `l' undeclared (first use in this function)
main.c:1029: `out' undeclared (first use in this function)
main.c:1030: `win' undeclared (first use in this function)
main.c:1030: `face' undeclared (first use in this function)
main.c:1030: `pen' undeclared (first use in this function)
main.c:1030: `color' undeclared (first use in this function)
make: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1

************************************************************************

And at last, d.labels

/opt/src/grass5/grass50_exp_2003_06_14/src/display/d.labels
  make -f OBJ.i686-pc-linux-gnu/make.rules

gcc -L/opt/src/grass5/grass50_exp_2003_06_14/src/libes/LIB.i686-pc-linux-gnu
-o
/opt/src/grass5/grass50_exp_2003_06_14/dist.i686-pc-linux-gnu/etc/bin/inter/d.labels
OBJ.i686-pc-linux-gnu/main.o OBJ.i686-pc-linux-gnu/get_loc.o
OBJ.i686-pc-linux-gnu/opencell.o OBJ.i686-pc-linux-gnu/display.o
OBJ.i686-pc-linux-gnu/in_window.o OBJ.i686-pc-linux-gnu/check_resp.o
OBJ.i686-pc-linux-gnu/show.o OBJ.i686-pc-linux-gnu/where.o
OBJ.i686-pc-linux-gnu/modify.o OBJ.i686-pc-linux-gnu/output.o
OBJ.i686-pc-linux-gnu/gather.o OBJ.i686-pc-linux-gnu/proc_new.o
OBJ.i686-pc-linux-gnu/proc_old.o OBJ.i686-pc-linux-gnu/setup.o
OBJ.i686-pc-linux-gnu/show_a_label.o OBJ.i686-pc-linux-gnu/do_label.o
OBJ.i686-pc-linux-gnu/update.o -lvask -ldisplay -lraster -lgis -lncurses
-lbsd-compat -lm -lz
OBJ.i686-pc-linux-gnu/main.o: In function `main':
/opt/src/grass5/grass50_exp_2003_06_14/src/display/d.labels/main.c:29:
undefined reference to `atexit'
collect2: ld returned 1 exit status
make: ***
[/opt/src/grass5/grass50_exp_2003_06_14/dist.i686-pc-linux-gnu/etc/bin/inter/d.labels]
Error 1

************************************************************************

Any ideas/comments welcomed,
Thanks in advance

--
------------------------------
Soil and Water Laboratory
Biological and Environmental Engineering Department
Cornell University
Riley-Robb Hall
ITHACA, NY 14853 - USA

I'm trying to compile the 5.0.2 version (finally...), along with the
CVS version (snapshot 2003_06_14).

a couple of points -

- I tried the 5.0 CVS version of NVIZ the other day and legends etc don't
seem to be working in there yet. In the past I've used the Gimp to paste
in labels and a legend from the normal grass monitor if that helps.

- NVIZ is slightly broken for Tcl 8.4 in 5.0.2; use 8.3 or get an updated
'src.contrib/GMSL/NVIZ2.2/src/interface.h'.. search the mailing list for details.

- it is helpful to know what platform/distribution running for
broken compiles.

Hamish

- I tried the 5.0 CVS version of NVIZ the other day and legends etc don't
seem to be working in there yet. In the past I've used the Gimp to paste
in labels and a legend from the normal grass monitor if that helps.

Well, too bad, guess we'll have to wait, then.

- it is helpful to know what platform/distribution running for
broken compiles.

Oops, my bad. So, SuSE 7.1 on a i386. Seems that I had a problem of
consistency with my "glibc", once fixed it solved the "d.labels" problem I
had (bad refernce to atexit). I've been able to install tcl/tk 8.3 in a
different directory than 8.4, and NVIZ eventually compiled without pb, when
pointed to 8.3. I'll have to keep that in my mind.

So, now I just have two compilation errors (still with
grass50_exp_2003_06_14):

*****
g3d failed to compile with the "./configure:make:make install" dance. Another
try with gmake5 in src.contrib/GMSL/g3d gives me this:

make[3]: Entering directory
`/opt/src/grass5/grass50_exp_2003_06_14/src.contrib/GMSL/g3d/src3d/raster/r3.showdspf.openGL'
gcc -I/opt/src/grass5/grass50_exp_2003_06_14/src/include -g -O2
-I/opt/src/grass5/grass50_exp_2003_06_14/src/libes/dspf
-I/opt/src/grass5/grass50_exp_2003_06_14/src/libes/ogsf
-I/usr/X11R6/include -c new_init_graphics.c -o
OBJ.i686-pc-linux-gnu/new_init_graphics.o
new_init_graphics.c:16: Xm/Xm.h: No such file or directory
new_init_graphics.c:17: Xm/Form.h: No such file or directory
In file included from /usr/X11R6/include/GL/GLwMDrawA.h:47,
                 from new_init_graphics.c:19:
/usr/X11R6/include/GL/GLwDrawA.h:49: Xm/Xm.h: No such file or directory
In file included from /usr/X11R6/include/GL/GLwMDrawA.h:47,
                 from new_init_graphics.c:19:
/usr/X11R6/include/GL/GLwDrawA.h:165: #error "Sorry, unknown Motif version."
new_init_graphics.c:407: Xm/PushB.h: No such file or directory
new_init_graphics.c:408: Xm/RowColumn.h: No such file or directory
new_init_graphics.c:409: Xm/Label.h: No such file or directory
new_init_graphics.c:410: Xm/ToggleB.h: No such file or directory
new_init_graphics.c:411: Xm/Frame.h: No such file or directory
new_init_graphics.c:412: Xm/SeparatoG.h: No such file or directory
make[3]: *** [OBJ.i686-pc-linux-gnu/new_init_graphics.o] Error 1
make[3]: Leaving directory
`/opt/src/grass5/grass50_exp_2003_06_14/src.contrib/GMSL/g3d/src3d/raster/r3.showdspf.openGL'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/opt/src/grass5/grass50_exp_2003_06_14/src.contrib/GMSL/g3d/src3d/raster'
make[1]: *** [all] Error 1
make[1]: Leaving directory
`/opt/src/grass5/grass50_exp_2003_06_14/src.contrib/GMSL/g3d/src3d'
make: *** [all] Error 2

[FYI, the config is:
  C compiler: gcc -g -O2
  C++ compiler:
  FORTRAN compiler: g77
  X11 support: yes
  DBM support: no
  GD support: yes
  OpenGL(R) support: yes
  SGI IRIS GL support: no
  Motif support: no
  FreeType support: yes
  GLw support: no
  NLS support: no
  Readline support: no
  C++ support: no
  External PROJ.4 support: no]

*******

d.text.freetype also fails to compile. A gmake5 gives this :

################################################################
/opt/src/grass5/grass50_exp_2003_06_14/src/display/d.text.freetype
  make -f OBJ.i686-pc-linux-gnu/make.rules

gcc -I/opt/src/grass5/grass50_exp_2003_06_14/src/include -g -O2
-I/usr/local/include/freetype2/freetype -c main.c -o
OBJ.i686-pc-linux-gnu/main.o
main.c:75: parse error before `library'
main.c:76: parse error before `face'
main.c:78: parse error before `face'
main.c:80: parse error before `*'
main.c:81: parse error before `FT_Face'
main.c:83: parse error before `FT_Face'
main.c: In function `main':
main.c:118: `FT_Library' undeclared (first use in this function)
main.c:118: (Each undeclared identifier is reported only once
main.c:118: for each function it appears in.)
main.c:118: parse error before `library'
main.c:119: `FT_Face' undeclared (first use in this function)
main.c:120: `FT_Vector' undeclared (first use in this function)
main.c:299: `face' undeclared (first use in this function)
main.c:299: `library' undeclared (first use in this function)
main.c:346: `pen' undeclared (first use in this function)
main.c: In function `convert_text':
main.c:726: warning: passing arg 2 of `iconv' from incompatible pointer type
main.c: At top level:

And some other errors (pretty much the same) in the following command.

main.c:815: parse error before `library'
main.c: In function `set_font':
main.c: In function `get_dimension':
main.c: In function `get_ll_coordinates':
main.c: In function `set_matrix':
main.c: In function `draw_character':
main.c: In function `draw_text':
make: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1

*************

Sorry for this huge message.
Any suggestion welcomed.
Thanks for all

P.

Soil & Water Lab. wrote:

So, now I just have two compilation errors (still with
grass50_exp_2003_06_14):

*****
g3d failed to compile with the "./configure:make:make install" dance. Another
try with gmake5 in src.contrib/GMSL/g3d gives me this:

make[3]: Entering directory
`/opt/src/grass5/grass50_exp_2003_06_14/src.contrib/GMSL/g3d/src3d/raster/r3.showdspf.openGL'

[snip]

  Motif support: no

  GLw support: no

You have to use both --with-motif and --with-glw to get
r3.showdspf.openGL to compile. Of course, you have to actually have
Motif and the Motif version of GLw[1], otherwise configure will fail.

[1] Furthermore, the GLw library has to be compatible with both your
Motif library and your OpenGL libraries (libGL and libGLU). There are
enough common permutations of Motif, OpenGL, GLU and GLw that it's
quite common to find that they aren't all compatible with each other.

d.text.freetype also fails to compile. A gmake5 gives this :

/opt/src/grass5/grass50_exp_2003_06_14/src/display/d.text.freetype
  make -f OBJ.i686-pc-linux-gnu/make.rules

gcc -I/opt/src/grass5/grass50_exp_2003_06_14/src/include -g -O2
-I/usr/local/include/freetype2/freetype -c main.c -o

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is almost certainly incorrect; it should probably be just
/usr/local/include/freetype2 (without the last directory).

d.text.freetype looks for <freetype/freetype.h>; unless you actually
have /usr/local/include/freetype2/freetype/freetype/freetype.h (with
the extra "freetype" directory), it will probably end up using
/usr/include/freetype/freetype.h, which is probably FreeType version
1, which won't work.

Probable solution:

  ./configure --with-freetype-includes=/usr/local/include/freetype2 ...

--
Glynn Clements <glynn.clements@virgin.net>

On Mon, 16 Jun 2003, Soil & Water Lab. wrote:

> - I tried the 5.0 CVS version of NVIZ the other day and legends etc don't
> seem to be working in there yet. In the past I've used the Gimp to paste
> in labels and a legend from the normal grass monitor if that helps.

Well, too bad, guess we'll have to wait, then.

There is an updated version of NVIZ floating around that Bob Covill has
been working on; he hasn't committed it to CVS but the legends and labels
and several other things are working well in it; I have a copy of a
snapshot of it if you would like to try. It's about 1.3MB though.

Paul