Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Can't compile with 3.1 kernel (Ubuntu x86_64) #48

Closed
colorprint opened this issue Sep 4, 2011 · 9 comments
Closed

Can't compile with 3.1 kernel (Ubuntu x86_64) #48

colorprint opened this issue Sep 4, 2011 · 9 comments

Comments

@colorprint
Copy link

Can't compile the SPL and ZFS kernel modules with 3.1-rc4 kernel (Ubuntu):

CC [M] /var/lib/dkms/spl/0.6.0.31/build/module/spl/../../module/spl/spl-debug.o
/var/lib/dkms/spl/0.6.0.31/build/module/spl/../../module/spl/spl-debug.c: In function ‘spl_debug_dump_all_pages’:
/var/lib/dkms/spl/0.6.0.31/build/module/spl/../../module/spl/spl-debug.c:963:9: error: too few arguments to function ‘filp->f_op->fsync’

@dajhorn
Copy link
Contributor

dajhorn commented Sep 4, 2011

Linux 3.1 is not yet published by Ubuntu and is unlikely to appear until after the Oneiric release. 3.0.0-10.16 is the latest version.

How did you install the 3.1 kernel? Local, kpkg, or some other way?

Did you use the Ubuntu 3.0 config file to compile it?

@colorprint
Copy link
Author

@colorprint colorprint reopened this Sep 4, 2011
@behlendorf
Copy link
Contributor

For the moment you could just comment out the offending code. It's just part of the debug subsystem which is disabled unless your doing development or chasing a bug. Once 3.1 is officially released we'll certain run down any lingering compatibility issues.

@colorprint
Copy link
Author

Similar problems in other files too after commenting out the code in spl-debug.c

/var/lib/dkms/spl/0.6.0.31/build/module/spl/../../module/spl/spl-vnode.c:319:2: error: implicit declaration of function ‘path_lookup’ [-Werror=implicit-function-declaration]
/var/lib/dkms/spl/0.6.0.31/build/module/spl/../../module/spl/spl-vnode.c: In function ‘vn_fsync’:
/var/lib/dkms/spl/0.6.0.31/build/module/spl/../../module/spl/spl-vnode.c:501:2: error: too few arguments to function ‘vp->v_file->f_op->fsync’

@mlsorensen
Copy link

Saw this in config.log, and wanted to share what I found since it seems related to this report.

configure:19623: cp conftest.c build && make modules -C /lib/modules/3.0.0/build EXTRA_CFLAGS=-Werror-implicit-function-declaration M=/root/spl-0.6.0-rc5/build
/root/spl-0.6.0-rc5/build/conftest.c: In function ‘main’:
/root/spl-0.6.0-rc5/build/conftest.c:135: error: implicit declaration of function ‘file_fsync’

looks like fsync went from 3 to 2 args as of 2.6.34, and the config has been unable to detect it since file_fsync disappeared from buffer_head.h in 2.6.36. It works in newer kernels just because it happens to default to 2 args. Now in 3.1 it looks like fsync is 4 args. So not only do we need to add a third definition for spl_filp_fsync with 4 args, but the test will need to be adjusted to use something other than file_fsync.

Hope this helps.

@colorprint
Copy link
Author

Kernel 3.1 released, but still can't compile SPL with it (

@Clete2
Copy link

Clete2 commented Oct 28, 2011

Seconded. Using Gentoo.

@behlendorf
Copy link
Contributor

Now that 3.1's out and the interfaces have stabilized we'll get support for it in to the next release candidate.

@behlendorf
Copy link
Contributor

Closing as duplicate of issue #52.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants