openzfs / spl

A shim layer which adds the core interfaces required for OpenZFS.
https://zfsonlinux.org/
GNU General Public License v2.0
282 stars 181 forks source link

Build fails on kernel version 5.4 and above. #719

Closed pgwipeout closed 4 years ago

pgwipeout commented 4 years ago

System information

Type Version/Name
Distribution Name Ubuntu Eoan
Distribution Version 19.10
Linux Kernel 5.4.11
Architecture aarch64
ZFS Version 0.8.1
SPL Version

Describe the problem you're observing

zfs_dkms package fails to build due to kernel changes introduced in v5.4-rc1.

commit ce6595a28a15c874aee374757dcd08f537d7b24d
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Sun Jul 14 16:42:44 2019 -0400

    kill the last users of user_{path,lpath,path_dir}()

    old wrappers with few callers remaining; put them out of their misery...

    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Removed user_path_dir from include/linux/namei.h This breaks building of spl, as spl-vnode.c uses this function.

Describe how to reproduce the problem

Attempt to install zfs_dkms on Ubuntu Eoan running a v5.4 or above kernel.

Include any warning/errors/backtraces from the system logs

Unpacking zfs-dkms (0.8.1-1ubuntu14.3) ...
Setting up zfs-dkms (0.8.1-1ubuntu14.3) ...
Loading new zfs-0.8.1 DKMS files...
Building for 5.4.11-00006-g887426577d1c
Building initial module for 5.4.11-00006-g887426577d1c
Error! Bad return status for module build on kernel: 5.4.11-00006-g887426577d1c (aarch64)
Consult /var/lib/dkms/zfs/0.8.1/build/make.log for more information.
dpkg: error processing package zfs-dkms (--configure):
 installed zfs-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 zfs-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
CC [M]  /var/lib/dkms/zfs/0.8.1/build/module/zfs/cityhash.o
/var/lib/dkms/zfs/0.8.1/build/module/spl/spl-vnode.c: In function ‘vn_set_pwd’:
/var/lib/dkms/zfs/0.8.1/build/module/spl/spl-vnode.c:683:7: error: implicit declaration of function ‘user_path_dir’; did you mean ‘user_path_at’? [-Werror=implicit-function-declaration]
  683 |  rc = user_path_dir(filename, &path);
      |       ^~~~~~~~~~~~~
      |       user_path_at
  CC [M]  /var/lib/dkms/zfs/0.8.1/build/module/zfs/dbuf.o
cc1: some warnings being treated as errors
  CC [M]  /var/lib/dkms/zfs/0.8.1/build/module/zfs/dbuf_stats.o
make[5]: *** [scripts/Makefile.build:265: /var/lib/dkms/zfs/0.8.1/build/module/spl/spl-vnode.o] Error 1
make[4]: *** [scripts/Makefile.build:509: /var/lib/dkms/zfs/0.8.1/build/module/spl] Error 2
make[4]: *** Waiting for unfinished jobs....
behlendorf commented 4 years ago

Closing. The SPL has been incorporated in to the ZFS repository.