[GRASS-user] r.terraflow has not compiled

Glynn Clements glynn at gclements.plus.com
Sun Nov 19 13:00:07 EST 2006


James McManus wrote:

> > > I want to use r.terraflow. However, it is not being compiled, when I 
> > > make grass62. I am compiling with the gcc compiler, so it should 
> > > reconize the .cc endings as C++ files. Is there an additional step I 
> > > need to take to compile this program, when I make grass?
> > 
> > Did you run `.configure --with-cxx` ?
> 
> I did not do that. I made the change, and the C++ compiler shows up in 
> the configure output:
> 
> checking whether to use C++... yes
> checking for c++... c++
> checking whether the C++ compiler (c++   -Wl,--export-dynamic) works... yes
> checking whether the C++ compiler (c++   -Wl,--export-dynamic) is a 
> cross-compiler... no
> checking whether we are using GNU C++... yes
> checking whether c++ accepts -g... yes
> 
> However when I try and make grass I get a parse error, when trying to 
> compile terraflow:

> ./IOStream/include/replacementHeap.h:120: error: parse error in template  argument list
> ./IOStream/include/replacementHeapBlock.h:122: error: parse error in  template argument list

That error has recently started occurring with the latest versions of
GCC. The issue is fixed in the current CVS version.

Either update the r.terraflow code to the CVS HEAD version, or use an
older version of GCC for compiling r.terraflow.

Or just manually remove the template parameters from the destructor
prototypes, i.e.:

--- replacementHeap.h	5 Oct 2005 05:38:07 -0000	2.2
+++ replacementHeap.h	6 Nov 2006 00:15:44 -0000	2.3
@@ -117,7 +117,7 @@
   ReplacementHeap<T,Compare>(size_t arity, queue<char*>* runList);
   
   //delete array mergeHeap 
-  ~ReplacementHeap<T,Compare>();
+  ~ReplacementHeap();
   
   //is heap empty?
   int empty() const { 
--- replacementHeapBlock.h	5 Oct 2005 05:38:07 -0000	2.2
+++ replacementHeapBlock.h	6 Nov 2006 00:15:44 -0000	2.3
@@ -119,7 +119,7 @@
   ReplacementHeapBlock<T,Compare>(queue <MEM_STREAM<T>*> *runList); 
   
   //delete array mergeHeap 
-  ~ReplacementHeapBlock<T,Compare>();
+  ~ReplacementHeapBlock();
   
   //is heap empty?
   int empty() const { 

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




More information about the grass-user mailing list