[GRASS-dev] installing v.mapcalc fails

Glynn Clements glynn at gclements.plus.com
Thu Oct 1 03:38:46 PDT 2015


Moritz Lennert wrote:

> > yylex.c:9:27: fatal error: v.mapcalc.tab.h: No such file or directory
> >
> >    #include "v.mapcalc.tab.h"
> >
> >                              ^
> >
> > compilation terminated.
> >
> > make: *** [OBJ.x86_64-unknown-linux-gnu/yylex.o] Error 1
> >
> > ERROR: Compilation failed, sorry. Please check above error messages.
> 
> Glynn, can you help us on this ? We need to find the correct Makefile 
> for the v.mapcalc addon [1]

That header is generated by yacc (or byacc, bison, etc) via a pattern
rule in include/Make/Compile.make:

	%.output %.tab.h %.tab.c: %.y
		$(YACC) -b$* $(YFLAGS) $<

The problem with v.mapcalc is that it tries to compile yylex.c before
v.mapcalc.tab.h has been generated, which fails. It requires:

	-yylex.c: v.mapcalc.tab.h
	+$(OBJDIR)/yylex.o: v.mapcalc.tab.h

The header is a dependency of the object file; the source file doesn't
have dependencies (it's a source file, not generated).

Committed in r66392.

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


More information about the grass-dev mailing list