zfs icon indicating copy to clipboard operation
zfs copied to clipboard

compat 6.18 clang - build failing

Open JohnyPeaN opened this issue 1 month ago • 2 comments

System information

Type Version/Name
Distribution Name Garuda
Distribution Version Soaring
Kernel Version 6.18-rc6
Architecture x86_64
OpenZFS Version 2.4.99-225_g06c73cffab

Describe the problem you're observing

on linux 6.18-rc6 the check config/kernel-kmap-atomic-args.m4 fails. The cause is that kmap_atomic had its argument changed to const in mm: constify highmem related functions for improved const-correctness happens only with clang, gcc passes.

modyfiing config/kernel-kmap-atomic-args.m4: struct page page; -> struct page page = {0}; makes the check pass both on gcc and clang.

Describe how to reproduce the problem

./configure KERNEL_LLVM=1 ...

Include any warning/errors/backtraces from the system logs

  • output from configure:

checking whether splice_copy_file_range() is available... yes checking whether fops->remap_file_range() is available... yes checking whether fops->clone_file_range() is available... no checking whether fops->dedupe_file_range() is available... no checking whether kmap_atomic wants 1 args... configure: error: *** None of the expected "kmap_atomic()" interfaces were detected. *** This may be because your kernel version is newer than what is *** supported, or you are using a patched custom kernel with *** incompatible modifications. *** *** ZFS Version: zfs-2.4.99-225_g06c73cffab *** Compatible Kernels: 4.18 - 6.17

  • failing check, build/build.log.kabi:

kmap_atomic/kmap_atomic.c:78:16: error: variable 'page' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer] 78 | kmap_atomic(&page); | ^~~~ kmap_local_page/kmap_local_page.c:78:20: error: variable 'page' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer] 78 | kmap_local_page(&page); | ^~~~ 1 error generated. 1 error generated. make[4]: *** [/tmp/makepkg/linux-cachyos-rc/src/linux-6.18-rc6/scripts/Makefile.build:287: kmap_atomic/kmap_atomic.o] Error 1 make[4]: *** [/tmp/makepkg/linux-cachyos-rc/src/linux-6.18-rc6/scripts/Makefile.build:287: kmap_local_page/kmap_local_page.o] Error 1 make[4]: Target 'kmap_atomic/' not remade because of errors. make[4]: Target 'kmap_local_page/' not remade because of errors. make[3]: *** [/tmp/makepkg/linux-cachyos-rc/src/linux-6.18-rc6/scripts/Makefile.build:556: kmap_atomic] Error 2 CC [M] i_uid_read/i_uid_read.o make[3]: *** [/tmp/makepkg/linux-cachyos-rc/src/linux-6.18-rc6/scripts/Makefile.build:556: kmap_local_page] Error 2

JohnyPeaN avatar Nov 18 '25 14:11 JohnyPeaN

Ahh, clang! Confirmed, working on it. Cheers.

robn avatar Nov 18 '25 23:11 robn

If you'd like to test, #17954 should get things going again. Thanks for the report!

robn avatar Nov 19 '25 12:11 robn