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

Does not compile with linux-4.7.0 #4927

Closed
bernhy opened this issue Aug 3, 2016 · 13 comments
Closed

Does not compile with linux-4.7.0 #4927

bernhy opened this issue Aug 3, 2016 · 13 comments

Comments

@bernhy
Copy link

bernhy commented Aug 3, 2016

Hello,

I tried to compile the current git with vanilla linux kernel 4.7.0, but it fails. I used the copy-builtin script, like with the previous kernel versions. I see fixes for 4.8 already been commited, so I guess somebody tried already to compile successfully with 4.7?

  CC      spl/spl/spl-vmem.o
  CC      spl/spl/spl-thread.o
  CC      spl/spl/spl-taskq.o
  CC      spl/spl/spl-rwlock.o
  CC      spl/spl/spl-vnode.o
In file included from include/linux/notifier.h:13:0,
                 from include/linux/memory_hotplug.h:6,
                 from include/linux/mmzone.h:737,
                 from include/linux/gfp.h:5,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from ./include/spl/sys/cred.h:28,
                 from spl/spl/spl-vnode.c:27:
spl/spl/spl-vnode.c: In function ‘spl_kern_path_locked’:
./include/spl/linux/file_compat.h:96:61: error: ‘struct inode’ has no member named ‘i_mutex’
 #define spl_inode_lock_nested(ip, s) mutex_lock_nested(&(ip)->i_mutex, s)
                                                             ^
include/linux/mutex.h:161:55: note: in definition of macro ‘mutex_lock_nested’
 # define mutex_lock_nested(lock, subclass) mutex_lock(lock)
                                                       ^
spl/spl/spl-vnode.c:356:2: note: in expansion of macro ‘spl_inode_lock_nested’
  spl_inode_lock_nested(parent.dentry->d_inode, I_MUTEX_PARENT);
  ^
In file included from spl/spl/spl-vnode.c:31:0:
./include/spl/linux/file_compat.h:90:49: error: ‘struct inode’ has no member named ‘i_mutex’
 #define spl_inode_unlock(ip)  mutex_unlock(&(ip)->i_mutex)
                                                 ^
spl/spl/spl-vnode.c:360:3: note: in expansion of macro ‘spl_inode_unlock’
   spl_inode_unlock(parent.dentry->d_inode);
   ^
spl/spl/spl-vnode.c: In function ‘vn_remove’:
./include/spl/linux/file_compat.h:90:49: error: ‘struct inode’ has no member named ‘i_mutex’
 #define spl_inode_unlock(ip)  mutex_unlock(&(ip)->i_mutex)
                                                 ^
spl/spl/spl-vnode.c:408:2: note: in expansion of macro ‘spl_inode_unlock’
  spl_inode_unlock(parent.dentry->d_inode);
  ^
spl/spl/spl-vnode.c: In function ‘vn_rename’:
./include/spl/linux/file_compat.h:90:49: error: ‘struct inode’ has no member named ‘i_mutex’
 #define spl_inode_unlock(ip)  mutex_unlock(&(ip)->i_mutex)
                                                 ^
spl/spl/spl-vnode.c:438:2: note: in expansion of macro ‘spl_inode_unlock’
  spl_inode_unlock(old_parent.dentry->d_inode);
  ^
./include/spl/linux/file_compat.h:90:49: error: ‘struct inode’ has no member named ‘i_mutex’
 #define spl_inode_unlock(ip)  mutex_unlock(&(ip)->i_mutex)
                                                 ^
spl/spl/spl-vnode.c:446:2: note: in expansion of macro ‘spl_inode_unlock’
  spl_inode_unlock(new_parent.dentry->d_inode);
  ^
scripts/Makefile.build:289: die Regel für Ziel „spl/spl/spl-vnode.o“ scheiterte
make[3]: *** [spl/spl/spl-vnode.o] Fehler 1
scripts/Makefile.build:440: die Regel für Ziel „spl/spl“ scheiterte
make[2]: *** [spl/spl] Fehler 2
Makefile:987: die Regel für Ziel „spl“ scheiterte
@tuxoko
Copy link
Contributor

tuxoko commented Aug 3, 2016

What version are you using? Currently, only the master branch has support for Linux 4.7

@bernhy
Copy link
Author

bernhy commented Aug 4, 2016

Yes, it is current master.

root@i5-650:/usr/src/zfs/zfs# date
Thu Aug  4 09:14:20 CEST 2016
root@i5-650:/usr/src/zfs/spl# git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
root@i5-650:/usr/src/zfs/spl# cd ../zfs
root@i5-650:/usr/src/zfs/zfs# git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
root@i5-650:/usr/src/zfs/zfs# 

@kernelOfTruth
Copy link
Contributor

When did you clone that repository ?

The latest commits equal the latest on github, right ?

@bernhy
Copy link
Author

bernhy commented Aug 4, 2016

Just to make sure everything is right, I have done a fresh clone, right now. I also used a fresh download from kernel.org. Still the same failure during compile.
If you grep the tree for i_mutex, it looks like its nowhere else used.

@tuxoko
Copy link
Contributor

tuxoko commented Aug 4, 2016

@bernhy
do a git pull to make sure you are on current master. If you are sure you are on current master then please post you config.log

@bernhy
Copy link
Author

bernhy commented Aug 4, 2016

Please have a look at http://pastebin.com/fNtRMKqp

@tuxoko
Copy link
Contributor

tuxoko commented Aug 4, 2016

config.log for spl please.

@bernhy
Copy link
Author

bernhy commented Aug 4, 2016

Oups, sorry.. http://pastebin.com/gFAc3072

@tuxoko
Copy link
Contributor

tuxoko commented Aug 4, 2016

You need to configure with both --with-linux and --with-linux-obj

@bernhy
Copy link
Author

bernhy commented Aug 5, 2016

Damn, yes thats it.
./configure --enable-linux-builtin --with-linux=/usr/src/linux-4.7 --with-linux-obj=/usr/src/linux-4.7
and it works.
Thanks a lot!

@bernhy bernhy closed this as completed Aug 5, 2016
@voidzero
Copy link

I hate to ask, but, is there an ETA for a release that supports kernel 4.7? Or can master be considered safe, or safe enough anyway?

@behlendorf
Copy link
Contributor

behlendorf commented Aug 30, 2016

A stable release is being work on in #5025 which supports newer kernels. Master is always kept in a condition which is believed to be safe but there's obviously some risk there as new changes are frequently merged.

@voidzero
Copy link

Ok. Thank you.

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

5 participants