Closed
Description
System information
Type | Version/Name |
---|---|
Distribution Name | Gentoo |
Distribution Version | N/A |
Linux Kernel | 5.9.15 |
Architecture | sparc64 |
ZFS Version | 2.0.4 |
SPL Version | 2.0.4 |
Describe the problem you're observing
ZFS codebase includes some byteswapping routines (mainly, in zstd code) that are implemented as __builtin_bswap32
/__builtin_bswap64
, which then gets compiled into __bswapsi2
and __bswapdi2
libgcc calls. Those are missing when compiling as a kernel module, so I'm getting errors like these:
ERROR: modpost: "__bswapdi2" [/zfs/module/zstd/zzstd.ko] undefined!
ERROR: modpost: "__bswapsi2" [/zfs/module/zstd/zzstd.ko] undefined!
I decided to file it here since it only happens when zstd is built as part of ZFS, but please let me know if I should file this to zstd people instead :)
Describe how to reproduce the problem
Build ZFS as usual on a sparc64 machine:
$ git clone https://github.com/openzfs/zfs && cd zfs
$ git checkout zfs-2.0.4
$ ./autogen.sh && ./configure && make
Include any warning/errors/backtraces from the system logs
MODPOST /zfs/module/Module.symvers
ERROR: modpost: "__bswapdi2" [/zfs/module/zstd/zzstd.ko] undefined!
ERROR: modpost: "__bswapsi2" [/zfs/module/zstd/zzstd.ko] undefined!
make[4]: *** [scripts/Makefile.modpost:111: /zfs/module/Module.symvers] Error 1
make[4]: *** Deleting file '/zfs/module/Module.symvers'
make[3]: *** [Makefile:1714: modules] Error 2
make[3]: Leaving directory '/usr/src/linux-5.10.27-gentoo'
make[2]: *** [Makefile:48: modules-Linux] Error 2
make[2]: Leaving directory '/zfs/module'
make[1]: *** [Makefile:883: all-recursive] Error 1
make[1]: Leaving directory '/zfs'
make: *** [Makefile:744: all] Error 2