Skip to contentSkip to conversation

linux-next: build failure after merge of the kbuild tree

DISCUSSION Stephen Rothwell 3 participants 4 messages Sep 11, 2024 – Sep 12, 2024 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the kbuild tree, today's linux-next build (x86_64 allmodconfig) failed like this:

make[3]: *** Deleting file 'modules.builtin.ranges'
/bin/sh: 1: scripts/generate_builtin_ranges.awk: not found make[3]: *** [scripts/Makefile.vmlinux:47: modules.builtin.ranges] Error 127 make[2]: *** [Makefile:1157: vmlinux] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:224: __sub-make] Error 2
make: *** [Makefile:224: __sub-make] Error 2
Command exited with non-zero status 2

Caused by commit

04b15cdd611a ("kbuild: generate offset range data for builtin modules")

I do not have gawk installed - I do have mawk installed (as awk). Does this script actually need gawk, or will just plain awk suffice?

I have installed gawk.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 15 lines · Stephen Rothwell

Hi all,

After merging the kbuild tree, today's linux-next build (x86_64 allmodconfig) failed like this:

make[3]: *** Deleting file 'modules.builtin.ranges'
/bin/sh: 1: scripts/generate_builtin_ranges.awk: not found make[3]: *** [scripts/Makefile.vmlinux:47: modules.builtin.ranges] Error 127 make[2]: *** [Makefile:1157: vmlinux] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:224: __sub-make] Error 2
make: *** [Makefile:224: __sub-make] Error 2
Command exited with non-zero status 2

Quoted 9 lines

Caused by commit

04b15cdd611a ("kbuild: generate offset range data for builtin modules")

I do not have gawk installed - I do have mawk installed (as awk). Does this script actually need gawk, or will just plain awk suffice?

I have installed gawk.

This is what I was worried about.

As Documentation/process/changes.rst was modified in that commit, it specifically requires GNU AWK.

Anyway, you were able to fix the build error
by installing /usr/bin/gawk.

If a distro installs gawk somewhere else, (/usr/local/bin/gawk, for example), it is a problem. The shebang "#!/usr/bin/gawk -f" will not work. "#!/usr/bin/env gawk -f" will not work either.

More people may start complaining about it.

Signature · 2 lines
Best Regards
Masahiro Yamada
#2 lore raw
Quoted 16 lines · Masahiro Yamada
Quoted 15 lines · On Wed, Sep 11, 2024 at 9:18???AM Stephen Rothwell <[email protected]> wrote:

Hi all,

After merging the kbuild tree, today's linux-next build (x86_64 allmodconfig) failed like this:

make[3]: *** Deleting file 'modules.builtin.ranges'
/bin/sh: 1: scripts/generate_builtin_ranges.awk: not found make[3]: *** [scripts/Makefile.vmlinux:47: modules.builtin.ranges] Error 127 make[2]: *** [Makefile:1157: vmlinux] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:224: __sub-make] Error 2
make: *** [Makefile:224: __sub-make] Error 2
Command exited with non-zero status 2

Quoted 6 lines
Quoted 6 lines

Caused by commit

04b15cdd611a ("kbuild: generate offset range data for builtin modules")

I do not have gawk installed - I do have mawk installed (as awk). Does this script actually need gawk, or will just plain awk suffice?

The scripts does need gawk because other flavours like mawk do not have the features that the scripts depend on.

Quoted 13 lines
Quoted 3 lines

I have installed gawk.

This is what I was worried about.

As Documentation/process/changes.rst was modified in that commit, it specifically requires GNU AWK.

Anyway, you were able to fix the build error
by installing /usr/bin/gawk.

Quoted 6 lines

If a distro installs gawk somewhere else, (/usr/local/bin/gawk, for example), it is a problem. The shebang "#!/usr/bin/gawk -f" will not work. "#!/usr/bin/env gawk -f" will not work either.

More people may start complaining about it.

For the generator script, passing it as a script explicitly to gawk would work because then the regular PATH search will apply, i.e.

gawk -f scripts/generate_builtin_ranges.awk <args>

The scripts/verify_builtin_ranges.awk script can be invoked the same way, or simply as an executable script if gawk is installed in the standard place.

Other utilities that are executed during the kernel build seem to depend on being found using the PATH, so perhaps changing the recipe in the makefile to use gawk -f <script> <args> would be an acceptable solution?

Kris

#3 lore raw
Quoted 57 lines · Kris Van Hees
Quoted 16 lines · Masahiro Yamada
Quoted 15 lines · On Wed, Sep 11, 2024 at 9:18???AM Stephen Rothwell <[email protected]> wrote:

Hi all,

After merging the kbuild tree, today's linux-next build (x86_64 allmodconfig) failed like this:

make[3]: *** Deleting file 'modules.builtin.ranges'
/bin/sh: 1: scripts/generate_builtin_ranges.awk: not found make[3]: *** [scripts/Makefile.vmlinux:47: modules.builtin.ranges] Error 127 make[2]: *** [Makefile:1157: vmlinux] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:224: __sub-make] Error 2
make: *** [Makefile:224: __sub-make] Error 2
Command exited with non-zero status 2

Quoted 6 lines
Quoted 6 lines

Caused by commit

04b15cdd611a ("kbuild: generate offset range data for builtin modules")

I do not have gawk installed - I do have mawk installed (as awk). Does this script actually need gawk, or will just plain awk suffice?

The scripts does need gawk because other flavours like mawk do not have the features that the scripts depend on.

Quoted 13 lines
Quoted 3 lines

I have installed gawk.

This is what I was worried about.

As Documentation/process/changes.rst was modified in that commit, it specifically requires GNU AWK.

Anyway, you were able to fix the build error
by installing /usr/bin/gawk.

Quoted 6 lines

If a distro installs gawk somewhere else, (/usr/local/bin/gawk, for example), it is a problem. The shebang "#!/usr/bin/gawk -f" will not work. "#!/usr/bin/env gawk -f" will not work either.

More people may start complaining about it.

For the generator script, passing it as a script explicitly to gawk would work because then the regular PATH search will apply, i.e.

gawk -f scripts/generate_builtin_ranges.awk <args>

The scripts/verify_builtin_ranges.awk script can be invoked the same way, or simply as an executable script if gawk is installed in the standard place.

Quoted 5 lines

Other utilities that are executed during the kernel build seem to depend on being found using the PATH, so perhaps changing the recipe in the makefile to use gawk -f <script> <args> would be an acceptable solution?

Kris

I think it is better.

Signature · 2 lines
Best Regards
Masahiro Yamada