From: Rusty Russell <rusty@rustcorp.com.au>
To: Guenter Roeck <linux@roeck-us.net>,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Cc: Fengguang Wu <fengguang.wu@intel.com>
Subject: Re: Build failures due to commit ea4054a2384 (handle huge number of modules)
Date: Thu, 09 May 2013 10:26:00 +0930 [thread overview]
Message-ID: <8761ytnf8f.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20130508213007.GA11946@roeck-us.net>
Guenter Roeck <linux@roeck-us.net> writes:
> Hi all,
>
> I started seeing build failures such as the following in the last week or so.
>
> make[2]: [__modpost] Error 1
>
> followed by lots of messages such as
>
> gcc: error: arch/x86/crypto/ablk_helper.mod.c: No such file or directory
> gcc: fatal error: no input files
>
> (at least if I run make -i)
Hmm, weird! Looks like __modules contains something it shouldn't. We
changed from:
__modules := $(sort $(shell grep -h '\.ko$$' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
To:
MODLISTCMD := find $(MODVERDIR) -name '*.mod' | xargs -r grep -h '\.ko$$' | sort -u
__modules := $(shell $(MODLISTCMD))
They give the same results for me:
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 8dcdca2..1ca358d 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -62,8 +62,14 @@ modulesymfile := $(firstword $(KBUILD_EXTMOD))/Module.symvers
# Step 1), find all modules listed in $(MODVERDIR)/
MODLISTCMD := find $(MODVERDIR) -name '*.mod' | xargs -r grep -h '\.ko$$' | sort -u
__modules := $(shell $(MODLISTCMD))
+__old_modules := $(sort $(shell grep -h '\.ko$$' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
modules := $(patsubst %.o,%.ko, $(wildcard $(__modules:.ko=.o)))
+.PHONY: dump_modules
+dump_modules:
+ @echo $(__modules) > __modules.list
+ @echo $(__old_modules) > __old_modules.list
+
# Stop after building .o files if NOFINAL is set. Makes compile tests quicker
_modpost: $(if $(KBUILD_MODPOST_NOFINAL), $(modules:.ko:.o),$(modules))
@@ -84,7 +90,7 @@ quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
cmd_modpost = $(MODLISTCMD) | sed 's/\.ko$$/.o/' | $(modpost) -s -T -
PHONY += __modpost
-__modpost: $(modules:.ko=.o) FORCE
+__modpost: $(modules:.ko=.o) dump_modules FORCE
$(call cmd,modpost) $(wildcard vmlinux)
quiet_cmd_kernel-mod = MODPOST $@
> After reverting commit ea4054a238 (modpost: handle huge numbers of modules)
> everything is fine.
>
> This happens with multiple gcc versions and target platforms (arm, x86_64,
> i386, powerpc). Host kernel version is 3.8.10, system is Ubuntu 12.10.
>
> Does anyone else see this problem ? Any idea what might be wrong ?
Assuming it happens with a clean tree, please send the .config, and I'll
see if I can reproduce...
Thanks,
Rusty.
next parent reply other threads:[~2013-05-09 3:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130508213007.GA11946@roeck-us.net>
2013-05-09 0:56 ` Rusty Russell [this message]
2013-05-09 4:15 ` Build failures due to commit ea4054a2384 (handle huge number of modules) Guenter Roeck
2013-05-13 2:22 ` Rusty Russell
2013-05-13 3:28 ` Guenter Roeck
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=8761ytnf8f.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=fengguang.wu@intel.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox