openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.63k stars 1.75k forks source link

The ZFS module fails to build when Clang is set in the kernel source's Makefile #10267

Open lzlrd opened 4 years ago

lzlrd commented 4 years ago

System information

Type Version/Name
Distribution Name Arch Linux
Distribution Version n/a
Linux Kernel 5.6.6
Architecture x86_64
ZFS Version 0.8.0
SPL Version 0.8.0

Describe the problem you're observing

The kernel source's Makefile contains "overwrites" that set CC, LD, NM, and other flags:

HOSTCC       = /opt/proton-clang/bin/clang
HOSTCXX      = /opt/proton-clang/bin/clang++
HOSTLD       = /opt/proton-clang/bin/ld.lld
...
LD      = /opt/proton-clang/bin/ld.lld
CC      = /opt/proton-clang/bin/clang
CPP     = $(CC) -E
AR      = $(CROSS_COMPILE)ar
NM      = /opt/proton-clang/bin/llvm-nm
STRIP       = $(CROSS_COMPILE)strip
OBJCOPY     = /opt/proton-clang/bin/llvm-objcopy

The above tools do exist as they are a package dependency of the kernel package, and they are used when building the kernel. Also, they were used when successfully building another module.

When building ZFS from DKMS:

checking for gcc... gcc
...
checking whether bops->check_events() exists... configure: error: 
        *** None of the expected "bops->check_events()" 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-0.8.0-1
        *** Compatible Kernels: 3.10 - 5.6

Building module:
cleaning build area...(bad exit status: 2)
make -j24 KERNELRELEASE=5.6.6¦zestop...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.6.6¦zestop (x86_64)
Consult /var/lib/dkms/zfs/git/build/make.log for more information.

Describe how to reproduce the problem

Just install the Zest Project's kernel using yay:

$ yay -S linux-zest-git

Then try to install and build the zfs-dkms module:

$ yay -S zfs-dkms
$ sudo dkms build zfs/git

Include any warning/errors/backtraces from the system logs

The contents of make.log referenced above are:

DKMS make.log for zfs-git for kernel 5.6.6¦zestop (x86_64)
Wed 29 Apr 16:40:08 BST 2020
make: *** No targets specified and no makefile found.  Stop.
torvic9 commented 4 years ago

Did you try adding something like MAKE[0]='make CC=clang' to dkms.conf? I haven't tried it, but I do remember having a similar issue with VirtualBox DKMS.

lzlrd commented 4 years ago

@torvic9 my kernel headers' Makefile have all the LLVM tools that I use set, and when building DKMS modules these are parsed.

ghost commented 3 years ago

I am encountering the same issue when attempting to add ZFS as built in to a clang built kernel (in an environment where cc is symlinked to clang, c++ is symlinked to clang++, and ld is symlinked to ld.lld), in addition to LLVM=1 and LLVM_IAS=1

seblu commented 3 years ago

Looks the failure append in the generated Makefile (i.e build/block_device_operations_check_events/Makefile) which use a flag unrecognized by clang.

ccflags-y += -Wno-unused-but-set-variable
/var/lib/dkms/zfs/2.1.0/build/build/block_device_operations_check_events # make modules -C /usr/lib/modules/5.12.3-seblu/build  M=/var/lib/dkms/zfs/2.1.0/build/build/block_device_operations_check_events
make: Entering directory '/usr/src/linux-5.12.3-seblu'
  CC [M]  /var/lib/dkms/zfs/2.1.0/build/build/block_device_operations_check_events/block_device_operations_check_events.o
error: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Werror,-Wunknown-warning-option]
make[1]: *** [scripts/Makefile.build:271: /var/lib/dkms/zfs/2.1.0/build/build/block_device_operations_check_events/block_device_operations_check_events.o] Error 1
make: *** [Makefile:1851: /var/lib/dkms/zfs/2.1.0/build/build/block_device_operations_check_events] Error 2
make: Leaving directory '/usr/src/linux-5.12.3-seblu'

Forcing CC=clang helps makefile to detect support of -Wno-unused-but-set-variable by the compiler.

My workaround is to append in /etc/dkms/framework.conf the following lines:

# Fix modules build with CLANG
export CC=clang LD=ld.lld LLVM=1 LLVM_IAS=1

There is unfortunately no easy way in DKMS to add CC=clang only when building clang kernels.

szubersk commented 2 years ago

@lazerl0rd @seblu Kernel module clang compilation was fixed in b66140c6ad481cb13e685465c6a732f7f2b9dc77 and 4eea717c4f940e029eda6b6fd438b7d5e68880c8. You should be able to cherry-pick those without conflicts to any branch. Please don't forget to edit dkms.conf and pass KERNEL_* to configure in there.

lzlrd commented 2 years ago

@lazerl0rd @seblu Kernel module clang compilation was fixed in b66140c6ad481cb13e685465c6a732f7f2b9dc77 and 4eea717c4f940e029eda6b6fd438b7d5e68880c8. You should be able to cherry-pick those without conflicts to any branch. Please don't forget to edit dkms.conf and pass KERNEL_* to configure in there.

Thanks for the update. I can't currently test this as my laptop is in for repair but I'll give it a look when it's back.

szubersk commented 2 years ago

@lazerl0rd @seblu Now that the corrections for this issue are in both master and 2.1.3, would you mind confirming if clang compilation works for you?

GroosL commented 2 years ago

Not working for me

szubersk commented 2 years ago

@GroosL Did you pass KERNEL_CC and KERNEL_LD variables to configure? CC and LD variables change only the compiler for user space code. Would you mind sharing the error you're getting together with config.log file?

GroosL commented 2 years ago

Working for me now. I recompiled the kernel without LTO and it works, doesn't work with LTO enabled tho

szubersk commented 2 years ago

@GroosL Would you mind sharing how exactly you enable LTO? What's the difference between non-LTO version? Maybe that's one more thing we should correct to widen the user base.

szubersk commented 2 years ago

@GroosL A nudge. Would you share how you enabled LTO so we could reproduce the issue?

I just did following and OpenZFS master compiled perfectly well

(clang)root@laptop:/usr/src/linux-5.15.32# make mrproper && LLVM=1 make allnoconfig && echo -e 'CONFIG_MODULES=y\nCONFIG_CRYPTO=y\nCONFIG_CRYPTO_DEFLATE=m\nCONFIG_ZLIB_DEFLATE=m\nCONFIG_ZLIB_INFLATE=m\nCONFIG_LTO_CLANG_FULL=y' >> .config && LLVM=1 make olddefconfig && LLVM=1 make -j8 -l4 bzImage modules
...
(clang)root@laptop:/usr/src/linux-5.15.32# cd -
/zfs
(clang)root@laptop:/zfs# git clean -dfxq && ./autogen.sh && ./configure KERNEL_LLVM=1 --with-config=kernel --with-linux=/usr/src/linux-5.15.32 && make -j8 -l4 && echo OK
...
[ -x ./scripts/zfs-tests.sh ] && \
    ./scripts/zfs-tests.sh -c
Missing helper script common.sh
make[2]: [Makefile:1514: all-local] Error 1 (ignored)
make[2]: Leaving directory '/zfs'
make[1]: Leaving directory '/zfs'
OK
(clang)root@laptop:/zfs# grep LTO /usr/src/linux-5.15.32/.config
CONFIG_LTO=y
CONFIG_LTO_CLANG=y
CONFIG_ARCH_SUPPORTS_LTO_CLANG=y
CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y
CONFIG_HAS_LTO_CLANG=y
# CONFIG_LTO_NONE is not set
CONFIG_LTO_CLANG_FULL=y
# CONFIG_LTO_CLANG_THIN is not set
ptr1337 commented 2 years ago

I have a equal issue. I started to add the zfs module into the kernel built in on archlinux and encountered a issue as soon the kernel gets compiled with lto. The complete kernel does compile completely successfully, as soon I reboot it does can not load the intrafms anymore and just freezes, getting sadly no output.

Tested: clang-14, latest 2.1.5 staging commit THIN LTO, FULL LTO: both have the issue.

Kernel 5.18

Regards.

szubersk commented 2 years ago

I have a equal issue. I started to add the zfs module into the kernel built in on archlinux and encountered a issue as soon the kernel gets compiled with lto. The complete kernel does compile completely successfully, as soon I reboot it does can not load the intrafms anymore and just freezes, getting sadly no output.

Do you have problem with compiling OpenZFS or booting the compiled kernel? If it's compile issue, would you mind executing the commands I provided on the comment above and share the results?

ptr1337 commented 2 years ago

I have a equal issue. I started to add the zfs module into the kernel built in on archlinux and encountered a issue as soon the kernel gets compiled with lto. The complete kernel does compile completely successfully, as soon I reboot it does can not load the intrafms anymore and just freezes, getting sadly no output.

Do you have problem with compiling OpenZFS or booting the compiled kernel? If it's compile issue, would you mind executing the commands I provided on the comment above and share the results?

I have the same issue as you with lto. here you find the pkgbuild for the built in zfs module: https://github.com/CachyOS/linux-cachyos/blob/master/zfs-builtin/PKGBUILD

In the other directory’s you can find the pkgbuild with the normal built kernel modules which are then compiled as an extra package.

szubersk commented 2 years ago

No wonder, you'd need to pass KERNEL_LLVM=1 to OpenZFS configure invocation. It's clearly missing in https://github.com/CachyOS/linux-cachyos/blob/master/zfs-builtin/PKGBUILD (refer to https://github.com/openzfs/zfs/issues/10267#issuecomment-1090661179)

ptr1337 commented 2 years ago

No wonder, you'd need to pass KERNEL_LLVM=1 to OpenZFS configure invocation. It's clearly missing in https://github.com/CachyOS/linux-cachyos/blob/master/zfs-builtin/PKGBUILD (refer to #10267 (comment))

Yes, I know. I did pushed just not a PKGBUiLD which does not work, since I built the kernels on a server and provide them in a repo.

If you watch the other PKGBUILDs you see that their is Kernel_LLVM=1 used.

ptr1337 commented 2 years ago

Actually did try to built with llvm 13 and CONFIG_ZFS=m will will result into a GPL-incopatible module:

ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'kernel_fpu_begin_mask'
ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'kernel_fpu_end'
ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'blk_queue_write_cache'
ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'kvfree_call_rcu'
ERROR: modpost: GPL-incompatible module zcommon.ko uses GPL-only symbol 'kernel_fpu_begin_mask'
ERROR: modpost: GPL-incompatible module zcommon.ko uses GPL-only symbol 'kernel_fpu_end'
ERROR: modpost: GPL-incompatible module icp.ko uses GPL-only symbol 'kernel_fpu_begin_mask'
ERROR: modpost: GPL-incompatible module icp.ko uses GPL-only symbol 'kernel_fpu_end'
make[1]: *** [scripts/Makefile.modpost:134: modules-only.symvers] Error 1
make[1]: *** Deleting file 'modules-only.symvers'
make: *** [Makefile:1748: modules] Error 2
make: *** Waiting for unfinished jobs....
  MKPIGGY arch/x86/boot/compressed/piggy.S
ptr1337 commented 2 years ago

So, did compiled again one without LTO but with LLVM which works fine and also boots.

I think the easiest solution would be to pass "-fno-lto" to the KBUILD when building the zfs module.

seblu commented 2 years ago

Hello,

I just give it a new try with Linux 5.18 built against Clang 13.0.1 and zfs 2.1.4.

Here is the relevent error. Looks like the flags used to build the kernel make the module fail to buid.

/var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zvol_os.c:1111:3: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunus
ed-result]
                add_disk(zv->zv_zso->zvo_disk);
                ^~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[3]: *** [scripts/Makefile.build:288: /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zvol_os.o] Error 1

Full log output:

