This is the mail archive of the
guile-gtk@sources.redhat.com
mailing list for the Guile project.
SMP problems with examples/Makefile.am
- From: Bo Forslund <bo dot forslund at abc dot se>
- To: guile-gtk list <guile-gtk at sourceware dot cygnus dot com>
- Cc: Marius Vollmer <mvo at zagadka dot ping dot de>
- Date: Sun, 30 Dec 2001 04:12:58 +0100
- Subject: SMP problems with examples/Makefile.am
Hello!
It is SMP problems with the Makefile in the examples dir.
I tested 30-40 compiles of the examples on a single-CPU box using a
Makefile built by the original Makefile.am containing the lines
foo-glue.c: foo.defs
build-guile-gtk glue $< >tmp && mv tmp $@
main.c: foo.defs
build-guile-gtk main $< >tmp && mv tmp $@
And it just worked. Every time.
On the dual-CPU box it failed most of the times with really odd result.
Sometimes the build created a main.c identical to foo-glue.c. Sometimes
the foo-glue.c or main.c was created with a couple of thousand
NULL characters (displayed as ^@ in emacs) and a chopped off line with
the extern sgtk_.... vars, and the rest of foo-glue.c as it should look.
something like
/* Generated by build-guile-gtk from "foo.defs". Do not edit. */
#include <libguile.h>
#include <guile-gtk.h>
#include <foo.h>
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
several thousands of ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
info sgtk_gdk_cap_style_info;
extern sgtk_enum_info sgtk_gdk_join_style_info;
extern sgtk_enum_info sgtk_gdk_cursor_type_info;
extern sgtk_enum_info sgtk_gdk_event_type_info;
extern sgtk_enum_info sgtk_gdk_notify_type_info;
### The rest of the file OK.
Having Makefile.am looking like this works on both the uni-cpu and the
dual-cpu box.
foo-glue.c: foo.defs
build-guile-gtk glue $< >$@
main.c: foo.defs
build-guile-gtk main $< >$@
I can't say that I really understand what the line "$< tmp && mv tmp $@"
does. Doesn't the line "$< >$@" work very much the same? Perhaps someone
can explain what can happen on parallell builds?
Bo