Skip to content

Conversation

@john-cabaj
Copy link

@john-cabaj john-cabaj commented Jan 22, 2026

Motivation and Context

When building against a 6.19 kernel using the Ubuntu 26.04 development build with CONFIG_OBJTOOL_WERROR=y, the zfs-linux DKMS package fails to build due to the following errors:

LD [M]  spl.o
spl.o: error: objtool: spl_kmem_cache_destroy+0x23d: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: spl_kmem_cache_create+0x5f4: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: kstat_seq_data_addr+0x77: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: __kstat_delete+0x7b: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: kstat_seq_show+0x137: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: __kstat_create+0x2b0: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: kstat_seq_start+0x365: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: taskq_destroy+0x32f: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: taskq_create_synced+0xcb: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns

This is because the upstream Linux kernel introduced a change in 6.19-rc1 (56754f0f46f6: "objtool: Rename --Werror to --werror"), which doesn't match the changes in scripts/objtool-wrapper.in to ignore the compiler flag.

Description

Simple change to modify scripts/objtool-wrapper.in to look for both "--Werror" and "--werror", rather than just the former.

How Has This Been Tested?

This was tested in a QEMU environment using virtme-ng, after bisecting the Linux kernel changes down to the aforementioned commit. Using the changes in this PR, zfs-linux successfully built.

Tests were repeated on a LXD VM, whereupon some simple regression tests were also executed, notably the tests from here - https://git.launchpad.net/~canonical-kernel-team/+git/autotest-client-tests (see "ubuntu_zfs_*" tests).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@john-cabaj john-cabaj force-pushed the john-cabaj/handle_objtool_werror_and_Werror branch from 93b014f to 9e84a93 Compare January 22, 2026 21:27
@john-cabaj john-cabaj force-pushed the john-cabaj/handle_objtool_werror_and_Werror branch from 9e84a93 to 973e23b Compare January 23, 2026 14:46
@john-cabaj john-cabaj changed the title Linux build: handle --werror with CONFIG_OBJTOOL_WERROR=y Linux 6.19: handle --werror with CONFIG_OBJTOOL_WERROR=y Jan 23, 2026
@john-cabaj
Copy link
Author

Modifying the commit message and PR title to indicate this is needed for Linux 6.19 compat. No functional changes.

Linux upstream commit 56754f0f46f6: "objtool: Rename
--Werror to --werror" did just that, so we should check for
either "--Werror" or "--werror", else the build will fail

Signed-off-by: John Cabaj <john.cabaj@canonical.com>
@john-cabaj john-cabaj force-pushed the john-cabaj/handle_objtool_werror_and_Werror branch from 973e23b to 60d7bb3 Compare January 27, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants