Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build zfs kernel modules for 4.18.1 #7806

Closed
steven-omaha opened this issue Aug 18, 2018 · 4 comments
Closed

Can't build zfs kernel modules for 4.18.1 #7806

steven-omaha opened this issue Aug 18, 2018 · 4 comments

Comments

@steven-omaha
Copy link

System information

Type Version/Name
Distribution Name Arch Linux
Distribution Version current (rolling release)
Linux Kernel 4.18.1
Architecture x86_64
ZFS Version 0.7.9
SPL Version 0.7.9

Describe the problem you're observing

Can't compile the zfs-modules for 4.18.1. Works fine for 4.14.63 (LTS). Also worked until the latest 4.17.14.

Describe how to reproduce the problem

$ sudo dkms install spl/0.7.9 -k 4.18.1-arch1-1-ARCH

Include any warning/errors/backtraces from the system logs

#
Kernel preparation unnecessary for this kernel.  Skipping...

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 thread-safe mkdir -p... /bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
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 we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to print strings... printf
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 gcc... /bin/ld
checking if the linker (/bin/ld) 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-gn
checking how to convert x86_64-pc-linux-gnu file names to toolchain format..
checking for /bin/ld option to reload object files... -r
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 gcc 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 how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/bin/ld -m elf_x86_64) supports shared libr
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 spl author... OpenZFS on Linux
checking spl license... GPL
checking linux distribution... arch
checking default package type... tgz
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 spl config... kernel
checking kernel source directory... /usr/lib/modules/4.18.1-arch1-1-ARCH/bui
checking kernel build directory... /usr/lib/modules/4.18.1-arch1-1-ARCH/buil
checking kernel source version... 4.18.1-arch1-1-ARCH
checking kernel file name for module symbols... Module.symvers
checking whether modules can be built... yes
checking whether atomic types use spinlocks... no
checking whether kernel defines atomic64_t... yes
checking whether old 2-argument shrinker exists... no
checking whether old 3-argument shrinker exists... no
checking whether new 2-argument shrinker exists... no
checking whether ->count_objects callback exists... yes
checking whether struct ctl_table has ctl_name... no
checking whether CONFIG_TRIM_UNUSED_KSYM is disabled... yes
checking whether PDE_DATA() is available... yes
checking whether set_fs_pwd() requires const struct path *... yes
checking whether vfs_fsync() wants 2 args... yes
checking whether truncate_range() inode operation is available... no
checking whether struct fs_struct uses spinlock_t... yes
checking whether kuid_t/kgid_t is available... yes; mandatory
checking whether fops->fallocate() exists... yes
checking whether iops->fallocate() exists... no
checking whether fops->fallocate() exists... no
checking whether CONFIG_ZLIB_INFLATE is defined... yes
checking whether CONFIG_ZLIB_DEFLATE is defined... yes
checking whether zlib_deflate_workspacesize() wants 2 args... yes
checking whether struct shrink_control exists... yes
checking whether struct rw_semaphore member wait_lock is raw... 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 vfs_getattr() wants 4 args... yes
checking whether vfs_getattr() wants 3 args... no
checking whether vfs_getattr() wants 2 args... no
checking whether usleep_range() is available... yes
checking whether struct kmem_cache has allocflags... no
checking whether struct kmem_cache has gfpflags... no
checking whether wait_on_bit() takes an action... no
checking whether inode_lock_shared() exists... yes
checking whether group_info->gid exists... yes
checking whether kmem_cache_create_usercopy() exists... yes
checking whether wait_queue_entry_t exists... yes
checking whether wq_head->head and wq_entry->entry exist... yes
checking whether io_schedule_timeout() is available... yes
checking whether kernel_write() takes loff_t pointer... yes
checking whether kernel_read() takes loff_t pointer... yes
checking whether timer_list.function gets a timer_list... yes
checking whether debugging is enabled... no
checking whether basic kmem accounting is enabled... no
checking whether detailed kmem tracking is enabled... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating man/Makefile
config.status: creating man/man1/Makefile
config.status: creating man/man5/Makefile
config.status: creating lib/Makefile
config.status: creating cmd/Makefile
config.status: creating cmd/splat/Makefile
config.status: creating cmd/splslab/Makefile
config.status: creating module/Makefile
config.status: creating module/spl/Makefile
config.status: creating module/splat/Makefile
config.status: creating include/Makefile
config.status: creating include/fs/Makefile
config.status: creating include/linux/Makefile
config.status: creating include/rpc/Makefile
config.status: creating include/sharefs/Makefile
config.status: creating include/sys/Makefile
config.status: creating include/sys/fm/Makefile
config.status: creating include/sys/fs/Makefile
config.status: creating include/util/Makefile
config.status: creating include/vm/Makefile
config.status: creating scripts/Makefile
config.status: creating rpm/Makefile
config.status: creating rpm/redhat/Makefile
config.status: creating rpm/redhat/spl.spec
config.status: creating rpm/redhat/spl-kmod.spec
config.status: creating rpm/redhat/spl-dkms.spec
config.status: creating rpm/generic/Makefile
config.status: creating rpm/generic/spl.spec
config.status: creating rpm/generic/spl-kmod.spec
config.status: creating rpm/generic/spl-dkms.spec
config.status: creating spl.release
config.status: creating spl_config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Building module:
cleaning build area...
make -j12 KERNELRELEASE=4.18.1-arch1-1-ARCH...(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.18.1-arch1-1-ARCH (x8
Consult /var/lib/dkms/spl/0.7.9/build/make.log for more information.

DKMS make.log for spl-0.7.9 for kernel 4.18.1-arch1-1-ARCH (x86_64)
Sat Aug 18 15:43:45 CEST 2018
make  all-recursive
make[1]: Entering directory '/var/lib/dkms/spl/0.7.9/build'
Making all in include
make[2]: Entering directory '/var/lib/dkms/spl/0.7.9/build/include'
Making all in fs
make[3]: Entering directory '/var/lib/dkms/spl/0.7.9/build/include/fs'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/include/fs'
Making all in linux
make[3]: Entering directory '/var/lib/dkms/spl/0.7.9/build/include/linux'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/include/linux'
Making all in rpc
make[3]: Entering directory '/var/lib/dkms/spl/0.7.9/build/include/rpc'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/include/rpc'
Making all in sharefs
make[3]: Entering directory '/var/lib/dkms/spl/0.7.9/build/include/sharefs'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/include/sharefs'
Making all in sys
make[3]: Entering directory '/var/lib/dkms/spl/0.7.9/build/include/sys'
Making all in fm
make[4]: Entering directory '/var/lib/dkms/spl/0.7.9/build/include/sys/fm'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/include/sys/fm'
Making all in fs
make[4]: Entering directory '/var/lib/dkms/spl/0.7.9/build/include/sys/fs'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/include/sys/fs'
make[4]: Entering directory '/var/lib/dkms/spl/0.7.9/build/include/sys'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/include/sys'
make[3]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/include/sys'
Making all in util
make[3]: Entering directory '/var/lib/dkms/spl/0.7.9/build/include/util'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/include/util'
Making all in vm
make[3]: Entering directory '/var/lib/dkms/spl/0.7.9/build/include/vm'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/include/vm'
make[3]: Entering directory '/var/lib/dkms/spl/0.7.9/build/include'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/include'
make[2]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/include'
Making all in rpm
make[2]: Entering directory '/var/lib/dkms/spl/0.7.9/build/rpm'
Making all in generic
make[3]: Entering directory '/var/lib/dkms/spl/0.7.9/build/rpm/generic'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/rpm/generic'
Making all in redhat
make[3]: Entering directory '/var/lib/dkms/spl/0.7.9/build/rpm/redhat'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/rpm/redhat'
make[3]: Entering directory '/var/lib/dkms/spl/0.7.9/build/rpm'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/rpm'
make[2]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/rpm'
Making all in module
make[2]: Entering directory '/var/lib/dkms/spl/0.7.9/build/module'
make -C /usr/lib/modules/4.18.1-arch1-1-ARCH/build SUBDIRS=`pwd`  CONFIG_SPL=m modules
make[3]: Entering directory '/usr/lib/modules/4.18.1-arch1-1-ARCH/build'
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/spl/spl-proc.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-ctl.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/spl/spl-kmem.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-kmem.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-taskq.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/spl/spl-kmem-cache.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/spl/spl-vmem.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-random.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-mutex.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/spl/spl-thread.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-condvar.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/spl/spl-taskq.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-thread.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-rwlock.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/spl/spl-rwlock.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-time.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/spl/spl-vnode.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-vnode.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/spl/spl-err.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-kobj.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-atomic.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/spl/spl-kobj.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-list.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/spl/spl-generic.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-generic.o
/var/lib/dkms/spl/0.7.9/build/module/spl/spl-vnode.c: In function ‘vn_getattr’:
/var/lib/dkms/spl/0.7.9/build/module/spl/spl-vnode.c:308:16: error: incompatible types when assigning to type ‘struct timespec’ from type ‘struct timespec64’
  vap->va_atime = stat.atime;
                ^
/var/lib/dkms/spl/0.7.9/build/module/spl/spl-vnode.c:309:16: error: incompatible types when assigning to type ‘struct timespec’ from type ‘struct timespec64’
  vap->va_mtime = stat.mtime;
                ^
/var/lib/dkms/spl/0.7.9/build/module/spl/spl-vnode.c:310:16: error: incompatible types when assigning to type ‘struct timespec’ from type ‘struct timespec64’
  vap->va_ctime = stat.ctime;
                ^
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/spl/spl-atomic.o
make[5]: *** [scripts/Makefile.build:317: /var/lib/dkms/spl/0.7.9/build/module/spl/spl-vnode.o] Error 1
make[5]: *** Waiting for unfinished jobs....
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-cred.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-zlib.o
  CC [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat-linux.o
  LD [M]  /var/lib/dkms/spl/0.7.9/build/module/splat/splat.o
make[4]: *** [scripts/Makefile.build:558: /var/lib/dkms/spl/0.7.9/build/module/spl] Error 2
make[3]: *** [Makefile:1500: _module_/var/lib/dkms/spl/0.7.9/build/module] Error 2
make[3]: Leaving directory '/usr/lib/modules/4.18.1-arch1-1-ARCH/build'
make[2]: *** [Makefile:11: modules] Error 2
make[2]: Leaving directory '/var/lib/dkms/spl/0.7.9/build/module'
make[1]: *** [Makefile:609: all-recursive] Error 1
make[1]: Leaving directory '/var/lib/dkms/spl/0.7.9/build'
make: *** [Makefile:490: all] Error 2
@rincebrain
Copy link
Contributor

Dupe of #7785 ; 0.7.9 isn't expected to work on 4.18, 0.7.10 will when it gets released.

@steven-omaha
Copy link
Author

Sorry, I saw the issue, but did not figure it was related to mine. Is there a timeline for 0.7.10?

@rincebrain
Copy link
Contributor

I'm uninvolved in it, so I couldn't begin to guess; that said, if you have an urgent need to run ZoL 0.7.X and a 4.18 kernel, you could cherrypick the SPL and ZFS patches for 4.18 support linked at the end of the bug.

@tonyhutter
Copy link
Contributor

Working on it now:
#7792
openzfs/spl#707

Feel free to cherry-pick the patches if you need them right now.

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

No branches or pull requests

3 participants