From: Tom Rini Date: Tue, 15 Jan 2019 21:44:36 -0500 Subject: [U-Boot] [U-Boot, v2] kbuild: fix parallel build race caused by u-boot.cfg regeneration In-Reply-To: <1547129499-20373-1-git-send-email-yamada.masahiro@socionext.com> References: <1547129499-20373-1-git-send-email-yamada.masahiro@socionext.com> Message-ID: <20190116024436.GO27429@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Jan 10, 2019 at 11:11:39PM +0900, Masahiro Yamada wrote: > Multiple people have reported intermittent build failure in parallel > building. > > Kever Yang reported this issue some time ago [1], but I could not > get enough clue at that time. > > This time, Richard Purdie provided a full build log [2], which was > very helpful for me to root-cause it. > > The cause of the problem is commit 0d982c585330 ("Makefile: add > dependencies to regenerate u-boot.cfg when lost"). > > That commit added the 'cfg' as the prerequisite of the 'all' target, > so the parallel build tries to run it simultaneously, then regenerates > a symlink while building objects. > > When u-boot.cfg is accidentally lost, let's rebuild it before > descending into any subdirectories. > > Also, what is annoying is u-boot.cfg is currently regenerated every > time since it depends on FORCE. We can get rid of all the prerequisites > of u-boot.cfg because u-boot.cfg is rebuilt anyway as the byproduct of > auto.conf when a user updates the .config file. > > [1] https://lists.denx.de/pipermail/u-boot/2018-June/330341.html > [2] https://autobuilder.yoctoproject.org/typhoon/#/builders/65/builds/160/steps/7/logs/step1b > > Fixes: 0d982c585330 ("Makefile: add dependencies to regenerate u-boot.cfg when lost") > Reported-by: Kever Yang > Reported-by: Richard Purdie > Signed-off-by: Masahiro Yamada > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: