[PATCH] missing dependencies for parallel build with cyrus-imapd-2.1.14

Andreas Haumer andreas at xss.co.at
Thu Jul 10 11:17:21 EDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

I just tried to compile cyrus-imapd-2.1.14 on our new
dual Xeon development machine (with hyperthreading this
gives you 4 logical CPU's) with "make -j 4" to utilize
all the computing power I have available.

Alas, compilation sometimes fails in directory acap like
follows:
[...]
### Making all in /raid5/work/rpm/2/BUILD/cyrus-imapd-0.0.0test/acap
make[1]: Entering directory `/raid5/work/rpm/2/BUILD/cyrus-imapd-0.0.0test/acap'
/usr/bin/compile_et ./acap_err.et
/usr/bin/compile_et ./acap_err.et
gcc -c -I/usr/include/db4 -I/usr/include/sasl -I/usr/local/include  -I. -I.. -I. -I./../lib -DHAVE_CONFIG_H -Wall -O2 -m486 -fno-strength-reduce \
acap.c
gcc -c -I/usr/include/db4 -I/usr/include/sasl -I/usr/local/include  -I. -I.. -I. -I./../lib -DHAVE_CONFIG_H -Wall -O2 -m486 -fno-strength-reduce \
acapsieve.c
In file included from acapsieve.c:20:
acap.h:54: acap_err.h: No such file or directory
make[1]: *** [acapsieve.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/raid5/work/rpm/2/BUILD/cyrus-imapd-0.0.0test/acap'
make: *** [all] Error 1
[...]

Note that "compile_et" is executed twice. This is because
the Makefile specifies that both acap_err.c and acap_err.h
depend on acap_err.et (which is right), but doesn't specifiy
that both files are generated by a single command (which is
wrong). "make -j 4" tries to execute 4 jobs in parallel, so
it tries to create acap_err.h and acap_err.c with two separate
jobs. This can get quite nasty if one jobs overwrites the files
the other jobs just created.

The Makefile also does not specifiy that acap.h needs acap_err.h
"make depend" doesn't solve the problem, because acap_err.h does
not exist when creating dependencies.

I created a small patch to ./acap/Makefile.in which should solve
these problems. You can find it attached to this mail.

Regards

- - andreas

- --
Andreas Haumer                     | mailto:andreas at xss.co.at
*x Software + Systeme              | http://www.xss.co.at/
Karmarschgasse 51/2/20             | Tel: +43-1-6060114-0
A-1100 Vienna, Austria             | Fax: +43-1-6060114-71
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/DYN9xJmyeGcXPhERAlerAKC5qhnPMAwoQ2wJVuzxFchcR3CASgCeIEJr
57YB8jC5jES+tjFkzt5B69g=
=sKLL
-----END PGP SIGNATURE-----
-------------- next part --------------
--- ./acap/Makefile.in.orig	2003-07-10 16:37:31.000000000 +0200
+++ ./acap/Makefile.in	2003-07-10 16:43:37.000000000 +0200
@@ -92,9 +92,12 @@
 skiptester: skiptester.o skip-list.o
 	$(CC) skiptester.o skip-list.o -o skiptester
 
-acap_err.h acap_err.c: acap_err.et
+acap_err.c: acap_err.et
 	$(COMPILE_ET) $(srcdir)/acap_err.et
 
+acap_err.h: acap_err.c
+acap.h:	acap_err.h
+
 clean:
 	rm -f *.o *.a Makefile.bak makedepend.log acap_err.c acap_err.h
 


More information about the Info-cyrus mailing list