# dkms install --no-depmod zfs/2.1.4+65.r05147319b0 -k 5.18.0-seblu
Running the pre_build script:
checking for gawk... gawk
checking metadata... META file
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether clang accepts -g... yes
checking for clang option to enable C11 features... none needed
checking whether clang understands -c and -o together... yes
checking dependency style of clang... none
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by clang... ld.lld
checking if the linker (ld.lld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /bin/nm -B
checking the name lister (/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for ld.lld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /bin/nm -B output from clang object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if clang supports -fno-rtti -fno-exceptions... yes
checking for clang option to produce PIC... -fPIC -DPIC
checking if clang PIC flag -fPIC -DPIC works... yes
checking if clang static flag -static works... yes
checking if clang supports -c -o file.o... yes
checking if clang supports -c -o file.o... (cached) yes
checking whether the clang linker (ld.lld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) clang
checking whether the compiler supports GNU C... (cached) yes
checking whether clang accepts -g... (cached) yes
checking for clang option to enable C11 features... (cached) none needed
checking whether clang understands -c and -o together... (cached) yes
checking dependency style of clang... (cached) none
checking whether ln -s works... yes
checking for pkg-config... no
checking dependency style of clang... none
checking whether to build with code coverage support... no
checking how to create a pax tar archive... gnutar
checking zfs author... OpenZFS
checking zfs license... CDDL
checking whether NLS is requested... yes
checking for msgfmt... /bin/msgfmt
checking for gmsgfmt... /bin/msgfmt
checking for xgettext... /bin/xgettext
checking for msgmerge... /bin/msgmerge
checking for ld... ld.lld -m elf_x86_64
checking if the linker (ld.lld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... done
checking 32-bit host C ABI... no
checking for the common suffixes of directories in the library search path... lib,lib
checking zfs config... kernel
checking the number of available CPUs... 2
checking whether clang supports -Wno-unused-but-set-variable... yes
checking whether clang supports -Wno-bool-compare... no
checking whether clang supports -Wimplicit-fallthrough... yes
checking whether clang supports -Wframe-larger-than=<size>... yes
checking whether clang supports -Wno-format-truncation... no
checking whether clang supports -Wno-format-zero-length... yes
checking whether clang supports -fno-omit-frame-pointer... yes
checking whether clang supports -fno-ipa-sra... no
checking whether to build with -fsanitize=address support... no
checking whether host toolchain supports SSE... yes
checking whether host toolchain supports SSE2... yes
checking whether host toolchain supports SSE3... yes
checking whether host toolchain supports SSSE3... yes
checking whether host toolchain supports SSE4.1... yes
checking whether host toolchain supports SSE4.2... yes
checking whether host toolchain supports AVX... yes
checking whether host toolchain supports AVX2... yes
checking whether host toolchain supports AVX512F... yes
checking whether host toolchain supports AVX512CD... yes
checking whether host toolchain supports AVX512DQ... yes
checking whether host toolchain supports AVX512BW... yes
checking whether host toolchain supports AVX512IFMA... yes
checking whether host toolchain supports AVX512VBMI... yes
checking whether host toolchain supports AVX512PF... yes
checking whether host toolchain supports AVX512ER... yes
checking whether host toolchain supports AVX512VL... yes
checking whether host toolchain supports AES... yes
checking whether host toolchain supports PCLMULQDQ... yes
checking whether host toolchain supports MOVBE... yes
checking whether host toolchain supports XSAVE... yes
checking whether host toolchain supports XSAVEOPT... yes
checking whether host toolchain supports XSAVES... yes
checking for system type (linux-gnu)... Linux
checking for python3... python3
checking for python version... 3.10
checking for python platform... linux
checking for GNU default python prefix... ${prefix}
checking for GNU default python exec_prefix... ${exec_prefix}
checking for python script directory (pythondir)... ${PYTHON_PREFIX}/lib/python3.10/site-packages
checking for python extension module directory (pyexecdir)... ${PYTHON_EXEC_PREFIX}/lib/python3.10/site-packages
checking for python3 module: packaging... yes
checking for python3.10... /bin/python3.10
checking for a version of Python >= '2.1.0'... yes
checking for a version of Python >= '3.4.0'... yes
checking for the distutils Python package... yes
checking for Python include path... -I/usr/include/python3.10
checking for Python library path... -L/usr/lib -lpython3.10
checking for Python site-packages path... /usr/lib/python3.10/site-packages
checking python extra libraries... -lcrypt -ldl  -lm -lm
checking python extra linking flags... -Xlinker -export-dynamic
checking consistency of all components of python development environment... yes
checking for python3.10 module: setuptools... yes
checking for python3.10 module: cffi... yes
checking whether to enable pyzfs: ... yes
checking for sed --in-place... --in-place
checking for cppcheck... no
checking for shellcheck... no
checking for checkbashisms... no
checking kernel source and build directories... done
checking kernel source directory... /usr/lib/modules/5.18.0-seblu/build
checking kernel build directory... /usr/lib/modules/5.18.0-seblu/build
checking kernel source version... 5.18.0-seblu
checking for kernel config option compatibility... done
checking whether CONFIG_MODULES is defined... yes
checking whether CONFIG_BLOCK is defined... yes
checking whether mutex_lock() is GPL-only... no
checking whether CONFIG_TRIM_UNUSED_KSYM is disabled... yes
checking whether CONFIG_ZLIB_DEFLATE is defined... yes
checking whether CONFIG_ZLIB_INFLATE is defined... yes
checking kernel file name for module symbols... Module.symvers
checking whether fpu headers are available... asm/fpu/api.h
checking whether fpu/xcr header is available... asm/fpu/xcr.h
checking whether objtool header is available... linux/objtool.h
checking whether wait_queue_entry_t exists... yes
checking whether /dev/zfs minor is available... 249
checking whether DECLARE_EVENT_CLASS() is available... no
checking for available kernel interfaces... ^[[Bdone
checking whether access_ok() has 'type' parameter... no
checking whether global_node_page_state() exists... yes
checking whether global_zone_page_state() exists... yes
checking whether enum node_stat_item contains NR_FILE_PAGES... yes
checking whether enum node_stat_item contains NR_INACTIVE_ANON... yes
checking whether enum node_stat_item contains NR_INACTIVE_FILE... yes
checking whether enum zone_stat_item contains NR_FILE_PAGES... no
checking whether enum zone_stat_item contains NR_INACTIVE_ANON... no
checking whether enum zone_stat_item contains NR_INACTIVE_FILE... no
checking whether global_page_state enums are sane... yes
checking whether compile-time stack validation (objtool) is available... yes
checking whether STACK_FRAME_NON_STANDARD is defined... yes
checking whether pde_data() is lowercase... yes
checking whether fops->fallocate() exists... yes
checking whether FALLOC_FL_ZERO_RANGE exists... yes
checking whether zlib_deflate_workspacesize() wants 2 args... yes
checking whether struct rw_semaphore has member activity... no
checking whether struct rw_semaphore has atomic_long_t member count... yes
checking whether header linux/sched/rt.h exists... yes
checking whether header linux/sched/signal.h exists... yes
checking whether io_schedule_timeout() is available... yes
checking whether usleep_range() is available... yes
checking whether kmem_cache_create_usercopy() exists... yes
checking whether kvmalloc(ptr, flags) is available... yes
checking whether __vmalloc(ptr, flags, pageflags) is available... no
checking whether wait_on_bit() takes an action... no
checking whether wq_head->head and wq_entry->entry exist... yes
checking whether timestamp_truncate() exists... yes
checking whether inode->i_*time's are timespec64... yes
checking whether inode_lock_shared() exists... yes
checking whether group_info->gid exists... yes
checking whether kernel_write() takes loff_t pointer... yes
checking whether kernel_read() takes loff_t pointer... yes
checking whether timer_setup() is available... yes
checking whether timer function expects timer_list... yes
checking whether struct timer_list has flags... yes
checking whether super_block->s_user_ns exists... yes
checking whether proc_ops structure exists... yes
checking whether bops->check_events() exists... yes
checking whether bops->release() is void... yes
checking whether bops->revalidate_disk() exists... no
checking whether REQ_FAILFAST_MASK is defined... yes
checking whether REQ_DISCARD is defined... no
checking whether REQ_FLUSH is defined... no
checking whether REQ_PREFLUSH is defined... yes
checking whether REQ_OP_DISCARD is defined... yes
checking whether REQ_OP_SECURE_ERASE is defined... yes
checking whether REQ_OP_FLUSH is defined... yes
checking whether bio->bi_opf is defined... yes
checking whether bio_set_op_attrs is available... yes
checking whether bio_set_dev() is available... yes
checking whether bio_set_dev() is GPL-only... yes
checking whether bio_set_dev() is a macro... no
checking whether bio_end_io_t wants 1 arg... yes
checking whether bio->bi_status exists... yes
checking whether bio has bi_iter... yes
checking whether submit_bio() wants 1 arg... yes
checking whether current->bio_list exists... yes
checking whether blkg_tryget() is available... no
checking whether bio->bi_bdev->bd_disk exists... yes
checking whether block_device_operations->submit_bio() returns void... yes
checking for existence of linux/blk-cgroup.h... yes
checking for 4-argument bio_alloc()... yes
checking whether blkdev_get_by_path() exists... yes
checking whether blkdev_put() exists... yes
checking whether blkdev_reread_part() exists... no
checking whether invalidate_bdev() exists... yes
checking whether lookup_bdev() wants dev_t arg... yes
checking whether bdev_logical_block_size() is available... yes
checking whether bdev_physical_block_size() is available... yes
checking whether check_disk_change() exists... no
checking whether bdev_check_media_change() exists... yes
checking whether bdev_whole() is available... yes
checking whether blkdev_get_by_path() handles ERESTARTSYS... no
checking whether struct blk_plug is available... yes
checking whether blk_queue bdi is dynamic... no
checking whether blk_queue_update_readahead() exists... checking whether disk_update_readahead() exists... yes
checking whether blk_queue_discard() is available... yes
checking whether blk_queue_secure_erase() is available... yes
checking whether blk_queue_flag_set() exists... yes
checking whether blk_queue_flag_clear() exists... yes
checking whether blk_queue_flush() is available... no
checking whether blk_queue_write_cache() exists... yes
checking whether blk_queue_write_cache() is GPL-only... yes
checking whether blk_queue_max_hw_sectors() is available... yes
checking whether blk_queue_max_segments() is available... yes
checking whether GENHD_FL_EXT_DEVT flag is available... no
checking whether GENHD_FL_NO_PART flag is available... yes
checking whether revalidate_disk_size() is available... no
checking whether revalidate_disk() is available... no
checking whether get_disk_ro() is available... yes
checking whether generic_readlink is global... no
checking whether ql->discard_granularity is available... yes
checking whether inode_owner_or_capable() exists... no
checking whether inode_owner_or_capable() takes user_ns... yes
checking whether super_block uses const struct xattr_handler... yes
checking whether xattr_handler has name... yes
checking whether xattr_handler->get() wants dentry and inode... yes
checking whether xattr_handler->set() wants dentry, inode, and user_namespace... yes
checking whether xattr_handler->list() wants simple... yes
checking whether posix_acl_from_xattr() needs user_ns... yes
checking whether generic_setxattr() exists... no
checking whether posix_acl_release() is available... yes
checking whether posix_acl_release() is GPL-only... yes
checking whether set_cached_acl() is usable... yes
checking whether __posix_acl_chmod exists... yes
checking whether posix_acl_equiv_mode() wants umode_t... yes
checking whether posix_acl_valid() wants user namespace... yes
checking whether iops->get_acl() exists... yes
checking whether iops->set_acl() exists... yes
checking whether uncached_acl_sentinel() exists... yes
checking whether posix_acl has refcount_t... yes
checking whether iops->getattr() takes user_namespace... yes
checking whether inode_set_flags() exists... yes
checking whether inode_set_iversion() exists... yes
checking whether sops->show_options() wants dentry... yes
checking whether file_inode() is available... yes
checking whether file_dentry() is available... yes
checking whether fops->fsync() wants no dentry... no
checking whether fops->fsync() wants range... range
checking whether fops->aio_fsync() exists... no
checking whether sops->evict_inode() exists... yes
checking whether sops->dirty_inode() wants flags... yes
checking whether super_block has s_shrink... yes
checking whether shrink_control has nid... yes
checking whether new 2-argument shrinker exists... no
checking whether ->count_objects callback exists... yes
checking whether struct shrink_control exists... yes
checking whether iops->mkdir() takes struct user_namespace*... yes
checking whether iops->lookup() passes flags... yes
checking whether iops->create() takes struct user_namespace*... yes
checking whether iops->get_link() passes delayed... yes
checking whether i_op->tmpfile() exists... yes
checking whether dops->d_automount() exists... yes
checking whether eops->encode_fh() wants inode... yes
checking whether eops->commit_metadata() exists... yes
checking whether clear_inode() is available... yes
checking whether setattr_prepare() is available and accepts struct user_namespace*... yes
checking whether insert_inode_locked() is available... yes
checking whether d_make_root() is available... yes
checking whether d_obtain_alias() is available... yes
checking whether d_prune_aliases() is available... yes
checking whether d_set_d_op() is available... yes
checking whether dops->d_revalidate() takes struct nameidata... no
checking whether dentry uses const struct dentry_operations... yes
checking whether super_block has s_d_op... yes
checking whether truncate_setsize() is available... yes
checking whether security_inode_init_security wants callback... yes
checking whether fst->mount() exists... yes
checking whether super_setup_bdi_name() exists... yes
checking whether set_nlink() is available... yes
checking whether sget() wants 5 args... yes
checking whether lseek_execute() is available... no
checking filemap_dirty_folio exists... yes
checking whether vfs_getattr() wants 4 args... yes
checking whether vfs_getattr() wants 2 args... no
checking whether vfs_getattr() wants 3 args... no
checking whether vfs_fsync() wants 2 args... yes
checking whether fops->iterate_shared() is available... yes
checking whether aops->direct_IO() uses iov_iter... yes
checking whether fops->read/write_iter() are available... yes
checking whether new_sync_read/write() are available... no
checking whether generic_write_checks() takes kiocb... yes
checking whether iov_iter types are available... yes
checking whether iov_iter_advance() is available... yes
checking whether iov_iter_revert() is available... yes
checking whether iov_iter_fault_in_readable() is available... checking whether fault_in_iov_iter_readable() is available... yes
checking whether iov_iter_count() is available... yes
checking whether copy_to_iter() is available... yes
checking whether copy_from_iter() is available... yes
checking whether iov_iter_type() is available... yes
checking whether kmap_atomic wants 1 args... yes
checking whether follow_down_one() is available... yes
checking whether submit_bio is member of struct block_device_operations... yes
checking whether blk_alloc_disk() exists... yes
checking whether generic disk_*_io_acct() are available... yes
checking whether kernel fpu is available... internal with internal XSAVE
checking whether kernel defines fmode_t... yes
checking whether kuid_t/kgid_t is available... yes
checking whether i_(uid|gid)_(read|write) exist... yes
checking whether module_param_call() is hardened... yes
checking whether iops->rename() takes struct user_namespace*... yes
checking whether current_time() exists... yes
checking whether ns_capable exists... yes
checking whether has_capability() is available... yes
checking whether cred_t->user_ns exists... yes
checking whether kuid_has_mapping/kgid_has_mapping exist... yes
checking whether in_compat_syscall() is available... yes
checking whether ktime_get_coarse_real_ts64() exists... yes
checking whether ktime_get_raw_ts64() exists... yes
checking whether totalram_pages() exists... yes
checking whether totalhigh_pages() exists... yes
checking whether kstrtoul() exists... yes
checking whether percpu_counter_init() wants gfp_t... yes
checking whether percpu_counter_add_batch() is defined... yes
checking whether is inside percpu_ref.data... yes
checking whether CPU hotplug APIs exist... yes
checking whether generic_fillattr requires struct user_namespace*... yes
checking whether iops->mknod() takes struct user_namespace*... yes
checking whether iops->symlink() takes struct user_namespace*... yes
checking whether bio_max_segs() exists... yes
checking whether signal_stop() exists... yes
checking whether kernel_siginfo_t tyepedef exists... yes
checking for struct kobj_type.default_groups... yes
checking whether set_special_state() exists... yes
checking address_space_operations->readpages exists... no
checking __set_page_dirty_nobuffers exists... no
checking whether standalone <linux/stdarg.h> exists... yes
checking folio_wait_bit() exists... yes
checking whether add_disk() returns int... no
checking whether kthread_complete_and_exit() is available... yes
checking whether dequeue_signal() takes 4 arguments... yes
checking whether ZERO_PAGE() is GPL-only... no
checking whether __copy_from_user_inatomic is available... yes
checking os distribution... arch
checking default package type... tgz
checking default init directory... ${prefix}/etc/init.d
checking default init script type and shell... lsb:/bin/sh
checking default nfs server init script... nfs
checking default init config directory... /etc/default
checking whether initramfs-tools is available... no
checking whether rpm is available... no
checking whether rpmbuild is available... no
checking whether spec files are available... yes (rpm/generic/*.spec.in)
checking whether dpkg is available... no
checking whether dpkg-buildpackage is available... no
checking whether alien is available... no
checking whether assertion support will be enabled... no
checking whether debuginfo support will be forced... no
checking whether basic kmem accounting is enabled... no
checking whether detailed kmem tracking is enabled... no
checking whether FreeBSD kernel INVARIANTS checks are enabled... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating module/Kbuild
config.status: creating module/Makefile
config.status: creating module/avl/Makefile
config.status: creating module/icp/Makefile
config.status: creating module/lua/Makefile
config.status: creating module/nvpair/Makefile
config.status: creating module/os/linux/spl/Makefile
config.status: creating module/os/linux/zfs/Makefile
config.status: creating module/spl/Makefile
config.status: creating module/unicode/Makefile
config.status: creating module/zcommon/Makefile
config.status: creating module/zfs/Makefile
config.status: creating module/zstd/Makefile
config.status: creating zfs.release
config.status: creating zfs_config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing po-directories commands

Building module:
cleaning build area...
make -j2 KERNELRELEASE=5.18.0-seblu -C module/ CC=clang LD=ld.lld...............................................................................(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.18.0-seblu (x86_64)
Consult /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/make.log for more information.

# cat /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/make.log
DKMS make.log for zfs-2.1.4+65.r05147319b0 for kernel 5.18.0-seblu (x86_64)
sam. 11 juin 2022 15:17:49 CEST
make: Entering directory '/var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module'
list='icp lua zstd'; for td in $list; do make -C $td; done
make[1]: Entering directory '/var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp'
mkdir -p api core spi io os algs algs/aes algs/edonr algs/modes algs/sha1 algs/sha2 algs/skein asm-x86_64 asm-x86_64/aes asm-x86_64/modes asm-x86_64/sha1 asm-x86_64/sha2 asm-i386 asm-generic
make[1]: Leaving directory '/var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp'
make[1]: Entering directory '/var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua'
mkdir -p setjmp
make[1]: Leaving directory '/var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua'
make[1]: Entering directory '/var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zstd'
mkdir -p lib
make[1]: Leaving directory '/var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zstd'
make -C /usr/lib/modules/5.18.0-seblu/build  \
          \
        M="$PWD"  CONFIG_ZFS=m modules
make[1]: Entering directory '/usr/src/linux-5.18.0-seblu'
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/avl/avl.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-atomic.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-condvar.o
  AR [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/avl/zavl.o
  LD [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/avl/zavl.prelink.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/illumos-crypto.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-cred.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/api/kcf_cipher.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-err.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-generic.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/api/kcf_digest.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-kmem.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/api/kcf_mac.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-kmem-cache.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/api/kcf_miscapi.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-kstat.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/api/kcf_ctxops.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-proc.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/core/kcf_callprov.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-procfs-list.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-taskq.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/core/kcf_prov_tabs.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-thread.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/core/kcf_sched.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-trace.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-tsd.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/core/kcf_mech_tabs.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-vmem.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/core/kcf_prov_lib.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-xdr.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/../os/linux/spl/spl-zlib.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/spi/kcf_spi.o
  AR [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/spl.o
  LD [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/spl.prelink.o
/var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/spl/spl.prelink.o: warning: objtool: spl_kmem_cache_create()+0x516: unreachable instruction
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lapi.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/io/aes.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lauxlib.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/io/edonr_mod.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lbaselib.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/io/sha1_mod.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lcode.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/io/sha2_mod.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lcompat.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/io/skein_mod.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lcorolib.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/os/modhash.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lctype.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/os/modconf.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/ldebug.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/modes/cbc.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/ldo.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/modes/ccm.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lfunc.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/modes/ctr.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lgc.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/modes/ecb.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/modes/gcm_generic.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/llex.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/modes/gcm.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lmem.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lobject.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/modes/modes.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/aes/aes_impl_generic.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lopcodes.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lparser.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/aes/aes_impl.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/aes/aes_modes.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lstate.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/edonr/edonr.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lstring.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/sha1/sha1.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lstrlib.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/sha2/sha2.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/ltable.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/skein/skein.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/skein/skein_block.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/ltablib.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/skein/skein_iv.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/asm-x86_64/aes/aeskey.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/ltm.o
  AS [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/asm-x86_64/aes/aes_amd64.o
  AS [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/asm-x86_64/aes/aes_aesni.o
  AS [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/asm-x86_64/modes/gcm_pclmulqdq.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lvm.o
  AS [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.o
  AS [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/asm-x86_64/modes/ghash-x86_64.o
  AS [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/asm-x86_64/sha1/sha1-x86_64.o
  AS [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/asm-x86_64/sha2/sha256_impl.o
  AS [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/asm-x86_64/sha2/sha512_impl.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/modes/gcm_pclmulqdq.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/lzio.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/aes/aes_impl_aesni.o
  AS [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/setjmp/setjmp.o
  AR [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/zlua.o
  LD [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/zlua.prelink.o
/var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/lua/zlua.prelink.o: warning: objtool: luaG_runerror()+0x171: unreachable instruction
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/nvpair/nvpair.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/algs/aes/aes_impl_x86-64.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/nvpair/fnvpair.o
  AR [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/icp.o
  LD [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/icp.prelink.o
/var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/icp/icp.prelink.o: warning: objtool: can't decode instruction at .text:0x37a2
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/nvpair/nvpair_alloc_spl.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/unicode/u8_textprep.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/nvpair/nvpair_alloc_fixed.o
  AR [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/nvpair/znvpair.o
  LD [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/nvpair/znvpair.prelink.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/cityhash.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/unicode/uconv.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zfeature_common.o
  AR [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/unicode/zunicode.o
  LD [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/unicode/zunicode.prelink.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zfs_comutil.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/abd.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zfs_deleg.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/aggsum.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zfs_fletcher.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/arc.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zfs_fletcher_superscalar.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zfs_fletcher_superscalar4.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zfs_namecheck.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/blkptr.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zfs_prop.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/bplist.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zpool_prop.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/bpobj.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zprop_common.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/bptree.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zfs_fletcher_intel.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zfs_fletcher_sse.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/btree.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zfs_fletcher_avx512.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/bqueue.o
  AR [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zcommon.o
  LD [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zcommon/zcommon.prelink.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zstd/zfs_zstd.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dataset_kstats.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zstd/lib/zstd.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dbuf.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dbuf_stats.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/ddt.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/ddt_zap.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dmu.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dmu_diff.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dmu_object.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dmu_objset.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zstd/zstd_sparc.o
  AR [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zstd/zzstd.o
  LD [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zstd/zzstd.prelink.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dmu_recv.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dmu_redact.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dmu_send.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dmu_traverse.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dmu_tx.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dmu_zfetch.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dnode.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dnode_sync.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dsl_bookmark.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dsl_crypt.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dsl_dataset.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dsl_deadlist.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dsl_deleg.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dsl_destroy.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dsl_dir.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dsl_pool.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dsl_prop.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dsl_scan.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dsl_synctask.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/dsl_userhold.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/edonr_zfs.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/fm.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/gzip.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/hkdf.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/lz4.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/lzjb.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/metaslab.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/mmp.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/multilist.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/objlist.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/pathname.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/range_tree.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/refcount.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/rrwlock.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/sa.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/sha256.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/skein_zfs.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/spa.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/spa_boot.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/spa_checkpoint.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/spa_config.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/spa_errlog.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/spa_history.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/spa_log_spacemap.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/spa_misc.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/spa_stats.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/space_map.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/space_reftree.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/txg.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/uberblock.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/unique.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_cache.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_draid.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_draid_rand.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_indirect.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_indirect_births.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_indirect_mapping.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_initialize.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_label.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_mirror.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_missing.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_queue.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_raidz.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_raidz_math.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_raidz_math_scalar.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_rebuild.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_removal.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_root.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_trim.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zap.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zap_leaf.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zap_micro.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zcp.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zcp_get.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zcp_global.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zcp_iter.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zcp_set.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zcp_synctask.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zfeature.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zfs_byteswap.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zfs_fm.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zfs_fuid.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zfs_ioctl.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zfs_log.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zfs_onexit.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zfs_quota.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zfs_ratelimit.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zfs_replay.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zfs_rlock.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zfs_sa.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zfs_vnops.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zil.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zio.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zio_checksum.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zio_compress.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zio_inject.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zle.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zrlock.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zthr.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/zvol.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/abd_os.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/arc_os.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/mmp_os.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/policy.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/trace.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/qat.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/qat_compress.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/qat_crypt.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/spa_misc_os.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/vdev_disk.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/vdev_file.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zfs_acl.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zfs_ctldir.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zfs_debug.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zfs_dir.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zfs_file_os.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zfs_ioctl_os.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zfs_racct.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zfs_sysfs.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zfs_uio.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zfs_vfsops.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zfs_vnops_os.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zfs_znode.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zio_crypt.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zpl_ctldir.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zpl_export.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zpl_file.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zpl_inode.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zpl_super.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zpl_xattr.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zvol_os.o
  CC [M]  /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/vdev_raidz_math_sse2.o
/var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zvol_os.c:1111:3: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunus
ed-result]
                add_disk(zv->zv_zso->zvo_disk);
                ^~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[3]: *** [scripts/Makefile.build:288: /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs/../os/linux/zfs/zvol_os.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:550: /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module/zfs] Error 2
make[1]: *** [Makefile:1834: /var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module] Error 2
make[1]: Leaving directory '/usr/src/linux-5.18.0-seblu'
make: *** [Makefile:55: modules-Linux] Error 2
make: Leaving directory '/var/lib/dkms/zfs/2.1.4+65.r05147319b0/build/module'
ptr1337 commented 2 years ago

@seblu Did you built the kernel with THIN/LTO ? Also I think you need to update to the latest 2.1.5 staging commit for 5.18

seblu commented 2 years ago

Yes, built with Thin/LTO.

# modprobe configs
# zgrep -i LTO /proc/config.gz
CONFIG_LTO=y
CONFIG_LTO_CLANG=y
CONFIG_ARCH_SUPPORTS_LTO_CLANG=y
CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y
CONFIG_HAS_LTO_CLANG=y
# CONFIG_LTO_NONE is not set
# CONFIG_LTO_CLANG_FULL is not set
CONFIG_LTO_CLANG_THIN=y
CONFIG_HID_WALTOP=m

I was using commit 05147319b0821f61fcff743e20605e191d523906 and its works on 5.18

# modinfo zfs
filename:       /lib/modules/5.18.0-seblu/updates/dkms/zfs.ko.zst
alias:          char-major-10-249
alias:          devname:zfs
description:    ZFS
author:         OpenZFS
license:        CDDL
version:        2.1.4-1
vermagic:       5.18.0-seblu SMP preempt mod_unload 
name:           zfs
retpoline:      Y
depends:        zcommon,spl,icp,zunicode,zzstd,znvpair,zlua,zavl
srcversion:     ED0C25C4DB2EC97D3BC6FEB

In order to built I needed to patch module/Kbuild.in

diff --git a/module/Kbuild.in b/module/Kbuild.in
index 14f236281..9f09d5e62 100644
--- a/module/Kbuild.in
+++ b/module/Kbuild.in
@@ -4,6 +4,7 @@

 ZFS_MODULE_CFLAGS += -std=gnu99 -Wno-declaration-after-statement
 ZFS_MODULE_CFLAGS += -Wmissing-prototypes
+ZFS_MODULE_CFLAGS += -Wno-unused-result
 ZFS_MODULE_CFLAGS += @KERNEL_DEBUG_CFLAGS@  @NO_FORMAT_ZERO_LENGTH@

 ifneq ($(KBUILD_EXTMOD),)
szubersk commented 2 years ago

@seblu thanks for reporting this, I just fixed that in #13551. @ptr1337 I can't help unless full reproduction procedure is provided. For now I can only say that I did not reproduce the bug.

ptr1337 commented 2 years ago

@szubersk Actually it would be possible to reproduce the bug in a vm. The pkgbuild which I linked above, enabling their llvm thinlto, compile it.

The compile itself works completly fine, also the packaging. When installing the package mkinitcpio is reporting also that the zfs module is found. If rebooting it simply freezes at loading intrafms.

I talk about the bug which does effect the built in module.

The module which is build here: https://github.com/CachyOS/linux-cachyos/blob/master/linux-cachyos-bmq/PKGBUILD#L666-L682

Works fine with FULL LTO, THIN LTO and gcc.

At the built in module I tried several different upstream commits, configuration, .. but never had any success, only if I built just with clang without lto - then it boots without problems.

yshui commented 2 years ago

dkms can now auto detect kernel built with LLVM and pass LLVM=1 to make. Problem is zfs has a configuration phrase which doesn't get this.

I have kernel built with and without LLVM so I don't want to hardcode LLVM=1 in dkms.conf

simonbcn commented 1 year ago

I am trying to create an AUR package for linux-xanmod compiled with Clang, but configure step fails:

    ./configure CC=clang LD=ld.lld LLVM=1 LLVM_IAS=1 KERNEL_LLVM=1 --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --libdir=/usr/lib \
                --datadir=/usr/share --includedir=/usr/include --with-udevdir=/usr/lib/udev \
                --libexecdir=/usr/lib --with-config=kernel \
                --with-linux=/usr/lib/modules/${_extramodules}/build \
                --with-linux-obj=/usr/lib/modules/${_extramodules}/build
ptr1337 commented 1 year ago

I am trying to create an AUR package for linux-xanmod compiled with Clang, but configure step fails:

    ./configure CC=clang LD=ld.lld LLVM=1 LLVM_IAS=1 KERNEL_LLVM=1 --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --libdir=/usr/lib \
                --datadir=/usr/share --includedir=/usr/include --with-udevdir=/usr/lib/udev \
                --libexecdir=/usr/lib --with-config=kernel \
                --with-linux=/usr/lib/modules/${_extramodules}/build \
                --with-linux-obj=/usr/lib/modules/${_extramodules}/build

Actually compiling the module works well. Dont know if xanmod is changing anything. But my custom kernel works well: https://github.com/CachyOS/linux-cachyos/blob/master/linux-cachyos-bore/PKGBUILD#L900-L906

szubersk commented 1 year ago

I am trying to create an AUR package for linux-xanmod compiled with Clang, but configure step fails:

Please share the complete error message.

simonbcn commented 1 year ago

Does specifying KERNEL_LLVM=1 in configure step already select Clang as compiler and activate LTO?

output of configure: https://gist.github.com/simonbcn/b510ff727d9532e803efdf684a3ae02a

simonbcn commented 1 year ago

Ok, If I set KERNEL_LLVM=1 in the configure step it does compile, but the ZFS modules are still compiled with gcc and without LTO.

0uep commented 1 year ago

I did not succeed in building the current ZFS master branch using the following combinations:

Please use/hack the following Dockerfile to easily reproduce this issue:
docker build .

Did I miss something?

# Debian bookworm (testing) ships Clang-13, Clang-14 and Clang-15
FROM docker.io/debian:bookworm-20230202-slim

# Install Git
RUN apt-get update && apt-get install -y git

# Kernel version: v5.18.19, v6.1.10 ...
ARG vLinux=v5.18.19 

# Clone Linux and ZFS repositories
RUN git clone -b $vLinux --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
RUN git clone -b master --depth 1 https://github.com/zfsonlinux/zfs

# LLVM version: 13, 14 or 15
ARG v=13

# Install the dependencies to build the Linux kernel with LLVM (clang + lld)
RUN apt-get install -y \
    bc \
    bison \
    build-essential \
    clang-$v \
    flex \
    libelf-dev \
    lld-$v

# Configure the Linux kernel with LLVM/Clang
RUN cd linux && \
  make defconfig && \
  make prepare CC=clang-$v LLVM=-$v

# Install the dependencies to build ZFS with Clang
RUN apt-get install -y \
    alien \
    autoconf \
    automake \
    dkms \
    fakeroot \
    gawk \
    libaio-dev \
    libattr1-dev \
    libblkid-dev \
    libcurl4-openssl-dev \
    libffi-dev \
    libssl-dev \
    libtool \
    python3 \
    python3-dev \
    python3-packaging \
    uuid-dev \
    zlib1g-dev

RUN zfs/autogen.sh

RUN cd zfs && \
  export CC=clang-$v && \
  export LD=lld-$v && \
  export LLVM=-$v && \
  KERNEL_CC=$CC KERNEL_LD=$LD KERNEL_LLVM=$LLVM \
    ./configure -v \
    --enable-linux-builtin=yes \
    --includedir=/linux/include \
    --with-linux=/linux \
    --with-linux-obj=/linux

RUN make -C zfs -j 1 V=1

Last logs

mv -f lib/libzfs_core/os/linux/.deps/libzfs_core_la-libzfs_core_ioctl.Tpo lib/libzfs_core/os/linux/.deps/libzfs_core_la-libzfs_core_ioctl.Plo
/bin/bash ./libtool  --tag=CC --silent  --mode=link clang-13 -std=gnu99 -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wno-sign-compare -Wno-missing-field-initializers -fno-strict-aliasing -fno-omit-frame-pointer -Wimplicit-fallthrough     -Wno-format-zero-length  -no-suppress -fvisibility=hidden -g -O2 -pthread -Wl,-z,defs -version-info 3:0:0  -o libzfs_core.la -rpath /usr/local/lib lib/libzfs_core/libzfs_core_la-libzfs_core.lo lib/libzfs_core/os/linux/libzfs_core_la-libzfs_core_ioctl.lo   libnvpair.la libspl.la
/bin/bash ./libtool  --tag=CC --silent  --mode=link clang-13 -std=gnu99 -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wno-sign-compare -Wno-missing-field-initializers -fno-strict-aliasing -fno-omit-frame-pointer -Wimplicit-fallthrough     -Wno-format-zero-length    -Wframe-larger-than=4096 -g -O2      -o raidz_test cmd/raidz_test/raidz_test-raidz_bench.o cmd/raidz_test/raidz_test-raidz_test.o libzpool.la libzfs_core.la -lm 
    clang: error: no such file or directory: './.libs/libzpool.so'
    clang: error: no such file or directory: './.libs/libzfs_core.so'
0uep commented 1 year ago

I forked the zfs repo to investigate this Clang issue. The Dockerfile has been improved and contains the full make check output: https://github.com/0uep/zfs/blob/master/Dockerfile Any help/encouragement/support is appreciated. :smiley: :pray:

0uep commented 1 year ago

:trophy: Dockerfile + docker-compose.yml :heavy_check_mark:

The command docker compose build successfully builds Linux-6.1.10 + ZFS (DKMS) with all these combinations:

But make deb still fails :cry:

Copy of Dockerfile

# Debian bookworm (testing) ships Clang-13, Clang-14 and Clang-15
FROM docker.io/debian:bookworm-20230202-slim

# Install Git
RUN apt-get update && \
    apt-get install -y --no-install-recommends git

# Install the dependencies to configure the Linux kernel (except the compiler and linker)
RUN apt-get install -y --no-install-recommends \
      bc \
      bison \
      cpio \
      flex \
      kmod \
      libelf-dev \
      libssl-dev:native \
      make

# Optional: Install the dependencies to build the Linux kernel as a Debian package
RUN apt-get install -y --no-install-recommends \
      build-essential:native \
      rsync

# Install the dependencies to build ZFS
RUN apt-get install -y --no-install-recommends \
      alien \
      autoconf \
      automake \
      dkms \
      fakeroot \
      gawk \
      libaio-dev \
      libattr1-dev \
      libblkid-dev \
      libcurl4-openssl-dev \
      libffi-dev \
      libssl-dev \
      libtool \
      python3 \
      python3-dev \
      python3-packaging \
      uuid-dev \
      zlib1g-dev

# Kernel version: v5.18.19, v6.1.10 ...
ARG vLinux=v6.1.10 

# Clone Linux repo
RUN git clone -b $vLinux --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

# Version of LLVM, can "-13", "-14", "-15" or "" (empty for GCC)
ARG LLVM=-15

# if LLVM is set, use llvmPkg=llvm$LLVM
ARG llvmPkg=llvm$LLVM

# Compiler, can be: gcc-10 gcc-11 gcc-12 clang-13 clang-14 clang-15
ARG CC=clang-15

# Linker, can be: lld-13 lld-14 lld-15 or empty
ARG ldPkg=lld-15
ARG LD=ld.$ldPkg

# Install the build chain: compiler, linker...
RUN apt-get install -y --no-install-recommends \
      $CC \
      $ldPkg \
      $llvmPkg

# Configure the Linux kernel
RUN cd linux && \
    make defconfig prepare CC=$CC LD=$LD LLVM=$LLVM && \
    grep ^CONFIG_BLOCK=y .config

# Optional: Build the Linux kernel as a Debian package
RUN cd linux && \
    make -j $(nproc --all) bindeb-pkg CC=$CC LD=$LD LLVM=$LLVM

WORKDIR /zfs

COPY . .

RUN ./autogen.sh

RUN set -x && \
    d=$(cd ../linux && pwd) && \
    export CC=$CC && \
    export LD=$LD && \
    export LLVM=$LLVM && \
    KERNEL_CC=$CC KERNEL_LD=$LD KERNEL_LLVM=$LLVM \
          ./configure -v \
          --enable-linux-builtin=yes \
          --includedir=$d/include \
          --with-linux=$d \
          --with-linux-obj=$d

RUN make -j $(nproc --all)

#   # Install the dependencies to build ZFS as a Debian package
#   RUN apt-get install -y --no-install-recommends \
#         python3-cffi \
#         python3-setuptools
#   
#   RUN make -j $(nproc --all) deb
szubersk commented 1 year ago

Does specifying KERNEL_LLVM=1 in configure step already select Clang as compiler and activate LTO? output of configure: https://gist.github.com/simonbcn/b510ff727d9532e803efdf684a3ae02a

This is a clang issue; please report a bug to them.

Ok, If I set KERNEL_LLVM=1 in the configure step it does compile, but the ZFS modules are still compiled with gcc and without LTO.

LTO has to be enabled in the kernel configuration, not in OpenZFS. How do you know that ZFS modules are compiled with GCC and without LTO?

szubersk commented 1 year ago

@0uep please try the Dockerfile below

# Debian bookworm (testing) ships Clang-13, Clang-14 and Clang-15
FROM docker.io/debian:bookworm-20230202-slim

# Version of LLVM, can "-13", "-14", "-15" or "" (empty for GCC)
ARG LLVM=-15

# if LLVM is set, use llvmPkg=llvm$LLVM
ARG llvmPkg=llvm$LLVM

# Compiler, can be: gcc-10 gcc-11 gcc-12 clang-13 clang-14 clang-15
ARG CC=clang$LLVM

# Linker, can be: lld-13 lld-14 lld-15 or empty
ARG ldPkg=lld$LLVM
ARG LD=ld.$ldPkg

# Install the dependencies to configure the Linux kernel (except the compiler and linker)
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
      bc \
      bison \
      cpio \
      flex \
      kmod \
      git \
      libelf-dev \
      libssl-dev:native \
      make \
      build-essential:native \
      rsync \
      alien \
      autoconf \
      automake \
      dkms \
      fakeroot \
      gawk \
      libaio-dev \
      libattr1-dev \
      libblkid-dev \
      libcurl4-openssl-dev \
      libffi-dev \
      libssl-dev \
      libtool \
      python3 \
      python3-dev \
      python3-packaging \
      python3-cffi \
      python3-setuptools \
      uuid-dev \
      zlib1g-dev \
      $CC \
      $ldPkg \
      $llvmPkg && \
    apt-get clean

RUN cd linux && \
     make LLVM=$LLVM defconfig prepare && \
     grep ^CONFIG_BLOCK=y .config && \
     make LLVM=$LLVM -j $(nproc --all) bindeb-pkg && \
     dpkg -i ../*.deb

WORKDIR /zfs

# install ZFS sources here

RUN set -x && \
    ./autogen.sh && \
    ./configure -v KERNEL_LLVM=$LLVM \
    make -j $(nproc --all) deb
0uep commented 1 year ago

Hi @szubersk

Thank you for your help. Please tell what you have changed (I do not see/understand your fixes).

Sorry for not pointing out my latest attempts, which I posted on 12 March:

Documentation

https://github.com/0uep/zfs/blob/main/README.md

Dockerfile to be used with podman or docker build -t linux-with-zfs-builtin .

https://github.com/0uep/zfs/blob/main/Dockerfile

Tricky Dockerfile to be used with docker build -t linux-with-zfs-builtin -f Dockerfile.ccache .

https://github.com/0uep/zfs/blob/main/Dockerfile.ccache