[Buildroot] Cannot rebuild autobuild

Arnout Vandecappelle arnout at mind.be
Sat Nov 25 16:34:11 UTC 2017



On 25-11-17 16:01, Yann E. MORIN wrote:
> Petr, All,
> 
> On 2017-11-21 21:16 +0100, Petr Vorel spake thusly:
>>>>  If the *.mk is expanded in alphabetical order, pkg-toolchain-external.mk will
>>>> always come before toolchain-external.mk. Otherwise it is possible (depending on
>>>> the state of hash tables or inode numbers or whatever) that
>>>> toolchain-external-custom.mk gets included first.
> [--SNIP--]
>> I found by bisecting that our bug is caused by this change in make:
>> 4fd5672 ("Use Jenkins hash.")
>> https://git.savannah.gnu.org/cgit/make.git/commit/?id=4fd56724ad281498d3c8b27a4b25b4070f6e4e65
> 
> Good work at bisecting it! :-)
> 
>> It's a version after last release (4.2.1).
>> I wonder whether it's a bug in make (I guess so) and whether we should report it
>> (probably).
> 
> This is indeed a change in behaviour. However, as make ever documented
> a guranteed/non-guaranteed ordering of wildcards to begin with?
> 
> The manual for the current make version says nothing about the ordering,
> and neither do the manual for older versions (I've checked only a few of
> them).
> 
> So, this is a change in behaviour, and should be reported upstream as a
> bug. Will you do so?

 As I explained in the extended commit message when I applied the patch fixing
this (b9d2d4cb4eb: "Fix makefile include order by using sort/wildcard.") make
actually has had this behaviour "forever" (since make 3.82). It calls glob with
GLOB_NOSORT. Note that in most of the cases where we didn't already do $(sort
$(wildcard ...)), the order actually doesn't (or shouldn't) matter. For example,
package/*/*.mk hopefully does not depend on the order. In other words, it's very
likely that nobody notices if things get included in the "wrong" order.

 As far as I could see, only the external-toolchain-package really could cause
any problems.

 So my guess is that the bisected commit really has nothing to do with it, it
just happens to trigger the random ordering issue.

 Now that I look at it again, however, it looks like we haven't been able to
adequately explain why this issue suddenly occurred... First of all,
external-toolchain-package has existed for a year now, so if it is truly random
we'd expect someone to have noticed before. Also, the change in Tumbleweed that
Petr pointed to [1] should actually *fix* the issue, because it removes the
NOSORT. Debian and Ubuntu, conversely, have no such patch so the autobuilders
should see this issue (they use external toolchains a lot)...

 /me is confused again...


 Regards,
 Arnout


[1]
https://build.opensuse.org/package/view_file/Base:System/make/make-sorted-glob.patch?expand=1


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF


More information about the buildroot mailing list