unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Markus Triska <markus.triska@gmx.at>, 1705@emacsbugs.donarmstrong.com
Cc: emacs-pretest-bug@gnu.org, bug-gnu-emacs@gnu.org
Subject: bug#1705: 23.0.60; parallel build failure: `mh-e' was not provided
Date: Sat, 27 Dec 2008 14:19:44 +0200	[thread overview]
Message-ID: <ulju1byjj.fsf@gnu.org> (raw)
In-Reply-To: <20081225222756.8855CC16C7F@mt-computer.local>

> From: Markus Triska <markus.triska@gmx.at>
> Date: Thu, 25 Dec 2008 23:27:56 +0100 (CET)
> Cc: 
> 
> 
> A parallel compilation (-j 2) with today's CVS version aborted with:
> 
>    In toplevel form:
>    mh-e/mh-folder.el:34:1:Error: Required feature `mh-e' was not provided
>    Wrote /Users/mt/emacs/lisp/mh-e/mh-e.elc
>    Compiling /Users/mt/emacs/lisp/mh-e/mh-funcs.el
>    make[1]: *** [/Users/mt/emacs/lisp/mh-e/mh-folder.elc] Error 1
>    make[1]: *** Waiting for unfinished jobs....
>    make[1]: *** Waiting for unfinished jobs....
>    No MH variant found on the system
>    Wrote /Users/mt/emacs/lisp/mh-e/mh-funcs.elc
>    make: *** [lisp] Error 2

This is because we don't tell Make all the truth about the
dependencies between Lisp files, so it by default assumes that
mh-funcs.elc and mh-e.elc are independent, and compiles them in two
different jobs that run in parallel.  But the truth is that
mh-funcs.el says this:

   (require 'mh-e)

which causes Emacs to look for mh-e.elc when it compiles mh-funcs.el.
So there's a race condition here between the 2 jobs that Make runs in
parallel under "-j 2": one job compiles mh-e.el and writes mh-e.elc,
while the other job, which compiles mh-funcs.el, reads from mh-e.elc.
In this case, the reading job evidently accessed mh-e.elc after it was
already created, but before it was written in its fullness (as you see
above, the "Wrote /Users/mt/emacs/lisp/mh-e/mh-e.elc" message is
printed _after_ the error message).  So the "provide" form was not yet
in mh-e.elc when it was read, and Emacs barfed.

In general, we lack such dependencies all over lisp/Makefile.in, so I
submit that "make -j N" works for us by sheer luck: I'm guessing that
this is due to small values of N and the fact that $(ELCFILES) causes
Make to compile files in alphabetic order, combined with very few
dependencies between Lisp files whose names come close to one another
in that order.  But given a large enough value of N (and a
correspondingly large number of processors on the system), we should
see such failures all the time.

I added to lisp/Makefile.in a series of dependencies that should fix
the case of MH-E compilation.  Please see if this fixes the problem
for you.  If you have more than 2 processors, it would make sense to
try "make -j N" with values of N larger than 2, to increase the
probability of such a clash.






  reply	other threads:[~2008-12-27 12:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-25 22:27 bug#1705: 23.0.60; parallel build failure: `mh-e' was not provided Markus Triska
2008-12-27 12:19 ` Eli Zaretskii [this message]
2008-12-31  2:30   ` Stefan Monnier
2009-01-02 19:34     ` Bill Wohler
2009-01-03  9:22     ` Eli Zaretskii
2009-01-05  4:12       ` Stefan Monnier
2009-01-05 20:00         ` Eli Zaretskii
2009-01-05 22:21           ` Stefan Monnier
2009-01-06  4:06             ` Eli Zaretskii
2009-01-06 15:00               ` Stefan Monnier
2009-01-06 20:36                 ` Eli Zaretskii
2009-01-06 22:15                   ` Stefan Monnier
2009-01-06 12:31             ` Richard M Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ulju1byjj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=1705@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=markus.triska@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).