On 02-10-15 10:50, Moritz Lennert wrote:
On 01/10/15 12:38, Glynn Clements wrote:
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.
Thanks for the fix and the explanation ! It works for me now.
Sorry for the late follow up. The add-on installs now. When trying to
run it, however, nothing happens. I don't know if it has anything to do
with the error/warning message I got when installing (below)?
Fetching <v.mapcalc> from GRASS GIS Addons repository (be patient)...
Compiling...
yylex.c: In function ‘yylex’:
yylex.c:32:7: warning: ignoring return value of ‘scanf’, declared with
attribute warn_unused_result [-Wunused-result]
scanf("%lf", &yylval.dbl);
^
Installing...
Updating addons metadata file...
WARNING: No addons metadata available. Addons metadata file not updated.
Installation of <v.mapcalc> successfully finished
The 'no addons metadata available' is something I see more often, and is
probably a problem at the server side if I understood well from other
email treads.
Moritz
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev