mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Barebox List <barebox@lists.infradead.org>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: MIPS parallel build breakage
Date: Fri, 2 Mar 2018 13:34:01 +0100	[thread overview]
Message-ID: <20180302123401.zb5ltrledrhdwbfj@pengutronix.de> (raw)
In-Reply-To: <20180302151735.028ad4763bfd8ae7603a5fb9@gmail.com>

On Fri, Mar 02, 2018 at 03:17:35PM +0300, Antony Pavlov wrote:
> On Thu, 1 Mar 2018 12:07:29 +0100
> Sascha Hauer <s.hauer@pengutronix.de> wrote:
> 
> > Hi Sam and Antony,
> > 
> > (Antony because you introduced this and Sam because you have intimate
> > knowledge with our build system ;)
> > 
> > I am trying to solve a problem that annoys me for some years now. The
> > problem is that the MIPS defconfigs regularly fail in my autobuilder.
> > I usually help myself with trying it again and most of the time it
> > then works, but doing this for years increases the pressure to do
> > something.
> > 
> > What happens is that the MIPS builds use include/generated/compile.h:
> > 
> > > arch/mips/include/asm/pbl_macros.h:28:#include <generated/compile.h>
> > 
> > This often ends in:
> > 
> > > In file included from arch/mips/boot/start.S:20:0: arch/mips/include/asm/pbl_macros.h:28:31:
> > > fatal error: generated/compile.h: No such file or directory
> > > compilation terminated.
> > 
> > include/generated/compile.h is generated in common/Makefile:
> > 
> > > include/generated/compile.h: FORCE
> > > 	@$($(quiet)chk_compile.h)
> > > 	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
> > > 	"$(UTS_MACHINE)" "$(CC) $(KBUILD_CFLAGS)"
> > 
> > Other users of this file add an explicit dependency on it:
> > 
> > > # dependencies on generated files need to be listed explicitly
> > > $(obj)/version.o: include/generated/compile.h
> > 
> > This only seems to work though when the dependent file is in the same
> > directory, but not when the file is in arch/mips/boot/.
> > 
> > I tried doing the include/generated/compile.h in Makefile instead of
> > common/Makefile, but then the version counting gets confused and causes
> > unnecessary rebuilds.
> > 
> > Any ideas how to solve this?
> 
> I can't reproduce parallel build breakage.

The failure starts here when using 6 threads or more and only when
compiling the black-swift_defconfig. After one successful build I can
reproduce this reliably here with:

rm -f include/generated/compile.h && make -j 6

> But I see another problem:
> the version string inside mips pbl binary is differ from the version string
> inside main barebox binary.
> 
> I suppose that the problem is that current build system handles mips asm files
> (which are actually use generated compile.h) and c-files in a different way.

Ups. How do the strings differ?

Another obvious way to fix the issue is to remove UTS_RELEASE and
UTS_VERSION from the pbl headers. Would that be an option?

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-03-02 12:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01 11:07 Sascha Hauer
2018-03-01 18:07 ` Michael Olbrich
2018-03-02 12:17 ` Antony Pavlov
2018-03-02 12:34   ` Sascha Hauer [this message]
2018-03-02 13:37     ` Antony Pavlov
2018-03-02 14:54       ` Sascha Hauer
2018-04-17  6:37 ` Sascha Hauer

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=20180302123401.zb5ltrledrhdwbfj@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=sam@ravnborg.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