[GRASS-user] cvs install problem

Hi to all,
I have a problem with cvs installation, maybe is a silly one bua I'va
been struggling with this since yesterday...
I've downloaded, (I am on debian testing), run the ./configure (with
options) and than the make, but I get the following errors:

#####################################################################
GRASS GIS compilation log
-------------------------
Started compilation: mer giu 21 12:27:42 CEST 2006
--
Errors in:
/usr/local/cvs/grass6/lib/db/sqlp
/usr/local/cvs/grass6/db/drivers/dbf
/usr/local/cvs/grass6/db/drivers/postgres
/usr/local/cvs/grass6/db/drivers/ogr
/usr/local/cvs/grass6/raster/r.mapcalc
--
Finished compilation: mer giu 21 12:40:22 CEST 2006
(In case of errors please change into the directory with error and run
'make')
#####################################################################

I did what it is said, i.e. change into directory and run make and in
the dbf directory I get for example:
#####################################################################
/usr/bin/ld: cannot find -lgrass_sqlp
collect2: ld returned 1 exit status
make: *** [/usr/local/cvs/grass6/dist.i686-pc-linux-gnu/driver/db/dbf]
Error 1
#####################################################################

Can anyone tell what libraries am I missing??

cheers,
Francesco

Francesco Mirabella wrote:

I have a problem with cvs installation, maybe is a silly one bua I'va
been struggling with this since yesterday...
I've downloaded, (I am on debian testing), run the ./configure (with
options) and than the make, but I get the following errors:

#####################################################################
GRASS GIS compilation log
-------------------------
Started compilation: mer giu 21 12:27:42 CEST 2006
--
Errors in:
/usr/local/cvs/grass6/lib/db/sqlp
/usr/local/cvs/grass6/db/drivers/dbf
/usr/local/cvs/grass6/db/drivers/postgres
/usr/local/cvs/grass6/db/drivers/ogr
/usr/local/cvs/grass6/raster/r.mapcalc
--
Finished compilation: mer giu 21 12:40:22 CEST 2006
(In case of errors please change into the directory with error and run
'make')
#####################################################################

I did what it is said, i.e. change into directory and run make and in
the dbf directory I get for example:
#####################################################################
/usr/bin/ld: cannot find -lgrass_sqlp
collect2: ld returned 1 exit status
make: *** [/usr/local/cvs/grass6/dist.i686-pc-linux-gnu/driver/db/dbf]

Given the previous error building the sqlp library (lib/db/sqlp), the
fact that it can't find the sqlp library isn't particularly
surprising.

The error messages from trying to build lib/db/sqlp would be more
useful.

--
Glynn Clements <glynn@gclements.plus.com>

Ciao Markus and Glynn,
many thanks for your reply, I tried to run make into the /sqlp and this
is what I get (only part):

#####################################################################
btyaccpa.ske:795: error: request for member 'ss' in something not a
structure or union
btyaccpa.ske:796: error: request for member 'ss' in something not a
structure or union
btyaccpa.ske:797: error: 'YYSTYPE' undeclared (first use in this
function)
btyaccpa.ske:797: error: 'tvs' undeclared (first use in this function)
btyaccpa.ske:797: error: request for member 'vs' in something not a
structure or union
btyaccpa.ske:798: error: request for member 'ps' in something not a
structure or union
btyaccpa.ske:799: error: request for member 'ss' in something not a
structure or union
btyaccpa.ske:799: error: 'new' undeclared (first use in this function)
btyaccpa.ske:799: error: syntax error before 'Yshort'
btyaccpa.ske:800: error: request for member 'vs' in something not a
structure or union
btyaccpa.ske:800: error: syntax error before 'YYSTYPE'
btyaccpa.ske:801: error: request for member 'ps' in something not a
structure or union
btyaccpa.ske:801: error: syntax error before 'int'
btyaccpa.ske:802: error: request for member 'ss' in something not a
structure or union
btyaccpa.ske:802: error: request for member 'stacksize' in something not
a structure or union
btyaccpa.ske:803: error: request for member 'vs' in something not a
structure or union
btyaccpa.ske:803: error: request for member 'stacksize' in something not
a structure or union
btyaccpa.ske:804: error: request for member 'ps' in something not a
structure or union
btyaccpa.ske:804: error: request for member 'stacksize' in something not
a structure or union
btyaccpa.ske:805: error: request for member 'stacksize' in something not
a structure or union
btyaccpa.ske:806: error: 'delete' undeclared (first use in this
function)
btyaccpa.ske:806: error: syntax error before ']' token
btyaccpa.ske:807: error: syntax error before ']' token
btyaccpa.ske:808: error: syntax error before ']' token
btyaccpa.ske:809: error: request for member 'ssp' in something not a
structure or union
btyaccpa.ske:809: error: request for member 'ss' in something not a
structure or union
btyaccpa.ske:810: error: request for member 'vsp' in something not a
structure or union
btyaccpa.ske:810: error: request for member 'vs' in something not a
structure or union
btyaccpa.ske:811: error: request for member 'psp' in something not a
structure or union
btyaccpa.ske:811: error: request for member 'ps' in something not a
structure or union
btyaccpa.ske: At top level:
btyaccpa.ske:814: error: syntax error before '*' token
btyaccpa.ske:814: warning: return type defaults to 'int'
btyaccpa.ske: In function 'YYNewState':
btyaccpa.ske:815: error: 'yyparsestate' undeclared (first use in this
function)
btyaccpa.ske:815: error: 'p' undeclared (first use in this function)
btyaccpa.ske:815: error: 'new' undeclared (first use in this function)
btyaccpa.ske:815: error: syntax error before 'yyparsestate'
btyaccpa.ske:817: error: syntax error before 'Yshort'
btyaccpa.ske:818: error: syntax error before 'YYSTYPE'
btyaccpa.ske:819: error: syntax error before 'int'
btyaccpa.ske:820: error: 'YYSTYPE' undeclared (first use in this
function)
btyaccpa.ske:823: warning: control reaches end of non-void function
btyaccpa.ske: At top level:
btyaccpa.ske:825: error: syntax error before '*' token
btyaccpa.ske: In function 'YYFreeState':
btyaccpa.ske:826: error: 'delete' undeclared (first use in this
function)
btyaccpa.ske:826: error: syntax error before ']' token
btyaccpa.ske:827: error: syntax error before ']' token
btyaccpa.ske:828: error: syntax error before ']' token
make: *** [OBJ.i686-pc-linux-gnu/y.tab.o] Error 1
francesco@terra11:/usr/local/cvs/grass6/lib/db/sqlp$
#####################################################################

Can you help??

cheers,
Francesco

On Thu, Jun 22, 2006 at 02:51:57PM +0100, Glynn Clements wrote:

Francesco Mirabella wrote:

> I have a problem with cvs installation, maybe is a silly one bua I'va
> been struggling with this since yesterday...
> I've downloaded, (I am on debian testing), run the ./configure (with
> options) and than the make, but I get the following errors:
>
> #####################################################################
> GRASS GIS compilation log
> -------------------------
> Started compilation: mer giu 21 12:27:42 CEST 2006
> --
> Errors in:
> /usr/local/cvs/grass6/lib/db/sqlp
> /usr/local/cvs/grass6/db/drivers/dbf
> /usr/local/cvs/grass6/db/drivers/postgres
> /usr/local/cvs/grass6/db/drivers/ogr
> /usr/local/cvs/grass6/raster/r.mapcalc
> --
> Finished compilation: mer giu 21 12:40:22 CEST 2006
> (In case of errors please change into the directory with error and run
> 'make')
> #####################################################################
>
>
> I did what it is said, i.e. change into directory and run make and in
> the dbf directory I get for example:
> #####################################################################
> /usr/bin/ld: cannot find -lgrass_sqlp
> collect2: ld returned 1 exit status
> make: *** [/usr/local/cvs/grass6/dist.i686-pc-linux-gnu/driver/db/dbf]

Given the previous error building the sqlp library (lib/db/sqlp), the
fact that it can't find the sqlp library isn't particularly
surprising.

The error messages from trying to build lib/db/sqlp would be more
useful.

--
Glynn Clements <glynn@gclements.plus.com>

--
**********************************************
Francesco Mirabella,
Geologia Strutturale e Geofisica
Universita' di Perugia,
Dipartimento di Scienze della Terra,
Piazza Universita' 1, 06100 Perugia (Italy)
tel: ++39.(0)75.586.7182
fax: ++39.(0)75.586.7167
web: http://www.unipg.it/~mirabell/
**********************************************

On Thu, Jun 22, 2006 at 04:13:48PM +0200, Francesco Mirabella wrote:

Ciao Markus and Glynn,
many thanks for your reply, I tried to run make into the /sqlp and this
is what I get (only part):

#####################################################################
btyaccpa.ske:795: error: request for member 'ss' in something not a
structure or union

...

francesco@terra11:/usr/local/cvs/grass6/lib/db/sqlp$
#####################################################################

Can you help??

It seems that you have a unwanted file in that directory:

ls lib/db/sqlp/
alloc.c Makefile test
CVS OBJ.x86_64-unknown-linux-gnu yac.y
description.html print.c y.output
lex.l README y.tab.c
lex.yy.c sql.c y.tab.h

-> btyaccpa.ske isn't there.
Maybe it's generated somehow on your machine, but try to remove
it and compile again.

My favourite search engine tells me that it is something like
"BtYacc: BackTracking Yacc"

Maybe Glynn has more insights how/why such file appears.
I have never seen it.

Markus

On Thu, Jun 22, 2006 at 02:51:57PM +0100, Glynn Clements wrote:
>
> Francesco Mirabella wrote:
>
> > I have a problem with cvs installation, maybe is a silly one bua I'va
> > been struggling with this since yesterday...
> > I've downloaded, (I am on debian testing), run the ./configure (with
> > options) and than the make, but I get the following errors:
> >
> > #####################################################################
> > GRASS GIS compilation log
> > -------------------------
> > Started compilation: mer giu 21 12:27:42 CEST 2006
> > --
> > Errors in:
> > /usr/local/cvs/grass6/lib/db/sqlp
> > /usr/local/cvs/grass6/db/drivers/dbf
> > /usr/local/cvs/grass6/db/drivers/postgres
> > /usr/local/cvs/grass6/db/drivers/ogr
> > /usr/local/cvs/grass6/raster/r.mapcalc
> > --
> > Finished compilation: mer giu 21 12:40:22 CEST 2006
> > (In case of errors please change into the directory with error and run
> > 'make')
> > #####################################################################
> >
> >
> > I did what it is said, i.e. change into directory and run make and in
> > the dbf directory I get for example:
> > #####################################################################
> > /usr/bin/ld: cannot find -lgrass_sqlp
> > collect2: ld returned 1 exit status
> > make: *** [/usr/local/cvs/grass6/dist.i686-pc-linux-gnu/driver/db/dbf]
>
> Given the previous error building the sqlp library (lib/db/sqlp), the
> fact that it can't find the sqlp library isn't particularly
> surprising.
>
> The error messages from trying to build lib/db/sqlp would be more
> useful.
>
> --
> Glynn Clements <glynn@gclements.plus.com>

--
**********************************************
Francesco Mirabella,
Geologia Strutturale e Geofisica
Universita' di Perugia,
Dipartimento di Scienze della Terra,
Piazza Universita' 1, 06100 Perugia (Italy)
tel: ++39.(0)75.586.7182
fax: ++39.(0)75.586.7167
web: http://www.unipg.it/~mirabell/
**********************************************

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

Markus Neteler wrote:

> Ciao Markus and Glynn,
> many thanks for your reply, I tried to run make into the /sqlp and this
> is what I get (only part):
>
> #####################################################################
> btyaccpa.ske:795: error: request for member 'ss' in something not a
> structure or union
...
> francesco@terra11:/usr/local/cvs/grass6/lib/db/sqlp$
> #####################################################################
>
> Can you help??

It seems that you have a unwanted file in that directory:

ls lib/db/sqlp/
alloc.c Makefile test
CVS OBJ.x86_64-unknown-linux-gnu yac.y
description.html print.c y.output
lex.l README y.tab.c
lex.yy.c sql.c y.tab.h

-> btyaccpa.ske isn't there.
Maybe it's generated somehow on your machine, but try to remove
it and compile again.

My favourite search engine tells me that it is something like
"BtYacc: BackTracking Yacc"

Maybe Glynn has more insights how/why such file appears.
I have never seen it.

btyaccpa.ske is the skeleton (template) used to construct y.tab.c. The
generated y.tab.c will contain #line directives referring to
btyaccpa.ske, so this is the file which the C compiler reports in any
error messages, although the compiler is actually compiling y.tab.c.

The btyaccpa.ske file itself probably won't exist anywhere on the
user's system.

The main problem with BtYacc (a derivative of Berkeley yacc) is that
it generates C++ code, which will only work with a C++ compiler. The
cause of the specific error message cited above is that a structure is
declared using C++ syntax:

  struct yyparsestate {
  ...
    Yshort *ss; // state stack base
  ...
  };

and then a parameter is declared with type "yyparsestate *yyps"
(rather than "struct yyparsestate *yyps" which would be required in
C).

In short, BtYacc isn't suitable as a yacc implementation, but it
appears to be installed as "yacc". The BtYacc Makefile creates the
program with the name "btyacc", which wouldn't be a problem. Maybe the
OS vendor has decided to install the program (or a symlink to it) as
"yacc"?

The easiest solution is to install either bison or byacc (Berkeley
yacc). The configure macro AC_PROG_YACC first checks for bison, then
byacc. Only if neither bison nor byacc are found will it set YACC to
yacc (the macro doesn't check whether yacc actually exists; we do that
manually). So long as either bison or byacc are present, btyacc
shouldn't be used, and thus shouldn't cause problems.

--
Glynn Clements <glynn@gclements.plus.com>