[chord] chord compilation error

Emil Sit sit at MIT.EDU
Thu Mar 31 10:55:37 EST 2005


Ramsés,

Apologies for the long delay in response.

On Sun, 06 March 2005 at 23:44 (-0600), Ramsés Morales wrote:
> /home/rvmorale/Chord/sfsnet/merkle/merkle_hash.h:110: error:
> an explicit specialization must be preceded by 'template <>'

What version of gcc are you using?

Did following gcc's suggestion of adding 'template <>' before
those lines help? e.g.

Index: merkle/merkle_hash.h
===================================================================
RCS file: /home/am0/sfsnetcvs/sfsnet/merkle/merkle_hash.h,v
retrieving revision 1.6
diff -u -r1.6 merkle_hash.h
--- merkle/merkle_hash.h	2 May 2003 01:38:10 -0000	1.6
+++ merkle/merkle_hash.h	31 Mar 2005 15:53:13 -0000
@@ -106,7 +106,7 @@
   return true;
 }
 
-
+template <>
 struct hashfn<merkle_hash> {
   hashfn () {}
   hash_t operator() (const merkle_hash &a) const
Index: sfsrodb/dbfe.h
===================================================================
RCS file: /home/am0/sfsnetcvs/sfsnet/sfsrodb/dbfe.h,v
retrieving revision 1.20
diff -u -r1.20 dbfe.h
--- sfsrodb/dbfe.h	24 Aug 2004 19:35:47 -0000	1.20
+++ sfsrodb/dbfe.h	31 Mar 2005 15:53:13 -0000
@@ -102,6 +102,7 @@
 #include "btreeDispatch.h"
 #endif /* !SLEEPYCAT */
 
+template <>
 struct hashfn<DB *> {
   hashfn () {}
   hash_t operator() (const DB *a) const


I'm happy to commit such a change to CVS, but I would recommend for now
that you stick with snapshots from 2004-10-07 or earlier and explicitly
patch the code for this problem locally.  There is some instability in
recent code with regards to maintaining block placement correctness in
the face of churn.  Hopefully it will be resolved in the next month or
two.

-- 
Emil Sit / MIT CSAIL PDOS / http://pdos.lcs.mit.edu/chord/  



More information about the chord mailing list