[GRASS-dev] installing v.mapcalc fails

Moritz Lennert mlennert at club.worldonline.be
Fri Sep 11 05:40:16 PDT 2015


On 11/09/15 12:55, Paulo van Breugel wrote:
>
>
> On 11-09-15 12:31, Moritz Lennert wrote:
>> On 11/09/15 10:56, Paulo van Breugel wrote:
>>> I am trying to install v.mapcalc through g.extension, but I am getting
>>> the following error message:
>>>
>>> Fetching <v.mapcalc> from GRASS GIS Addons repository (be patient)...
>>>
>>> Compiling...
>>>
>>> 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.
>>>
>>>
>>> Any idea?
>>
>> Well, the file does not exist. I don't know if it ever did (I can't
>> find it in the older versions in trac). Could you just try without
>> that include line ?
>
> I only see it mentioned in the make file in the line
>
> .INTERMEDIATE: v.mapcalc.tab.c v.mapcalc.tab.h v.mapcalc.output
>
> I remove it from there?

No, actually, looking closer at this, the file should be created during 
compilation, but isn't.

If you run bison -d v.mapcalc.y in the directory the file is created and 
compilation works. So it needs some Makefile magic to provoke the 
creation of the file before the compilation of the rest.

The following patch seems to do the trick, but I'm not familiar enough 
with make to judge whether this is the right solution:

Index: Makefile
===================================================================
--- Makefile	(révision 66168)
+++ Makefile	(copie de travail)
@@ -13,6 +13,8 @@

  default: cmd

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

  .INTERMEDIATE: v.mapcalc.tab.c v.mapcalc.tab.h v.mapcalc.output




More information about the grass-dev mailing list