On 16/03/26 11:41 am, Venkat Rao Bagalkote wrote:
Greetings!!
I am seeing a repeatable build failure in current mainline when
generating vmlinux.a.
The build stops with an error from ar regarding the --thin option.
This issue is seen on IBM Power11 System.
Attached is the .config file.
Also, I see couple of build warnings, before the build fails.
Note: These warnings and build failure are not see on 20260312 build.
Warnings:
In file included from ./include/linux/seqlock.h:20,
from ./include/linux/mmzone.h:17,
from ./include/linux/gfp.h:7,
from ./include/linux/umh.h:4,
from ./include/linux/kmod.h:9,
from ./include/linux/module.h:18,
from drivers/char/nvram.c:34:
drivers/char/nvram.c:56:21: warning: ‘nvram_mutex’ defined but not
used [-Wunused-variable]
56 | static DEFINE_MUTEX(nvram_mutex);
| ^~~~~~~~~~~
./include/linux/mutex.h:87:22: note: in definition of macro
‘DEFINE_MUTEX’
87 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
Below are the failure logs.
ar: unrecognized option '--thin'
Usage: ar [emulation options] [-]{dmpqrstx}[abcDfilMNoOPsSTuvV]
[--plugin <name>] [member-name] [count] archive-file file...
ar -M [<mri-script]
commands:
d - delete file(s) from the archive
m[ab] - move file(s) in the archive
p - print file(s) found in the archive
q[f] - quick append file(s) to the archive
r[ab][f][u] - replace existing or insert new file(s) into the archive
s - act as ranlib
t[O][v] - display contents of the archive
x[o] - extract file(s) from the archive
command specific modifiers:
[a] - put file(s) after [member-name]
[b] - put file(s) before [member-name] (same as [i])
[D] - use zero for timestamps and uids/gids
[U] - use actual timestamps and uids/gids (default)
[N] - use instance [count] of name
[f] - truncate inserted file names
[P] - use full path names when matching
[o] - preserve original dates
[O] - display offsets of files in the archive
[u] - only replace files that are newer than current
archive contents
generic modifiers:
[c] - do not warn if the library had to be created
[s] - create an archive index (cf. ranlib)
[S] - do not build a symbol table
[T] - make a thin archive
[v] - be verbose
[V] - display the version number
@<file> - read options from <file>
--target=BFDNAME - specify the target object format as BFDNAME
--output=DIRNAME - specify the output directory for extraction
operations
optional:
--plugin <p> - load the specified plugin
emulation options:
No emulation specific options
ar: supported targets: elf64-powerpcle elf64-powerpc elf32-powerpcle
elf32-powerpc aixcoff-rs6000 aixcoff64-rs6000 aix5coff64-rs6000
elf64-little elf64-big elf32-little elf32-big ppcboot elf32-spu
pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf64-x86-64 elf64-l1om
elf64-k1om pe-i386 pei-i386 elf32-i386 elf32-iamcu elf64-bpfle
elf64-bpfbe srec symbolsrec verilog tekhex binary ihex plugin
make[2]: *** [scripts/Makefile.vmlinux_a:22: built-in-fixup.a] Error 1
make[1]: *** [/root/linux-next/Makefile:1278: vmlinux_a] Error 2
make: *** [Makefile:248: __sub-make] Error 2
Git bisect is pointing to below commit as first bad commit.
4519221849f26a3b0c0dc45b9914a0f9cdc00740 is the first bad commit
commit 4519221849f26a3b0c0dc45b9914a0f9cdc00740 (HEAD)
Author: Masahiro Yamada <[email protected]>
Date: Tue Oct 28 18:28:21 2025 +0000
kbuild: move vmlinux.a build rule to scripts/Makefile.vmlinux_a
Move the build rule for vmlinux.a to a separate file in preparation
for supporting distributed builds with Clang ThinLTO.
Signed-off-by: Masahiro Yamada <[email protected]>
Tested-by: Rong Xu <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Nicolas Schier <[email protected]>
Makefile | 16 ++++++----------
scripts/Makefile.vmlinux_a | 46
++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 10 deletions(-)
create mode 100644 scripts/Makefile.vmlinux_a
Git bisect log:
git bisect log
git bisect start
# status: waiting for both good and bad commits
# bad: [b84a0ebe421ca56995ff78b66307667b62b3a900] Add linux-next
specific files for 20260313
git bisect bad b84a0ebe421ca56995ff78b66307667b62b3a900
# status: waiting for good commit(s), bad commit known
# good: [1f318b96cc84d7c2ab792fcc0bfd42a7ca890681] Linux 7.0-rc3
git bisect good 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681
# bad: [ddc6cc7f66af99528c8a827d4ba835fb650b6446] Merge branch 'main' of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
git bisect bad ddc6cc7f66af99528c8a827d4ba835fb650b6446
# bad: [06da2b04b5f2f11952969e813d8dd8f0c7617b79] Merge branch
'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git
git bisect bad 06da2b04b5f2f11952969e813d8dd8f0c7617b79
# good: [85689b69dad24170252dc5be8238de2388e68871] Merge branch
'rust-analyzer-next' of https://github.com/Rust-for-Linux/linux.git
git bisect good 85689b69dad24170252dc5be8238de2388e68871
# bad: [5457bcbc73733c7268108a2acfc35c6505f3cbf3] Merge branch
'for-next/core' of
https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
git bisect bad 5457bcbc73733c7268108a2acfc35c6505f3cbf3
# good: [5473c1ee6462a5d3543c2b4c7dc6f1aac71eb082] userfaultfd:
introduce mfill_copy_folio_locked() helper
git bisect good 5473c1ee6462a5d3543c2b4c7dc6f1aac71eb082
# good: [d1b4433308592363d133a788f0443d5d63872bdd] CREDITS: simplify the
end-of-file alphabetical order comment
git bisect good d1b4433308592363d133a788f0443d5d63872bdd
# good: [ff28b3bb65c3eafeece9334b908e62c492f341e5] mm/damon/core: allow
quota goals set zero effective size quota
git bisect good ff28b3bb65c3eafeece9334b908e62c492f341e5
# bad: [4f6ad15007039f296611ee76dad9f6ed071e63fb] Merge branch
'kbuild-for-next' of
https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git
git bisect bad 4f6ad15007039f296611ee76dad9f6ed071e63fb
# good: [07bc816c63b94e83dbe311d84b0278e54f6b83db] Merge branch
'mm-unstable' of https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
git bisect good 07bc816c63b94e83dbe311d84b0278e54f6b83db
# good: [aad94ba683adc6ff7ff4e29ae48184b42782dd97] kbuild: uapi: provide
stub includes for some libc headers
git bisect good aad94ba683adc6ff7ff4e29ae48184b42782dd97
# good: [0d3fccf68d9873a3c824fb70be0dbb2c4642aa90] kbuild: Use
'-fms-anonymous-structs' if it is available
git bisect good 0d3fccf68d9873a3c824fb70be0dbb2c4642aa90
# bad: [8e786d89efce381609bd7fb9e8d6c52429e8b753] kbuild: distributed
build support for Clang ThinLTO
git bisect bad 8e786d89efce381609bd7fb9e8d6c52429e8b753
# bad: [4519221849f26a3b0c0dc45b9914a0f9cdc00740] kbuild: move vmlinux.a
build rule to scripts/Makefile.vmlinux_a
git bisect bad 4519221849f26a3b0c0dc45b9914a0f9cdc00740
# first bad commit: [4519221849f26a3b0c0dc45b9914a0f9cdc00740] kbuild:
move vmlinux.a build rule to scripts/Makefile.vmlinux_a
Regards,
Venkat.
If you happen to fix this issue, please add below tag.
Reported-by: Venkat Rao Bagalkote <[email protected]>
Regards,
Venkat.