lkml.org 
[lkml]   [2022]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] kbuild: fix build failure by scripts/check-local-export
On Tue, Jun 7, 2022 at 7:13 AM Tetsuo Handa
<penguin-kernel@i-love.sakura.ne.jp> wrote:
>
> scripts/check-local-export fails with some versions of bash.
>
> CC scripts/mod/empty.o
> ./scripts/check-local-export: line 54: wait: pid 17328 is not a child of this shell
> make[2]: *** [scripts/mod/empty.o] Error 127
> make[2]: *** Deleting file `scripts/mod/empty.o'
> make[1]: *** [prepare0] Error 2
> make: *** [__sub-make] Error 2
>
> Avoid use of bash's built-in wait command, by saving the output from
> nm command into a temporary variable.


This patch does not work because you did not avoid
running the while-loop in a subshell.

It is well described in this page:
https://riptutorial.com/bash/example/26955/to-avoid-usage-of-a-sub-shell



I will send a working patch with a proper commit log.

The part "Saving such line into symbol_types is fine because export_symbols
will remain empty." seems OK with me.
(I was searching for an elegant solution for this, but
I could not come up with a better one.)






> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Fixes: 31cb50b5590fe911 ("kbuild: check static EXPORT_SYMBOL* by script instead of modpost")
> ---









--
Best Regards

Masahiro Yamada

\
 
 \ /
  Last update: 2022-06-07 10:36    [W:0.057 / U:0.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site