build error; missing dependencies on *every* new applet

Gilles Espinasse g.esp at free.fr
Wed Nov 25 07:02:51 UTC 2009


----- Original Message ----- 
From: "Denys Vlasenko" <vda.linux at googlemail.com>
To: "Bernhard Reutner-Fischer" <rep.dot.nop at gmail.com>
Cc: <busybox at busybox.net>
Sent: Wednesday, November 25, 2009 4:42 AM
Subject: Re: build error; missing dependencies on *every* new applet


>
> It's not good enough for you that I am trying to help you *at 03:35am*?
>
> Anyway. I can easily reproduce it with:
>
> make distclean
> make allnoconfig
> #sleep 1.2
> sed -i -e "/CONFIG_TRUE/s/.*/CONFIG_TRUE=y/" .config
> make -j<N>
>
> make without -j works. Even make -j2 fails quite often.
>
> I see that it basically amounts to this rule not triggering:
>
> include/autoconf.h: .kconfig.d .config
>         echo making include/autoconf.h  #debug
>         $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
>         echo made include/autoconf.h  #debug
>
> Strange thing is that if I add a delay before sed (see "sleep 1.2"),
> it starts to build reliably. I am totally confused.
> What does this tell us? That "make allnoconfig" places timestamps
> a bit in the future, and therefore sed does not make .config newer
> than include/autoconf.h unless we have a pause??!?
> --
> vda
>
I don't think a timestamp in the futur is likely ;-)
Probably more a delayed write on the other side.
I already have seen this same sort of same second race patching bash.
bash update patch change configure and configure.in in that order.
When both have the same second in the date, configure run happily.
When configure.in is in the next second, running configure trigger autoconf
start and it is a totally different behavior.

Maybe add a sync after make allnoconfig to see if it make a difference?
It may happen that the result of make allnoconfig is not yet written on disk
when sed is run.
sed -i may behave in a particular manner as the same file is modified.

I don't know enought of kernel internal to know if in that case the result
of make allnoconfig is dated from the time files are created/changed in
cache/memory or physically written on the device.

Gilles



More information about the busybox mailing list