All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] Cannot rebuild autobuild
Date: Sat, 18 Nov 2017 22:22:50 +0100	[thread overview]
Message-ID: <20171118222250.4f4e8e3d@gmx.net> (raw)
In-Reply-To: <d13312cf-ae70-92fd-8819-a86c79d1723b@mind.be>

Hello Arnout,

On Thu, 16 Nov 2017 14:43:48 +0100, Arnout Vandecappelle <arnout@mind.be> wrote:

> On 16-11-17 08:29, Petr Vorel wrote:
> > Hi,
> > 
> > ...  
> >>> make[1]: *** No rule to make target 'toolchain-external-custom', needed by '.../build-prebuild-toolchain-001/build/toolchain-external/.stamp_configured'.  Stop.
> >>> make: *** [Makefile:16: _all] Error 2  
> >   
> >>> The error occurs  before the prebuild toolchain is downloaded/extracted...  
> >   
> >>  That is really weird, the toolchain-external-custom dependencies should be
> >> defined no matter what... Could you pastebin the output make 'make -qp' somewhere?  
> > Here it is:
> > http://sipe.cz/buildroot/out.log (68M)
> > http://sipe.cz/buildroot/out.log.tar.gz (9MB)  
> 
>  Oh boy...
> 
>  The problem is that on Tumbleweed the order of inclusion seems to be different,
> which causes toolchain-external-package not to be defined at the time that
> toolchain-external-custom.mk is included (same for all other external toolchains).
> 
> Makefile:492:include toolchain/*/*.mk
> 
> This causes inclusion of
> toolchain/toolchain-external/toolchain-external.mk:28:include
> toolchain/toolchain-external/*/*.mk
> and
> toolchain/toolchain-external/pkg-toolchain-external.mk:592:toolchain-external-package
> = ...
> 
>  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.
> 
>  The short-term solution is of course $(sort $(wildcard ...))

Your investigation seems to be right, the following patch fixes it for me (no
32-bit support installed yet, but the cross compiler is extracted and I get
the 'Cannot execute cross-compiler' error message again):

diff --git a/Makefile b/Makefile
index 55409b99af..9d9737332d 100644
--- a/Makefile
+++ b/Makefile
@@ -483,13 +483,13 @@ include system/system.mk
 include package/Makefile.in
 # arch/arch.mk.* must be after package/Makefile.in because it may need to
 # complement variables defined therein, like BR_NO_CHECK_HASH_FOR.
--include $(wildcard arch/arch.mk.*)
+-include $(sort $(wildcard arch/arch.mk.*))
 include support/dependencies/dependencies.mk
 
 PACKAGES += $(DEPENDENCIES_HOST_PREREQ)
 
-include toolchain/*.mk
-include toolchain/*/*.mk
+include $(sort $(wildcard toolchain/*.mk))
+include $(sort $(wildcard toolchain/*/*.mk))
 
 # Include the package override file if one has been provided in the
 # configuration.
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 48de1e71f2..dd07884c7e 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -25,4 +25,4 @@ $(error No prefix selected for external toolchain package $(BR2_PACKAGE_PROVIDES
 endif
 endif
 
-include toolchain/toolchain-external/*/*.mk
+include $(sort $(wildcard toolchain/toolchain-external/*/*.mk))

Regards,
Peter

> 
>  But for the long term, I think it's better to move pkg-*.mk to support/misc (or
> maybe to support/make) and organise the order of inclusion from there.
> 
>  Any takers? Yann?
> 
>  Regards,
>  Arnout
> 

  reply	other threads:[~2017-11-18 21:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-13 10:27 [Buildroot] Cannot rebuild autobuild Petr Vorel
2017-11-13 11:06 ` Baruch Siach
2017-11-13 14:42 ` Petr Vorel
2017-11-14 22:44   ` Peter Seiderer
2017-11-15 12:58     ` Petr Vorel
2017-11-15 23:03       ` Arnout Vandecappelle
2017-11-15 23:19         ` Peter Seiderer
2017-11-15 23:40           ` Arnout Vandecappelle
2017-11-16  7:29             ` Petr Vorel
2017-11-16 13:43               ` Arnout Vandecappelle
2017-11-18 21:22                 ` Peter Seiderer [this message]
2017-11-20 21:44                   ` Yann E. MORIN
2017-11-18 21:32                 ` Peter Seiderer
2017-11-21 20:16                   ` Petr Vorel
2017-11-25 15:01                     ` Yann E. MORIN
2017-11-25 16:34                       ` Arnout Vandecappelle
2017-11-29 21:19                         ` Petr Vorel
2017-12-15 20:22                           ` Petr Vorel
2017-12-15 20:23                             ` [Buildroot] FW: " Kees van Unen
2017-11-16  7:14         ` [Buildroot] " Petr Vorel

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=20171118222250.4f4e8e3d@gmx.net \
    --to=ps.report@gmx.net \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.