[GRASS5] compiling probs grass51

gcc -g -Wall -Wall -I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include
-I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include
-I/usr/X11R6/include/ -I/usr/include/gr -I/usr/local/include
-I/usr/include -I/usr/include/postgresql
-I/usr/include/postgresql/server -I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include \
        -o OBJ.i686-pc-linux-gnu/sql.o -c sql.c
bison -y -d -v yac.y
yac.y:42.26: invalid character: `,'
yac.y:42.39: invalid character: `,'
yac.y:42.47: invalid character: `,'
yac.y:42.56: invalid character: `,'
yac.y:42.64: invalid character: `,'
flex lex.l
gcc -g -Wall -Wall -I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include
-I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include
-I/usr/X11R6/include/ -I/usr/include/gr -I/usr/local/include
-I/usr/include -I/usr/include/postgresql
-I/usr/include/postgresql/server -I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include \
        -o OBJ.i686-pc-linux-gnu/lex.yy.o -c lex.yy.c
In file included from lex.l:25:
y.tab.h:78: warning: `AND' redefined
/var/tmp/grasscvs/grass51/include/sqlp.h:5: warning: this is the
location of the previous definition
Dear developers,

I would like to try the experimental grass51-tree from CVS, but ran into
trouble during compiling.

perhaps anybody can give me a hint what went wrong.

did a fresh cvs up -dP -r HEAD this morning and configured as follow on
debian unstable
CFLAGS="-g -Wall" ./configure --with-readline
--with-tcltk-includes=/usr/include/tcl8.3/
'--with-postgres-includes=/usr/include/postgresql
/usr/include/postgresql/server'
--with-freetype
--with-freetype-includes=/usr/X11R6/include/freetype2
--with-freetype-libs=/usr/X11R6/lib
--with-gd-libs=/usr/lib
--with-gd-includes=/usr/include
--with-png-libs=/usr/lib
--with-png-includes=/usr/include
--with-grass50=/var/tmp/grasscvs/grass
--with-dbm
--with-dbm-includes=/usr/include
--with-dbm-libs=/usr/lib
--with-gdal=/usr/local/bin/gdal-config

[errors]
gcc -g -Wall -Wall -I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include
-I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include
-I/usr/X11R6/include/ -I/usr/include/gr -I/usr/local/include
-I/usr/include -I/usr/include/postgresql
-I/usr/include/postgresql/server -I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include \
        -o OBJ.i686-pc-linux-gnu/sql.o -c sql.c
bison -y -d -v yac.y
yac.y:42.26: invalid character: `,'
yac.y:42.39: invalid character: `,'
yac.y:42.47: invalid character: `,'
yac.y:42.56: invalid character: `,'
yac.y:42.64: invalid character: `,'
flex lex.l
gcc -g -Wall -Wall -I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include
-I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include
-I/usr/X11R6/include/ -I/usr/include/gr -I/usr/local/include
-I/usr/include -I/usr/include/postgresql
-I/usr/include/postgresql/server -I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include \
        -o OBJ.i686-pc-linux-gnu/lex.yy.o -c lex.yy.c
In file included from lex.l:25:
y.tab.h:78: warning: `AND' redefined
/var/tmp/grasscvs/grass51/include/sqlp.h:5: warning: this is the
location of the previous definition
y.tab.h:79: warning: `OR' redefined
/var/tmp/grasscvs/grass51/include/sqlp.h:6: warning: this is the
location of the previous definition
y.tab.h:80: warning: `NOT' redefined
/var/tmp/grasscvs/grass51/include/sqlp.h:7: warning: this is the
location of the previous definition
In file included from lex.l:25:
y.tab.h:50: parse error before `2'
/var/tmp/grasscvs/grass51/include/sqlp.h:145: warning: `newNode'
declared `static' but never defined
make[3]: *** [OBJ.i686-pc-linux-gnu/lex.yy.o] Error 1
make[3]: Leaving directory `/var/tmp/grasscvs/grass51/lib/db/sqlp'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/var/tmp/grasscvs/grass51/lib/db'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/var/tmp/grasscvs/grass51/lib'
make: *** [default] Error 1
steph@kermit:/var/tmp/grasscvs/grass51 >

thanks for your help
Stephan

--
Stephan Holl

GnuPG Key-ID: 11946A09
ICQ# 117277975

Stephan Holl wrote:

I would like to try the experimental grass51-tree from CVS, but ran into
trouble during compiling.

perhaps anybody can give me a hint what went wrong.

bison -y -d -v yac.y
yac.y:42.26: invalid character: `,'
yac.y:42.39: invalid character: `,'
yac.y:42.47: invalid character: `,'
yac.y:42.56: invalid character: `,'
yac.y:42.64: invalid character: `,'

lib/db/sqlp/yac.y appears to be using non-standard syntax (recent
versions of bison appear to be less forgiving than older versions).

I suggest replacing the line:

  %type <node> y_comparison, y_condition, y_attr, y_attr2, y_name, y_cnam

with multiple lines:

  %type <node> y_comparison
  %type <node> y_condition
  %type <node> y_attr
  %type <node> y_attr2
  %type <node> y_name
  %type <node> y_cnam

[AFAIK, simply removing the commas should work, but one line per
symbol is more clear.]

In file included from lex.l:25:
y.tab.h:78: warning: `AND' redefined
/var/tmp/grasscvs/grass51/include/sqlp.h:5: warning: this is the
location of the previous definition
y.tab.h:79: warning: `OR' redefined
/var/tmp/grasscvs/grass51/include/sqlp.h:6: warning: this is the
location of the previous definition
y.tab.h:80: warning: `NOT' redefined
/var/tmp/grasscvs/grass51/include/sqlp.h:7: warning: this is the
location of the previous definition
In file included from lex.l:25:
y.tab.h:50: parse error before `2'

Try removing those lines from include/sqlp.h; if that causes other
things to break, then either yac.y/lex.l or sqlp.h (and code which
uses it) should use other names for AND/OR/NOT.

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

At Fri, 14 Feb 2003 11:58:15 +0000 Glynn Clements wrote:

Hello Glynn,

I suggest replacing the line:

  %type <node> y_comparison, y_condition, y_attr, y_attr2, y_name,
  y_cnam

with multiple lines:

  %type <node> y_comparison
  %type <node> y_condition
  %type <node> y_attr
  %type <node> y_attr2
  %type <node> y_name
  %type <node> y_cnam

done!
that worked so far.

Try removing those lines from include/sqlp.h; if that causes other
things to break, then either yac.y/lex.l or sqlp.h (and code which
uses it) should use other names for AND/OR/NOT.

After removing these lines no errors complainig about this things occur
anymore, but tcl.h and tk.h were not found by lib/form/open.c:

make[2]: Entering directory `/var/tmp/grasscvs/grass51/lib/form'
gcc -g -Wall -Wall -I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include
-I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include
-I/usr/X11R6/include/ -I/usr/include/gr -I/usr/local/include
-I/usr/include -I/usr/include/postgresql
-I/usr/include/postgresql/server -I/var/tmp/grasscvs/grass51/include
-I/var/tmp/grasscvs/grass51/dist.i686-pc-linux-gnu/include \
        -o OBJ.i686-pc-linux-gnu/open.o -c open.c
open.c:5: tcl.h: No such file or directory
open.c:6: tk.h: No such file or directory
make[2]: *** [OBJ.i686-pc-linux-gnu/open.o] Fehler 1
make[2]: Leaving directory `/var/tmp/grasscvs/grass51/lib/form'
make[1]: *** [subdirs] Fehler 1
make[1]: Leaving directory `/var/tmp/grasscvs/grass51/lib'

they both are located under /usr/include/tcl8.3/

During configure they are found in there....
How can I solve this errors ?!
thanks for any help

cheers
  Stephan

--
Stephan Holl

GnuPG Key-ID: 11946A09
ICQ# 117277975

Stephan Holl wrote:

> Try removing those lines from include/sqlp.h; if that causes other
> things to break, then either yac.y/lex.l or sqlp.h (and code which
> uses it) should use other names for AND/OR/NOT.

After removing these lines no errors complainig about this things occur
anymore, but tcl.h and tk.h were not found by lib/form/open.c:

lib/form/Makefile needs to have the following line added:

  EXTRA_CFLAGS = $(TCLINCDIR) $(TKINCDIR)

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