[GRASS-dev] installing v.mapcalc fails

installing v.mapcalc fails, with the following:

g.extension extension=v.mapcalc svnurl=http://svn.osgeo.org/grass/grass-addons/grass7
Fetching <v.mapcalc> from GRASS-Addons SVN 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);
^
make: *** [v.mapcalc.tmp.html] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

Any ideas?

On Fri, Jul 24, 2015 at 11:49 AM, Paulo van Breugel
<p.vanbreugel@gmail.com> wrote:

installing v.mapcalc fails,

Which operating system?

with the following:

g.extension extension=v.mapcalc
svnurl=http://svn.osgeo.org/grass/grass-addons/grass7
Fetching <v.mapcalc> from GRASS-Addons SVN 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);
       ^
make: *** [v.mapcalc.tmp.html] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

I have applied some Makefile fixes (perhaps unrelated), pls try again.

Markus

Hi Markus

On Linux (Ubuntu 14.04). Tried it again, with another error message this time:

g.extension extension=v.mapcalc svnurl=http://svn.osgeo.org/grass/grass-addons/grass7
Fetching <v.mapcalc> from GRASS-Addons SVN 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.

···

On Sun, Aug 2, 2015 at 8:38 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Fri, Jul 24, 2015 at 11:49 AM, Paulo van Breugel
<p.vanbreugel@gmail.com> wrote:

installing v.mapcalc fails,

Which operating system?

with the following:

g.extension extension=v.mapcalc
svnurl=http://svn.osgeo.org/grass/grass-addons/grass7
Fetching <v.mapcalc> from GRASS-Addons SVN 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);
^
make: *** [v.mapcalc.tmp.html] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

I have applied some Makefile fixes (perhaps unrelated), pls try again.

Markus

On Sun, Aug 2, 2015 at 8:45 PM, Paulo van Breugel
<p.vanbreugel@gmail.com> wrote:

Hi Markus

On Linux (Ubuntu 14.04). Tried it again, with another error message this
time:

g.extension extension=v.mapcalc
svnurl=http://svn.osgeo.org/grass/grass-addons/grass7
Fetching <v.mapcalc> from GRASS-Addons SVN 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.

I tried on my Fedora 21 box:

GRASS 7.0.2svn (nc_spm_08_grass7):~ > g.extension extension=v.mapcalc
Fetching <v.mapcalc> from GRASS-Addons SVN repository (be patient)...
Compiling...
In file included from /usr/include/stdio.h:27:0,
                 from number.c:3:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and
_SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^
Installing...
Updating addons metadata file...
Installation of <v.mapcalc> successfully finished

No issues...

The file "missing" seems to be generated on the fly:

[neteler@oboe v.mapcalc]$ grep v.mapcalc.tab.h *
Makefile:yylex.c: v.mapcalc.tab.h
Makefile:.INTERMEDIATE: v.mapcalc.tab.c v.mapcalc.tab.h v.mapcalc.output
grep: OBJ.x86_64-unknown-linux-gnu: Is a directory
grep: plugins: Is a directory
yylex.c:#include "v.mapcalc.tab.h"

Do you have the 'bison' program installed? That's needed.

Markus

On Sun, Aug 2, 2015 at 8:51 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Sun, Aug 2, 2015 at 8:45 PM, Paulo van Breugel
<p.vanbreugel@gmail.com> wrote:
> Hi Markus
>
> On Linux (Ubuntu 14.04). Tried it again, with another error message this
> time:
>
> g.extension extension=v.mapcalc
> svnurl=http://svn.osgeo.org/grass/grass-addons/grass7
> Fetching <v.mapcalc> from GRASS-Addons SVN 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.

I tried on my Fedora 21 box:

GRASS 7.0.2svn (nc_spm_08_grass7):~ > g.extension extension=v.mapcalc
Fetching <v.mapcalc> from GRASS-Addons SVN repository (be patient)...
Compiling...
In file included from /usr/include/stdio.h:27:0,
                 from number.c:3:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and
_SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use
_DEFAULT_SOURCE"
   ^
Installing...
Updating addons metadata file...
Installation of <v.mapcalc> successfully finished

No issues...

The file "missing" seems to be generated on the fly:

[neteler@oboe v.mapcalc]$ grep v.mapcalc.tab.h *
Makefile:yylex.c: v.mapcalc.tab.h
Makefile:.INTERMEDIATE: v.mapcalc.tab.c v.mapcalc.tab.h v.mapcalc.output
grep: OBJ.x86_64-unknown-linux-gnu: Is a directory
grep: plugins: Is a directory
yylex.c:#include "v.mapcalc.tab.h"

Do you have the 'bison' program installed? That's needed.

Yes (it is, I think, also needed to compile grass itself?). Just to be
complete, off all the ones I tried, this is the only one not installing.

Markus

On Sun, Aug 2, 2015 at 11:42 PM, Paulo van Breugel <p.vanbreugel@gmail.com>
wrote:

On Sun, Aug 2, 2015 at 8:51 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Sun, Aug 2, 2015 at 8:45 PM, Paulo van Breugel
<p.vanbreugel@gmail.com> wrote:
> Hi Markus
>
> On Linux (Ubuntu 14.04). Tried it again, with another error message this
> time:
>
> g.extension extension=v.mapcalc
> svnurl=http://svn.osgeo.org/grass/grass-addons/grass7
> Fetching <v.mapcalc> from GRASS-Addons SVN 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.

I tried on my Fedora 21 box:

GRASS 7.0.2svn (nc_spm_08_grass7):~ > g.extension extension=v.mapcalc
Fetching <v.mapcalc> from GRASS-Addons SVN repository (be patient)...
Compiling...
In file included from /usr/include/stdio.h:27:0,
                 from number.c:3:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and
_SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use
_DEFAULT_SOURCE"
   ^
Installing...
Updating addons metadata file...
Installation of <v.mapcalc> successfully finished

No issues...

The file "missing" seems to be generated on the fly:

[neteler@oboe v.mapcalc]$ grep v.mapcalc.tab.h *
Makefile:yylex.c: v.mapcalc.tab.h
Makefile:.INTERMEDIATE: v.mapcalc.tab.c v.mapcalc.tab.h v.mapcalc.output
grep: OBJ.x86_64-unknown-linux-gnu: Is a directory
grep: plugins: Is a directory
yylex.c:#include "v.mapcalc.tab.h"

Do you have the 'bison' program installed? That's needed.

Yes (it is, I think, also needed to compile grass itself?). Just to be
complete, off all the ones I tried, this is the only one not installing.

Tried again to install v.mapcalc after updating my grass 7.1, the module
installed successfully. Thanks Markus

Markus