Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Fix sorting-related issue when using make 3.82
@ 2011-08-05 14:54 Thomas De Schampheleire
  2011-08-05 15:34 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas De Schampheleire @ 2011-08-05 14:54 UTC (permalink / raw)
  To: buildroot

In make 3.82, wildcards are no longer sorted. This impacts lines like:
	include package/*/*.mk

A specific scenario under which this fails: if the .mk file of an autotools-based package with FOO_AUTORECONF set to yes, happens to be included before the autoconf/autoconf.mk file, the $(AUTORECONF) variable is not yet set and autoreconfiguration fails with the following message:

>>> host-module-init-tools 3.12 Autoreconfiguring
cd /repo/tdescham/reborn/buildroot-dummy/output/build/host-module-init-tools-3.12/ &&
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [/repo/tdescham/reborn/buildroot-dummy/output/build/host-module-init-tools-3.12/.stamp_configured] Error 2

caused by the following statement in package/Makefile.autotools.in:
	$(Q)cd $$($$(PKG)_SRCDIR) && $(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT)

This patch adds explicit sorting to the include statement in Makefile, fixing this scenario for make-3.82.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---

Note that I don't understand the mechanics of this failure completely: I had expected that a package named 'aaa' would still fail to autoreconfigure, even with this patch applied. However, this is not true: this patch does fix the problem with make-3.82.

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -309,7 +309,7 @@
 include toolchain/toolchain-crosstool-ng.mk
 endif
 
-include package/*/*.mk
+include $(sort $(wildcard package/*/*.mk))
 
 include boot/common.mk
 include target/Makefile.in

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] Fix sorting-related issue when using make 3.82
  2011-08-05 14:54 [Buildroot] [PATCH] Fix sorting-related issue when using make 3.82 Thomas De Schampheleire
@ 2011-08-05 15:34 ` Thomas Petazzoni
  2011-08-08 11:39   ` Thomas De Schampheleire
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2011-08-05 15:34 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

The commit log should be wrapped to ~80 columns.

Le Fri, 05 Aug 2011 16:54:32 +0200,
Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> a ?crit :

> In make 3.82, wildcards are no longer sorted. This impacts lines like:
> 	include package/*/*.mk
> 
> A specific scenario under which this fails: if the .mk file of an autotools-based package with FOO_AUTORECONF set to yes, happens to be included before the autoconf/autoconf.mk file, the $(AUTORECONF) variable is not yet set and autoreconfiguration fails with the following message:

I don't think it is the right fix, because there shouldn't be
things that depend on the order of inclusion of the various packages.

> caused by the following statement in package/Makefile.autotools.in:
> 	$(Q)cd $$($$(PKG)_SRCDIR) && $(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT)

Can you try to use $$(AUTORECONF) instead of $(AUTORECONF) ?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] Fix sorting-related issue when using make 3.82
  2011-08-05 15:34 ` Thomas Petazzoni
@ 2011-08-08 11:39   ` Thomas De Schampheleire
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas De Schampheleire @ 2011-08-08 11:39 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Fri, Aug 5, 2011 at 5:34 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello Thomas,
>
> The commit log should be wrapped to ~80 columns.
>
> Le Fri, 05 Aug 2011 16:54:32 +0200,
> Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> a ?crit :
>
>> In make 3.82, wildcards are no longer sorted. This impacts lines like:
>> ? ? ? include package/*/*.mk
>>
>> A specific scenario under which this fails: if the .mk file of an autotools-based package with FOO_AUTORECONF set to yes, happens to be included before the autoconf/autoconf.mk file, the $(AUTORECONF) variable is not yet set and autoreconfiguration fails with the following message:
>
> I don't think it is the right fix, because there shouldn't be
> things that depend on the order of inclusion of the various packages.

That makes sense...

>
>> caused by the following statement in package/Makefile.autotools.in:
>> ? ? ? $(Q)cd $$($$(PKG)_SRCDIR) && $(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT)
>
> Can you try to use $$(AUTORECONF) instead of $(AUTORECONF) ?

What exactly is your reasoning here?

Although I am absolutely positive that the above patch fixed the issue
(albeit incorrectly) (I applied and unapplied the patch several
times), I cannot reproduce it anymore now. I must have changed
something else that has an impact.

If no-one else has problems with make-3.82, and until I stumble upon
it again, I think we better leave it.

Sorry for the confusion,

Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-08 11:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-05 14:54 [Buildroot] [PATCH] Fix sorting-related issue when using make 3.82 Thomas De Schampheleire
2011-08-05 15:34 ` Thomas Petazzoni
2011-08-08 11:39   ` Thomas De Schampheleire

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox