kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh
PATCH 1/1 kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh
In commit b18b047002b7 ("kbuild: change scripts/mksysmap into sed script"), the mksysmap script was transformed into a sed script, made directly executable with "#!/bin/sed -f". Apparently, the path to sed is different on NixOS, fixed by using the env command.
To accommodate the number of arguments above the normal maximum for hashbangs, the -S flag of env was used (as in "#!/usr/bin/env -S sed -f"). However, env -S is a GNU extension. Explicitly use sed instead of relying on the executable shebang to keep compatibility with build environments using Busybox.
--- scripts/link-vmlinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/link-vmlinux.sh +1 -1
@@ -193,7 +193,7 @@ kallsyms_step() mksysmap() { info NM ${2} - ${NM} -n "${1}" | "${srctree}/scripts/mksysmap" > "${2}" + ${NM} -n "${1}" | sed -f "${srctree}/scripts/mksysmap" > "${2}" } sorttable()
Signature · 1 line
2.45.2
Quoted 6 lines · Richard Acayan
In commit
b18b047002b7("kbuild: changescripts/mksysmapinto sed script"), the mksysmap script was transformed into a sed script, made directly executable with "#!/bin/sed -f". Apparently, the path to sed is different on NixOS, fixed by using the env command.
Quoted 7 lines
To accommodate the number of arguments above the normal maximum for hashbangs, the -S flag of env was used (as in "#!/usr/bin/env -S sed -f"). However, env -S is a GNU extension. Explicitly use sed instead of relying on the executable shebang to keep compatibility with build environments using Busybox.
Fixes 973eca8db557 ("kbuild: mksysmap now works on nixos")
There is no 973eca8db557 in my tree.
I do not even see it in ML.
Where did it come from, and where will it go?
commit 973eca8db5570dd0c3f2b3190867138cc446eb3b
Author: Kent Overstreet <[email protected]> AuthorDate: Sun Jun 2 23:13:35 2024 -0400 Commit: Kent Overstreet <[email protected]> CommitDate: Sun Jun 2 23:23:47 2024 -0400
kbuild: mksysmap now works on nixos
scripts/mksysmap +1 -1
@@ -1,4 +1,4 @@ -#!/bin/sed -f +#!/usr/bin/env -S sed -f # SPDX-License-Identifier: GPL-2.0-only # # sed script to filter out symbols that are not needed for System.map,
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 11 lines · Richard Acayan
In commit
b18b047002b7("kbuild: changescripts/mksysmapinto sed script"), the mksysmap script was transformed into a sed script, made directly executable with "#!/bin/sed -f". Apparently, the path to sed is different on NixOS, fixed by using the env command.To accommodate the number of arguments above the normal maximum for hashbangs, the -S flag of env was used (as in "#!/usr/bin/env -S sed -f"). However, env -S is a GNU extension. Explicitly use sed instead of relying on the executable shebang to keep compatibility with build environments using Busybox.
I am fine with the code.
Kent will drop his local commit, so please reword the commit description without 973eca8db557 in mind.
Quoted 1 line
Fixes 973eca8db557 ("kbuild: mksysmap now works on nixos")
Please replace this tag with:
Thanks.
Quoted 21 lines
Signed-off-by Richard Acayan <[email protected]>--- scripts/link-vmlinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/link-vmlinux.sh +1
-2@@ -193,7 +193,7 @@ kallsyms_step() mksysmap() { info NM ${2} - ${NM} -n "${1}" | "${srctree}/scripts/mksysmap" > "${2}" + ${NM} -n "${1}" | sed -f "${srctree}/scripts/mksysmap" > "${2}" } sorttable() --2.45.2
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 14 lines · Masahiro Yamada
Quoted 11 lines · Richard Acayan
In commit
b18b047002b7("kbuild: changescripts/mksysmapinto sed script"), the mksysmap script was transformed into a sed script, made directly executable with "#!/bin/sed -f". Apparently, the path to sed is different on NixOS, fixed by using the env command.To accommodate the number of arguments above the normal maximum for hashbangs, the -S flag of env was used (as in "#!/usr/bin/env -S sed -f"). However, env -S is a GNU extension. Explicitly use sed instead of relying on the executable shebang to keep compatibility with build environments using Busybox.
Quoted 4 lines
I am fine with the code.
Kent will drop his local commit, so please reword the commit description without
973eca8db557in mind.
Sorry for the hassle - glad this is fixed
Quoted 15 lines · Kent Overstreet
Quoted 14 lines · Masahiro Yamada
Quoted 11 lines · Richard Acayan
In commit
b18b047002b7("kbuild: changescripts/mksysmapinto sed script"), the mksysmap script was transformed into a sed script, made directly executable with "#!/bin/sed -f". Apparently, the path to sed is different on NixOS, fixed by using the env command.To accommodate the number of arguments above the normal maximum for hashbangs, the -S flag of env was used (as in "#!/usr/bin/env -S sed -f"). However, env -S is a GNU extension. Explicitly use sed instead of relying on the executable shebang to keep compatibility with build environments using Busybox.
Quoted 6 lines
Quoted 4 lines
I am fine with the code.
Kent will drop his local commit, so please reword the commit description without
973eca8db557in mind.Sorry for the hassle - glad this is fixed
All good :). I'm just happy that the maintainers are still listening to developers compiling linux-next on Alpine Linux.
You can optionally attach a reporter tag in v2 since you reported the original bug.
PATCH 1/1 kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh
In reply to Richard AcayanQuoted 6 lines · Richard Acayan
In commit
b18b047002b7("kbuild: changescripts/mksysmapinto sed script"), the mksysmap script was transformed into a sed script, made directly executable with "#!/bin/sed -f". Apparently, the path to sed is different on NixOS, fixed by using the env command.
Quoted 8 lines
To accommodate the number of arguments above the normal maximum for hashbangs, the -S flag of env was used (as in "#!/usr/bin/env -S sed -f"). However, env -S is a GNU extension. Explicitly use sed instead of relying on the executable shebang to keep compatibility with build environments using Busybox.
Fixes 973eca8db557 ("kbuild: mksysmap now works on nixos")Signed-off-by Richard Acayan <[email protected]>
Thanks! Fixes the build on my nix system as well.
Quoted 17 lines
--- scripts/link-vmlinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/link-vmlinux.sh +1
-1@@ -193,7 +193,7 @@ kallsyms_step() mksysmap() { info NM ${2} - ${NM} -n "${1}" | "${srctree}/scripts/mksysmap" > "${2}" + ${NM} -n "${1}" | sed -f "${srctree}/scripts/mksysmap" > "${2}" } sorttable()