public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Juro Bystricky <juro.bystricky@intel.com>
To: openembedded-core@lists.openembedded.org
Cc: jurobystricky@hotmail.com
Subject: [PATCH 0/1] Race during Busybox parallel build
Date: Tue, 13 Sep 2016 14:52:47 -0700	[thread overview]
Message-ID: <1473803568-13012-1-git-send-email-juro.bystricky@intel.com> (raw)

There is an occasional race observed when building Busybox with parallel make.
It has been discussed on Busybox mailing list, see:
https://www.mail-archive.com/busybox@busybox.net/msg23244.html

There were several Busybox attempts to fix this issue:
0dddbc1a59795a77679d8c5ef48a2795cb470563 ("build system: always rewrite NUM_APPLETS.h")
d8e61bbf13d0cf38d477255cfd5dc71c5d51d575 ("build system: different fix for include/applet_tables.h/include/NUM_APPLETS.h")

Although the above patches alleviated the problem somewhat (also included in this patches),
the race can still be observed. The error is consistently the same:

libbb/appletlib.c:164:13: error: 'NUM_APPLETS' undeclared (first use in this function)
  while (i < NUM_APPLETS) {

The reason is the include file where NUM_APPLETS is defined is not yet generated (or is being modified)
at the time libbb/appletlib.c is compiled.
The attached patch fixes the problem by assuring libb is compiled as the last directory.



Juro Bystricky (1):
  busybox: Avoid race building libbb

 .../busybox-kbuild-race-fix-commit-d8e61bb.patch   | 45 +++++++++++++++
 .../commit-applet_tables-fix-commit-0dddbc1.patch  | 53 ++++++++++++++++++
 .../busybox/busybox/makefile-libbb-race.patch      | 34 +++++++++++
 .../busybox/busybox/parallel-make-fix.patch        | 65 ----------------------
 meta/recipes-core/busybox/busybox_1.24.1.bb        |  4 +-
 5 files changed, 135 insertions(+), 66 deletions(-)
 create mode 100644 meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
 create mode 100644 meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
 create mode 100644 meta/recipes-core/busybox/busybox/makefile-libbb-race.patch
 delete mode 100644 meta/recipes-core/busybox/busybox/parallel-make-fix.patch

-- 
2.7.4



             reply	other threads:[~2016-09-13 21:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13 21:52 Juro Bystricky [this message]
2016-09-13 21:52 ` [PATCH 1/1] busybox: Avoid race building libbb Juro Bystricky
2016-09-14  9:56   ` Burton, Ross
2016-09-14 17:05     ` From: Juro Bystricky <juro.bystricky@intel.com> Juro Bystricky
2016-09-14 17:05       ` [PATCH v2 1/1] busybox: Avoid race building libbb Juro Bystricky

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=1473803568-13012-1-git-send-email-juro.bystricky@intel.com \
    --to=juro.bystricky@intel.com \
    --cc=jurobystricky@hotmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox