[chord] Error building Chord

Emil Sit sit at MIT.EDU
Thu Jan 31 22:38:50 EST 2008


On Fri, 11 January 2008 at 16:09 (-0000), Brown, Adam J wrote:
> Fedora Core 7 comes with g++ version 4.1.2.  
> Debug.log is attached.

I think we've figured out the problem.  Can you apply this patch
to your source tree and see if it compiles okay?  Thanks.

# HG changeset patch
# User Emil Sit <sit at mit.edu>
# Date 1201837034 18000
# Node ID 83fb3e1279d84d7a7fa5f8dee05b6e9bece04518
# Parent  2224bc2f8ccbbd6547f59aa48bb8d35181916ace
Avoid conflict between pango warn variable and libasync warn.

Recent gcc don't like the variable named warn in pango.h if warn
is the libasync warnobj.  It complains:

    /usr/local/include/pango-1.0/pango/pango-utils.h:54: error: expected `,' or `...' before '(' token

Observed at least on FreeBSD 6.2 with gcc 3.4.6 and FC 7 with gcc 4.1.2.

To work around this, include the gtk header files first, before any
header files that might include async.h.

Problem first reported by "Brown, Adam J" <ajbrowc at essex.ac.uk>.
Solution suggested by Max Krohn <krohn at mit.edu>.

diff -r 2224bc2f8ccb -r 83fb3e1279d8 tools/vis.C
--- a/tools/vis.C	Sun Jan 27 17:11:23 2008 -0500
+++ b/tools/vis.C	Thu Jan 31 22:37:14 2008 -0500
@@ -1,3 +1,6 @@
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+
 #include "chord.h"
 #include "math.h"
 #include "rxx.h"
diff -r 2224bc2f8ccb -r 83fb3e1279d8 tools/vis.h
--- a/tools/vis.h	Sun Jan 27 17:11:23 2008 -0500
+++ b/tools/vis.h	Thu Jan 31 22:37:14 2008 -0500
@@ -4,9 +4,6 @@
 #include "transport_prot.h"
 
 #include "id_utils.h"
-
-#include <gtk/gtk.h>
-#include <gdk/gdk.h>
 
 #include <ihash.h>
 
diff -r 2224bc2f8ccb -r 83fb3e1279d8 tools/vis_cmd.C
--- a/tools/vis_cmd.C	Sun Jan 27 17:11:23 2008 -0500
+++ b/tools/vis_cmd.C	Thu Jan 31 22:37:14 2008 -0500
@@ -1,3 +1,6 @@
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+
 #include <async.h>
 #include <arpc.h>
 #include <aios.h>
diff -r 2224bc2f8ccb -r 83fb3e1279d8 tools/vis_update.C
--- a/tools/vis_update.C	Sun Jan 27 17:11:23 2008 -0500
+++ b/tools/vis_update.C	Thu Jan 31 22:37:14 2008 -0500
@@ -1,3 +1,6 @@
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+
 #include <chord.h>
 #include <dns.h>
 #include <gtk/gtk.h>


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



More information about the chord mailing list