[GRASS-dev] [GRASS GIS] #1714: r.terraflow does not compile

#1714: r.terraflow does not compile
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: r.terraflow | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
In the latest update of 6.4.3 svn, r.terraflow does not compile, at least
on the Mac. Here is the error:

{{{
Michaels-MacBook-Air:r.terraflow cmbarton$ make
c++ -c -I/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-
darwin12.1.0/include -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk
-DUSER=\"cmbarton\" -DNODATA_FIX -D_FILE_OFFSET_BITS=64
-DPACKAGE=\""grassmods"\" -DELEV_FLOAT main.cc -o OBJ.x86_64-apple-
darwin12.1.0/FLOAT/main.o
In file included from main.cc:39:
In file included from ./common.h:27:
In file included from /Users/Shared/grass_dev/grass64_rb/dist.x86_64
-apple-darwin12.1.0/include/grass/iostream/ami.h:39:
In file included from /Users/Shared/grass_dev/grass64_rb/dist.x86_64
-apple-darwin12.1.0/include/grass/iostream/empq_impl.h:26:
In file included from /Users/Shared/grass_dev/grass64_rb/dist.x86_64
-apple-darwin12.1.0/include/grass/iostream/empq.h:33:
/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-
darwin12.1.0/include/grass/iostream/embuffer.h:1123:56: error:
       default arguments cannot be added to an out-of-line definition of a
member of a class template
long em_buffer<T,Key>::insert(AMI_STREAM<T>* str, long bos=0) {
                                                        ^ ~
In file included from main.cc:39:
In file included from ./common.h:27:
In file included from /Users/Shared/grass_dev/grass64_rb/dist.x86_64
-apple-darwin12.1.0/include/grass/iostream/ami.h:39:
In file included from /Users/Shared/grass_dev/grass64_rb/dist.x86_64
-apple-darwin12.1.0/include/grass/iostream/empq_impl.h:26:
In file included from /Users/Shared/grass_dev/grass64_rb/dist.x86_64
-apple-darwin12.1.0/include/grass/iostream/empq.h:35:
/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-
darwin12.1.0/include/grass/iostream/minmaxheap.h:494:7: error:
       reference to non-static member function must be called; did you mean
to call it with no
       arguments?
   if (size) {
       ^~~~
           ()
main.cc:181:16: warning: format string is not a string literal
(potentially insecure)
       [-Wformat-security]
         G_fatal_error(_("Unable to create temp dir"));
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-
darwin12.1.0/include/grass/glocale.h:10:16: note:
       expanded from macro '_'
#define _(str) G_gettext(PACKAGE,(str))
                ^~~~~~~~~~~~~~~~~~~~~~~~
main.cc:191:15: warning: format string is not a string literal
(potentially insecure)
       [-Wformat-security]
     G_warning(_("The '-q' flag is superseded and will be removed "
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-
darwin12.1.0/include/grass/glocale.h:10:16: note:
       expanded from macro '_'
#define _(str) G_gettext(PACKAGE,(str))
                ^~~~~~~~~~~~~~~~~~~~~~~~
main.cc:367:19: warning: format string is not a string literal
(potentially insecure)
       [-Wformat-security]
     G_fatal_error(_("cannot read range"));
                   ^~~~~~~~~~~~~~~~~~~~~~
/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-
darwin12.1.0/include/grass/glocale.h:10:16: note:
       expanded from macro '_'
#define _(str) G_gettext(PACKAGE,(str))
                ^~~~~~~~~~~~~~~~~~~~~~~~
main.cc:389:19: warning: format string is not a string literal
(potentially insecure)
       [-Wformat-security]
     G_fatal_error(_("cannot write colors"));
                   ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-
darwin12.1.0/include/grass/glocale.h:10:16: note:
       expanded from macro '_'
#define _(str) G_gettext(PACKAGE,(str))
                ^~~~~~~~~~~~~~~~~~~~~~~~
main.cc:407:19: warning: format string is not a string literal
(potentially insecure)
       [-Wformat-security]
     G_fatal_error(_("cannot read range"));
                   ^~~~~~~~~~~~~~~~~~~~~~
/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-
darwin12.1.0/include/grass/glocale.h:10:16: note:
       expanded from macro '_'
#define _(str) G_gettext(PACKAGE,(str))
                ^~~~~~~~~~~~~~~~~~~~~~~~
main.cc:414:19: warning: format string is not a string literal
(potentially insecure)
       [-Wformat-security]
     G_fatal_error(_("cannot write colors"));
                   ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-
darwin12.1.0/include/grass/glocale.h:10:16: note:
       expanded from macro '_'
#define _(str) G_gettext(PACKAGE,(str))
                ^~~~~~~~~~~~~~~~~~~~~~~~
main.cc:434:44: warning: format specifies type 'int' but the argument has
type 'unsigned long'
       [-Wformat]
   G_message( "\t\t FILL: %s [%d elements, %dB each]",
                                           ~^
                                           %ld
main.cc:437:45: warning: format specifies type 'int' but the argument has
type 'unsigned long'
       [-Wformat]
   G_message( "\t\t FLOW: %s [%ld elements, %dB each]",
                                            ~^
                                            %ld
8 warnings and 2 errors generated.
make: *** [OBJ.x86_64-apple-darwin12.1.0/FLOAT/main.o] Error 1
Michaels-MacBook-Air:r.terraflow cmbarton$

}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1714&gt;
GRASS GIS <http://grass.osgeo.org>

#1714: r.terraflow does not compile
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: r.terraflow | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

This also affects devbranch 6 (6.5).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1714#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1714: r.terraflow does not compile
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: r.terraflow | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

Doesn't compile in GRASS 7 either

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1714#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1714: r.terraflow does not compile
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: r.terraflow | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by glynn):

Replying to [ticket:1714 cmbarton]:
> In the latest update of 6.4.3 svn, r.terraflow does not compile, at
least on the Mac. Here is the error:
{{{
/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-
darwin12.1.0/include/grass/iostream/embuffer.h:1123:56: error:
       default arguments cannot be added to an out-of-line definition of a
member of a class template
}}}

This is almost exactly the same issue as #1676 (fixed in r52130). No idea
why it hasn't been an issue until now.
>
{{{
/Users/Shared/grass_dev/grass64_rb/dist.x86_64-apple-
darwin12.1.0/include/grass/iostream/minmaxheap.h:494:7: error:
       reference to non-static member function must be called; did you mean
to call it with no
       arguments?
}}}
I have even less idea why this hasn't been caught before.

Both should be fixed (in 7.0) by r53077.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1714#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1714: r.terraflow does not compile
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: r.terraflow | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by neteler):

Replying to [comment:3 glynn]:
...
> I have even less idea why this hasn't been caught before.
>
> Both should be fixed (in 7.0) by r53077.

Backported to 6.4 and 6.5 in r53094 and r53095.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1714#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#1714: r.terraflow does not compile
--------------------------+-------------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: blocker | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Resolution: fixed | Keywords: r.terraflow
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by neteler):

  * status: new => closed
  * resolution: => fixed

Comment:

Closing since it should be fixed on all branches and trunk. Reopen if
needed.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1714#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>