Package: gerris
Severity: normal
Tags: patch

When building 'gerris' on amd64 with gcc-4.0,
I get the following error:

if /bin/sh ../libtool --silent --mode=compile x86_64-linux-gcc -DHAVE_CONFIG_H 
-I. -I. -I.. -I.. -I/usr/include -DG_LOG_DOMAIN=\"Gfs\" -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include    -DFTT_2D=1 -O2 -Wall -Wall 
-Werror-implicit-function-declaration -Wmissing-prototypes 
-Wmissing-declarations -pipe -MT libgfs2D_la-timestep.lo -MD -MP -MF 
".deps/libgfs2D_la-timestep.Tpo" \
  -c -o libgfs2D_la-timestep.lo `test -f 'timestep.c' || echo './'`timestep.c; \
then mv -f ".deps/libgfs2D_la-timestep.Tpo" ".deps/libgfs2D_la-timestep.Plo"; \
else rm -f ".deps/libgfs2D_la-timestep.Tpo"; exit 1; \
fi
timestep.c: In function 'gfs_surface_bc_read':
timestep.c:846: error: invalid lvalue in assignment
timestep.c:851: error: invalid lvalue in assignment
make[4]: *** [libgfs2D_la-timestep.lo] Error 1
make[4]: Leaving directory `/gerris-0.6.0/src'

With the attached patch 'gerris' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/gerris-0.6.0/src/simulation.c ./src/simulation.c
--- ../tmp-orig/gerris-0.6.0/src/simulation.c   2004-10-18 04:34:09.000000000 
+0200
+++ ./src/simulation.c  2005-03-19 21:26:10.394645746 +0100
@@ -511,7 +511,7 @@
       }
 
       object = gts_object_new (klass);
-      gfs_object_simulation (object) = sim;
+      GTS_OBJECT(object)->reserved = sim;
 
       g_assert (klass->read);
       (* klass->read) (&object, fp);
diff -urN ../tmp-orig/gerris-0.6.0/src/source.c ./src/source.c
--- ../tmp-orig/gerris-0.6.0/src/source.c       2004-10-10 23:14:04.000000000 
+0200
+++ ./src/source.c      2005-03-19 21:27:19.549233446 +0100
@@ -275,7 +275,7 @@
     return;
 
   GFS_SOURCE (*o)->intensity = gfs_function_new (gfs_function_class (), 0.);
-  gfs_object_simulation (GFS_SOURCE (*o)->intensity) = gfs_object_simulation 
(*o);
+  GTS_OBJECT(GFS_SOURCE (*o)->intensity)->reserved = gfs_object_simulation 
(*o);
   gfs_function_read (GFS_SOURCE (*o)->intensity, fp);
 }
 
@@ -567,7 +567,7 @@
     return;
   }
 
-  gfs_object_simulation (d->D) = gfs_object_simulation (d);
+  GTS_OBJECT(d->D)->reserved = gfs_object_simulation (d);
   (* GTS_OBJECT (d->D)->klass->read) ((GtsObject **) &d->D, fp);
 }
 
@@ -865,7 +865,7 @@
     return;
 
   GFS_SOURCE_CORIOLIS (*o)->omegaz = gfs_function_new (gfs_function_class (), 
0.);
-  gfs_object_simulation (GFS_SOURCE_CORIOLIS (*o)->omegaz) = 
gfs_object_simulation (*o);
+  GTS_OBJECT(GFS_SOURCE_CORIOLIS (*o)->omegaz)->reserved = 
gfs_object_simulation (*o);
   gfs_function_read (GFS_SOURCE_CORIOLIS (*o)->omegaz, fp);
 
   v = GFS_SOURCE_GENERIC (*o)->v->next;
diff -urN ../tmp-orig/gerris-0.6.0/src/timestep.c ./src/timestep.c
--- ../tmp-orig/gerris-0.6.0/src/timestep.c     2005-03-19 21:29:50.641931114 
+0100
+++ ./src/timestep.c    2005-03-19 21:25:28.335803362 +0100
@@ -843,12 +843,12 @@
     gts_file_next_token (fp);
   }
   else {
-    gfs_object_simulation (bc->type) = gfs_object_simulation (bc);
+    GTS_OBJECT(bc->type)->reserved = gfs_object_simulation (bc);
     gfs_function_read (bc->type, fp);
     if (fp->type == GTS_ERROR)
       return;
   }
-  gfs_object_simulation (bc->val) = gfs_object_simulation (bc);
+  GTS_OBJECT(bc->val)->reserved = gfs_object_simulation (bc);
   gfs_function_read (bc->val, fp);
 }
 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to