All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Investigating a parallel installation failure
Date: Tue, 29 Nov 2016 09:55:16 +0100	[thread overview]
Message-ID: <20161129095516.4d54e2c1@free-electrons.com> (raw)
In-Reply-To: <20161129023613.GB4657@tungsten.ozlabs.ibm.com>

Hello,

On Tue, 29 Nov 2016 13:36:13 +1100, Sam Bobroff wrote:

> I couldn't replicate this, but I tried hacking strace into the process
> so I could see if usb_modeswitch_dispatcher was being deleted during the
> build. It looks like it is, by the C compiler -- presumably removing the
> existing output file before it writes a new one.

And then that makes sense, indeed.

> So you could see an interleaving where Make has seen the file but it's
> deleted either just before, or during, /usr/bin/install. And this can
> happen as long as Make thinks its OK to run those two rules in parallel.
> 
> If that's correct, you could try converting the dependency on
> usb_modeswitch_dispatcher (which, as you point out, isn't really working
> anyway) into an order only dependency (or you could even just delete it
> -- it doesn't seem to do anything necessary unless you're running a
> "make install-static" without having first done a "make static" but
> buildroot does that). This really isn't fixing the whole problem (IMHO
> the makefile is quite broken) but it might hack around it by not forcing
> the unnecessary recompilation thus avoiding the racy delete.

Or we simply use $(MAKE1) to build/install this package, which is
anyway quite small, and avoid the problem altogether. I also agree that
the Makefile is quite broken, and I'm not sure we want to fix it (it
would require a complete rewrite).

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2016-11-29  8:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28 22:46 [Buildroot] Investigating a parallel installation failure Thomas Petazzoni
2016-11-29  2:36 ` Sam Bobroff
2016-11-29  8:55   ` Thomas Petazzoni [this message]
2016-11-29 22:52     ` Arnout Vandecappelle

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

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

  git send-email \
    --in-reply-to=20161129095516.4d54e2c1@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.