* [PATCH[ Makefile: Fix scripts_basic / archscripts build order
@ 2012-09-19 17:38 Jeff Mahoney
2012-09-19 17:42 ` H. Peter Anvin
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Mahoney @ 2012-09-19 17:38 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Linux Kernel Maling List
The SUSE kernel packages are built by doing the following:
make silentoldonfig
make prepare
make scripts
make clean
<capture file list used for building modules>
make -j$NCPUs
On parallel builds (also using -C/O=), this can occasionally fail with:
HOSTCC scripts/basic/fixdep
/bin/sh: scripts/basic/fixdep: No such file or directory
make[3]: *** [arch/x86/tools/relocs] Error 1
make[2]: *** [archscripts] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
The error can also be "Permission denied."
Without the make clean this works ok.
What seems to be happening is that fixdep exists so relocs is able to be
rebuilt, but then somewhere there is a FORCE rule that applies to fixdep
so it is rebuilt. If the timing is right, the relocs build can happen while
the fixdep rebuild is happening and we either get a non-executable fixdep
or a nonexistent fixdep.
This patch moves the archscripts dependency after scripts_basic so that
fixdep is always built after relocs. If I understand the build order
correctly, this should be the case since scripts_basic is essentially
a prereq of everything.
This was introduced by commit
6520fe55 (x86, realmode: 16-bit real-mode code support for relocs),
which added the archscripts dependency to archprepare.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/Makefile
+++ b/Makefile
@@ -835,7 +835,7 @@ prepare1: prepare2 include/linux/version
include/config/auto.conf
$(cmd_crmodverdir)
-archprepare: archheaders archscripts prepare1 scripts_basic
+archprepare: archheaders scripts_basic archscripts prepare1
prepare0: archprepare FORCE
$(Q)$(MAKE) $(build)=.
--
Jeff Mahoney
SUSE Labs
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH[ Makefile: Fix scripts_basic / archscripts build order
2012-09-19 17:38 [PATCH[ Makefile: Fix scripts_basic / archscripts build order Jeff Mahoney
@ 2012-09-19 17:42 ` H. Peter Anvin
2012-09-20 14:24 ` Jeff Mahoney
2012-09-20 14:28 ` [PATCH] x86/kbuild: archscripts depends on scripts_basic Jeff Mahoney
0 siblings, 2 replies; 5+ messages in thread
From: H. Peter Anvin @ 2012-09-19 17:42 UTC (permalink / raw)
To: Jeff Mahoney, kbuild, Michal Marek; +Cc: Linux Kernel Maling List
Kbuild people, any comments?
On 09/19/2012 10:38 AM, Jeff Mahoney wrote:
> The SUSE kernel packages are built by doing the following:
>
> make silentoldonfig
> make prepare
> make scripts
> make clean
>
> <capture file list used for building modules>
>
> make -j$NCPUs
>
> On parallel builds (also using -C/O=), this can occasionally fail with:
> HOSTCC scripts/basic/fixdep
> /bin/sh: scripts/basic/fixdep: No such file or directory
> make[3]: *** [arch/x86/tools/relocs] Error 1
> make[2]: *** [archscripts] Error 2
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [sub-make] Error 2
> make: *** [all] Error 2
>
> The error can also be "Permission denied."
>
> Without the make clean this works ok.
>
> What seems to be happening is that fixdep exists so relocs is able to be
> rebuilt, but then somewhere there is a FORCE rule that applies to fixdep
> so it is rebuilt. If the timing is right, the relocs build can happen while
> the fixdep rebuild is happening and we either get a non-executable fixdep
> or a nonexistent fixdep.
>
> This patch moves the archscripts dependency after scripts_basic so that
> fixdep is always built after relocs. If I understand the build order
> correctly, this should be the case since scripts_basic is essentially
> a prereq of everything.
>
> This was introduced by commit
> 6520fe55 (x86, realmode: 16-bit real-mode code support for relocs),
> which added the archscripts dependency to archprepare.
>
> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/Makefile
> +++ b/Makefile
> @@ -835,7 +835,7 @@ prepare1: prepare2 include/linux/version
> include/config/auto.conf
> $(cmd_crmodverdir)
>
> -archprepare: archheaders archscripts prepare1 scripts_basic
> +archprepare: archheaders scripts_basic archscripts prepare1
>
> prepare0: archprepare FORCE
> $(Q)$(MAKE) $(build)=.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH[ Makefile: Fix scripts_basic / archscripts build order
2012-09-19 17:42 ` H. Peter Anvin
@ 2012-09-20 14:24 ` Jeff Mahoney
2012-09-20 14:28 ` [PATCH] x86/kbuild: archscripts depends on scripts_basic Jeff Mahoney
1 sibling, 0 replies; 5+ messages in thread
From: Jeff Mahoney @ 2012-09-20 14:24 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: kbuild, Michal Marek, Linux Kernel Maling List
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 9/19/12 1:42 PM, H. Peter Anvin wrote:
> Kbuild people, any comments?
Thanks for bouncing along.
This patch is wrong. It fixes the 'make' case because scripts_basic is
build before archscripts but doesn't get rid of the root cause.
'make archscripts' alone still fails. I'll send a replacement that
addresses that dependency issue directly.
- -Jeff
> On 09/19/2012 10:38 AM, Jeff Mahoney wrote:
>> The SUSE kernel packages are built by doing the following:
>>
>> make silentoldonfig make prepare make scripts make clean
>>
>> <capture file list used for building modules>
>>
>> make -j$NCPUs
>>
>> On parallel builds (also using -C/O=), this can occasionally fail
>> with: HOSTCC scripts/basic/fixdep /bin/sh: scripts/basic/fixdep:
>> No such file or directory make[3]: *** [arch/x86/tools/relocs]
>> Error 1 make[2]: *** [archscripts] Error 2 make[2]: *** Waiting
>> for unfinished jobs.... make[1]: *** [sub-make] Error 2 make: ***
>> [all] Error 2
>>
>> The error can also be "Permission denied."
>>
>> Without the make clean this works ok.
>>
>> What seems to be happening is that fixdep exists so relocs is
>> able to be rebuilt, but then somewhere there is a FORCE rule that
>> applies to fixdep so it is rebuilt. If the timing is right, the
>> relocs build can happen while the fixdep rebuild is happening and
>> we either get a non-executable fixdep or a nonexistent fixdep.
>>
>> This patch moves the archscripts dependency after scripts_basic
>> so that fixdep is always built after relocs. If I understand the
>> build order correctly, this should be the case since
>> scripts_basic is essentially a prereq of everything.
>>
>> This was introduced by commit 6520fe55 (x86, realmode: 16-bit
>> real-mode code support for relocs), which added the archscripts
>> dependency to archprepare.
>>
>> Signed-off-by: Jeff Mahoney <jeffm@suse.com> --- Makefile | 2
>> +- 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- a/Makefile +++ b/Makefile @@ -835,7 +835,7 @@ prepare1:
>> prepare2 include/linux/version include/config/auto.conf
>> $(cmd_crmodverdir)
>>
>> -archprepare: archheaders archscripts prepare1 scripts_basic
>> +archprepare: archheaders scripts_basic archscripts prepare1
>>
>> prepare0: archprepare FORCE $(Q)$(MAKE) $(build)=.
>>
>
>
- --
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iQIcBAEBAgAGBQJQWycqAAoJEB57S2MheeWyrOcP/1zkI9gwRCwjGhzd78177JHZ
6YFAkg3bTfQjCKrb1uU414wlFyRS+yHV2TlSDk4UTFfXMM7Y1FKmhGVF2ZJF2EBs
FNOXnRFwh4zhcztXtrSNqs1omhAEfS9FBGlwOmSdSg+mMSK6cAoK2krQuEsrTYUR
9uTeJfvfOJJgTHw5+jM6HH17swF2MkhwS/C5cBt3qGc4keE/+YL7Ub8DRIcrwMN3
1ux87W7Y2e1PaPcxDufZnryMkOSq8IOmRB1ErdJ1fCRcoE3RG5esrrbULURscA3b
OS5+mhJZj8Q5GlFYm1zrKNVxN973nsdw80d6QSGLU6oMtDEF7Hei4fg+KPzgFHNy
Q+Cqt/il1onehS/aMxcjU9OdOPObMau5OVzDv3n+EYnR1wUW7nRevtUt4eVsYG4Z
qEy50tHuv8AO+sfB3nVC268sHOteUwqDDWKJC/vRMnJ4tKHi/vNJinweXzb1G+lp
O/Q2em0zBqmSnBsnlxhk+Ga4riBkcBsHtBiPFZ7NFpXrSXj93ASAURnlRFvpFa/u
mGz/izuFx9s1FFWAfjLMC+LtlMndr4p0DYa2tODt72+HibVA435JMsKSQL8s8fji
HdBJux8MOJzjBqic6y3lHyJKwpjXBB6zNqxr0WNocvwJiS5mEBERpDc4JQp+DCI6
EJV+7rUH8MDw5w69+e2f
=rC/d
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] x86/kbuild: archscripts depends on scripts_basic
2012-09-19 17:42 ` H. Peter Anvin
2012-09-20 14:24 ` Jeff Mahoney
@ 2012-09-20 14:28 ` Jeff Mahoney
2012-09-21 11:50 ` Michal Marek
1 sibling, 1 reply; 5+ messages in thread
From: Jeff Mahoney @ 2012-09-20 14:28 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: kbuild, Michal Marek, Linux Kernel Maling List
While building the SUSE kernel packages, which build the scripts,
make clean, and then build everything, we have been running into spurious
build failures. We tracked them down to a simple dependency issue:
$ make mrproper
CLEAN arch/x86/tools
CLEAN scripts/basic
$ cp patches/config/x86_64/desktop .config
$ make archscripts
HOSTCC arch/x86/tools/relocs
/bin/sh: scripts/basic/fixdep: No such file or directory
make[3]: *** [arch/x86/tools/relocs] Error 1
make[2]: *** [archscripts] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
This was introduced by commit
6520fe55 (x86, realmode: 16-bit real-mode code support for relocs),
which added the archscripts dependency to archprepare.
This patch adds the scripts_basic dependency to the x86 archscripts.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
arch/x86/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -142,7 +142,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-a
KBUILD_CFLAGS += $(mflags-y)
KBUILD_AFLAGS += $(mflags-y)
-archscripts:
+archscripts: scripts_basic
$(Q)$(MAKE) $(build)=arch/x86/tools relocs
###
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/kbuild: archscripts depends on scripts_basic
2012-09-20 14:28 ` [PATCH] x86/kbuild: archscripts depends on scripts_basic Jeff Mahoney
@ 2012-09-21 11:50 ` Michal Marek
0 siblings, 0 replies; 5+ messages in thread
From: Michal Marek @ 2012-09-21 11:50 UTC (permalink / raw)
To: Jeff Mahoney; +Cc: H. Peter Anvin, linux-kbuild, Linux Kernel Maling List
On Thu, Sep 20, 2012 at 10:28:45AM -0400, Jeff Mahoney wrote:
> While building the SUSE kernel packages, which build the scripts,
> make clean, and then build everything, we have been running into spurious
> build failures. We tracked them down to a simple dependency issue:
>
> $ make mrproper
> CLEAN arch/x86/tools
> CLEAN scripts/basic
> $ cp patches/config/x86_64/desktop .config
> $ make archscripts
> HOSTCC arch/x86/tools/relocs
> /bin/sh: scripts/basic/fixdep: No such file or directory
> make[3]: *** [arch/x86/tools/relocs] Error 1
> make[2]: *** [archscripts] Error 2
> make[1]: *** [sub-make] Error 2
> make: *** [all] Error 2
>
> This was introduced by commit
> 6520fe55 (x86, realmode: 16-bit real-mode code support for relocs),
> which added the archscripts dependency to archprepare.
>
> This patch adds the scripts_basic dependency to the x86 archscripts.
>
> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Applied to kbuild.git#rc-fixes, thanks.
Michal
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-21 11:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-19 17:38 [PATCH[ Makefile: Fix scripts_basic / archscripts build order Jeff Mahoney
2012-09-19 17:42 ` H. Peter Anvin
2012-09-20 14:24 ` Jeff Mahoney
2012-09-20 14:28 ` [PATCH] x86/kbuild: archscripts depends on scripts_basic Jeff Mahoney
2012-09-21 11:50 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox