[GRASSLIST:2065] tk8.5 troubles with CVS build

Has anyone tried using tk8.5 when building 5.7? I get the following build error:

gcc -I/usr/local/src/grass57_exp_2003_11_22/include -I/usr/local/src/grass57_exp_2003_11_22/dist.powerpc-apple-darwin7.0.0/include -I/usr/X11R6/include -I/usr/local/include -I/sw/include -faltivec -lcc_dynamic -framework vecLib -Wall -Wconversion -Wno-implicit-int -I/usr/X11R6/include -I/usr/local/include -I/sw/include -I/usr/local/src/grass57_exp_2003_11_22/include -I/usr/local/src/grass57_exp_2003_11_22/dist.powerpc-apple-darwin7.0.0/include -D_NO_PROTO -D__STDC__ -I/usr/local/include -I/usr/local/include -DUSE_GDAL_H -I/usr/local/src/grass57_exp_2003_11_22/include -I/usr/local/src/grass57_exp_2003_11_22/dist.powerpc-apple-darwin7.0.0/include \
         -o OBJ.powerpc-apple-darwin7.0.0/nvizAppInit.o -c nvizAppInit.c
<command line>:9:1: warning: "__STDC__" redefined
In file included from nvizAppInit.c:9:
interface.h:266: error: conflicting types for `Tk_SetAppName'
/usr/local/include/tkDecls.h:573: error: previous declaration of `Tk_SetAppName'
nvizAppInit.c:43: warning: `RunScripts' defined but not used
make[3]: *** [OBJ.powerpc-apple-darwin7.0.0/nvizAppInit.o] Error 1
make[2]: *** [nvwish] Error 2
make[1]: *** [subdirs] Error 1
make: *** [default] Error 1

C.

--
Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g )
Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia

Christopher Fonnesbeck wrote:

Has anyone tried using tk8.5 when building 5.7?

I hadn't realised that Tk 8.5 existed until now.

I get the following
build error:

interface.h:266: error: conflicting types for `Tk_SetAppName'
/usr/local/include/tkDecls.h:573: error: previous declaration of
`Tk_SetAppName'

Right. That's because of this:

#if TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4
    CONST char *Tk_SetAppName(Tk_Window, CONST char *);
#else
    char *Tk_SetAppName(Tk_Window, char *);
#endif

It should probably be:

#if TK_MAJOR_VERSION==8 && TK_MINOR_VERSION>=4 || TK_MAJOR_VERSION>8
    CONST char *Tk_SetAppName(Tk_Window, CONST char *);
#else
    char *Tk_SetAppName(Tk_Window, char *);
#endif

I.e. it should apply to Tk 8.4 and upwards, not just 8.4.

However, that will not be the only problem; someone will also need to
add tkInt8.5.h and tkIntDecls8.5.h, and modify the top of togl.c
accordingly.

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

On Tue, Dec 16, 2003 at 03:26:26PM -0500, Christopher Fonnesbeck wrote:

Has anyone tried using tk8.5 when building 5.7? I get the following
build error:

gcc -I/usr/local/src/grass57_exp_2003_11_22/include
-I/usr/local/src/grass57_exp_2003_11_22/dist.powerpc-apple-darwin7.0.0/
include -I/usr/X11R6/include -I/usr/local/include -I/sw/include
-faltivec -lcc_dynamic -framework vecLib -Wall -Wconversion
-Wno-implicit-int -I/usr/X11R6/include -I/usr/local/include
-I/sw/include -I/usr/local/src/grass57_exp_2003_11_22/include
-I/usr/local/src/grass57_exp_2003_11_22/dist.powerpc-apple-darwin7.0.0/
include -D_NO_PROTO -D__STDC__ -I/usr/local/include
-I/usr/local/include -DUSE_GDAL_H
-I/usr/local/src/grass57_exp_2003_11_22/include
-I/usr/local/src/grass57_exp_2003_11_22/dist.powerpc-apple-darwin7.0.0/
include \
         -o OBJ.powerpc-apple-darwin7.0.0/nvizAppInit.o -c nvizAppInit.c
<command line>:9:1: warning: "__STDC__" redefined
In file included from nvizAppInit.c:9:
interface.h:266: error: conflicting types for `Tk_SetAppName'
/usr/local/include/tkDecls.h:573: error: previous declaration of
`Tk_SetAppName'
nvizAppInit.c:43: warning: `RunScripts' defined but not used
make[3]: *** [OBJ.powerpc-apple-darwin7.0.0/nvizAppInit.o] Error 1
make[2]: *** [nvwish] Error 2
make[1]: *** [subdirs] Error 1
make: *** [default] Error 1

Should be easy to fix. In interface.h (visualization/nviz/src/):

#if TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4

try to change to
#if TK_MAJOR_VERSION==8 && TK_MINOR_VERSION>=4

Please report if it works.

Markus

--
Markus Neteler <neteler@itc.it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

> Has anyone tried using tk8.5 when building 5.7?

I hadn't realised that Tk 8.5 existed until now.

I'm not really sure it does:

www.tcltk.com

Latest Releases
Tcl/Tk 8.4.5 Nov 24, 2003

Unless Chris is using a development version.

?
Hamish

It should probably be:

#if TK_MAJOR_VERSION==8 && TK_MINOR_VERSION>=4 || TK_MAJOR_VERSION>8
    CONST char *Tk_SetAppName(Tk_Window, CONST char *);
#else
    char *Tk_SetAppName(Tk_Window, char *);
#endif

On Dec 17, 2003, at 5:36 PM, Hamish wrote:

Has anyone tried using tk8.5 when building 5.7?

I hadn't realised that Tk 8.5 existed until now.

I'm not really sure it does:

www.tcltk.com

Latest Releases
Tcl/Tk 8.4.5 Nov 24, 2003

Unless Chris is using a development version.

I was using the development version, but it should be released soon. I haven't had a chance to try the suggested fix; I had to drop back to 8.4 to get some work done. I will try it soon.

Thanks!
C.

--
Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g )
Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia