[GRASS-user] cvs install problem
Glynn Clements
glynn at gclements.plus.com
Thu Jun 22 11:46:01 EDT 2006
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 at 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 at gclements.plus.com>
More information about the grass-user
mailing list