All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Guenter Roeck <linux@roeck-us.net>, linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Michal Marek <mmarek@suse.cz>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH v2] modpost: Fix secondary errors seen if a single module build fails
Date: Tue, 17 Sep 2013 13:38:01 +0930	[thread overview]
Message-ID: <87pps8ytsu.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1379356284-15804-1-git-send-email-linux@roeck-us.net>

Guenter Roeck <linux@roeck-us.net> writes:
> Commit ea4054a23 (modpost: handle huge numbers of modules) added
> support for building a large number of modules.
>
> Unfortunately, the commit changed the semantics of the makefile: Instead of
> passing only existing object files to modpost, make now passes all expected
> object files. If make was started with option -i, this results in a modpost
> error if a single file failed to build.
>
> Example with the current btrfs build falure on m68k:
>
> fs/btrfs/btrfs.o: No such file or directory
> make[1]: [__modpost] Error 1 (ignored)
>
> This error is followed by lots of errors such as:
>
> m68k-linux-gcc: error: arch/m68k/emu/nfcon.mod.c: No such file or directory
> m68k-linux-gcc: fatal error: no input files
> compilation terminated.
> make[1]: [arch/m68k/emu/nfcon.mod.o] Error 1 (ignored)
>
> This doesn't matter much for normal builds, but it is annoying for builds
> started with "make -i" due to the large number of secondary errors.
> Those errors unnececessarily clog any error log and make it difficult
> to find the real errors in the build.
>
> Fix the problem by only passing existing object files to modpost.

Acked-by: Rusty Russell <rusty@rustcorp.com.au>

Thanks!
Rusty.

>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> v2: Use "xargs -r ls 2>/dev/null" instead of a shell while loop
>     to filter for existing files.
>     Not sure if this is much better, but it is an alternative.
>     If anyone has a better solution, please let me know.
>     [Another option would be to use 'find' (no parameters) instead
>      of 'ls', but that would still require the error redirect.]
>
>  scripts/Makefile.modpost |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
> index 8dcdca2..edc4394 100644
> --- a/scripts/Makefile.modpost
> +++ b/scripts/Makefile.modpost
> @@ -81,7 +81,8 @@ modpost = scripts/mod/modpost                    \
>  
>  # We can go over command line length here, so be careful.
>  quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
> -      cmd_modpost = $(MODLISTCMD) | sed 's/\.ko$$/.o/' | $(modpost) -s -T -
> +      cmd_modpost = $(MODLISTCMD) | sed 's/\.ko$$/.o/' | \
> +	xargs -r ls 2>/dev/null | $(modpost) -s -T -
>  
>  PHONY += __modpost
>  __modpost: $(modules:.ko=.o) FORCE
> -- 
> 1.7.9.7

WARNING: multiple messages have this Message-ID (diff)
From: Rusty Russell <rusty@rustcorp.com.au>
To: Guenter Roeck <linux@roeck-us.net>, linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Michal Marek <mmarek@suse.cz>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH v2] modpost: Fix secondary errors seen if a single module build fails
Date: Tue, 17 Sep 2013 13:38:01 +0930	[thread overview]
Message-ID: <87pps8ytsu.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1379356284-15804-1-git-send-email-linux@roeck-us.net>

Guenter Roeck <linux@roeck-us.net> writes:
> Commit ea4054a23 (modpost: handle huge numbers of modules) added
> support for building a large number of modules.
>
> Unfortunately, the commit changed the semantics of the makefile: Instead of
> passing only existing object files to modpost, make now passes all expected
> object files. If make was started with option -i, this results in a modpost
> error if a single file failed to build.
>
> Example with the current btrfs build falure on m68k:
>
> fs/btrfs/btrfs.o: No such file or directory
> make[1]: [__modpost] Error 1 (ignored)
>
> This error is followed by lots of errors such as:
>
> m68k-linux-gcc: error: arch/m68k/emu/nfcon.mod.c: No such file or directory
> m68k-linux-gcc: fatal error: no input files
> compilation terminated.
> make[1]: [arch/m68k/emu/nfcon.mod.o] Error 1 (ignored)
>
> This doesn't matter much for normal builds, but it is annoying for builds
> started with "make -i" due to the large number of secondary errors.
> Those errors unnececessarily clog any error log and make it difficult
> to find the real errors in the build.
>
> Fix the problem by only passing existing object files to modpost.

Acked-by: Rusty Russell <rusty@rustcorp.com.au>

Thanks!
Rusty.

>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> v2: Use "xargs -r ls 2>/dev/null" instead of a shell while loop
>     to filter for existing files.
>     Not sure if this is much better, but it is an alternative.
>     If anyone has a better solution, please let me know.
>     [Another option would be to use 'find' (no parameters) instead
>      of 'ls', but that would still require the error redirect.]
>
>  scripts/Makefile.modpost |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
> index 8dcdca2..edc4394 100644
> --- a/scripts/Makefile.modpost
> +++ b/scripts/Makefile.modpost
> @@ -81,7 +81,8 @@ modpost = scripts/mod/modpost                    \
>  
>  # We can go over command line length here, so be careful.
>  quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
> -      cmd_modpost = $(MODLISTCMD) | sed 's/\.ko$$/.o/' | $(modpost) -s -T -
> +      cmd_modpost = $(MODLISTCMD) | sed 's/\.ko$$/.o/' | \
> +	xargs -r ls 2>/dev/null | $(modpost) -s -T -
>  
>  PHONY += __modpost
>  __modpost: $(modules:.ko=.o) FORCE
> -- 
> 1.7.9.7

  reply	other threads:[~2013-09-17  5:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-16 18:31 [PATCH v2] modpost: Fix secondary errors seen if a single module build fails Guenter Roeck
2013-09-17  4:08 ` Rusty Russell [this message]
2013-09-17  4:08   ` Rusty Russell

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=87pps8ytsu.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=geert@linux-m68k.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mmarek@suse.cz \
    /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.