CC [M] /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/super.o /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/super.c: In function 'aufs_destroy_inode_cb': When building sys-fs/aufs3-3_p20121015 I see issues like: /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/super.c:52:2: warning: passing argument 1 of 'INIT_LIST_HEAD' from incompatible pointer type [enabled by default] /usr/src/linux-3.6.2-gentoo/include/linux/list.h:24:20: note: expected 'struct list_head *' but argument is of type 'struct hlist_head *' And: CC [M] /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/vfsub.o /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/vfsub.c: In function 'vfsub_dentry_open': /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/vfsub.c:58:7: warning: passing argument 1 of 'dentry_open' from incompatible pointer type [enabled by default] /usr/src/linux-3.6.2-gentoo/include/linux/fs.h:2202:22: note: expected 'const struct path *' but argument is of type 'struct dentry *' /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/vfsub.c:58:7: warning: passing argument 2 of 'dentry_open' makes integer from pointer without a cast [enabled by default] /usr/src/linux-3.6.2-gentoo/include/linux/fs.h:2202:22: note: expected 'int' but argument is of type 'struct vfsmount *' /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/vfsub.c:58:7: warning: passing argument 3 of 'dentry_open' makes pointer from integer without a cast [enabled by default] /usr/src/linux-3.6.2-gentoo/include/linux/fs.h:2202:22: note: expected 'const struct cred *' but argument is of type 'int' /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/vfsub.c:58:7: error: too many arguments to function 'dentry_open' /usr/src/linux-3.6.2-gentoo/include/linux/fs.h:2202:22: note: declared here /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/vfsub.c: In function 'vfsub_lookup_hash': /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/vfsub.c:122:2: error: implicit declaration of function 'lookup_hash' [-Werror=implicit-function-declaration] /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/vfsub.c:122:14: warning: assignment makes pointer from integer without a cast [enabled by default] /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/vfsub.c: In function 'vfsub_create': /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/vfsub.c:209:7: error: 'struct nameidata' has no member named 'intent' /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/vfsub.c:211:7: error: 'struct nameidata' has no member named 'intent' /var/tmp/portage/sys-fs/aufs3-3_p20121015/work/aufs3-standalone/fs/aufs/vfsub.c:215:3: warning: the address of 'h_nd' will always evaluate as 'true' [-Waddress] cc1: some warnings being treated as errors Reproducible: Always
Created attachment 326784 [details] build.log
Created attachment 326786 [details] emerge --info
Created attachment 326788 [details, diff] aufs3-3_p20121015.ebuild.patch Attached is the patch to the ebuild that I use. (addresses the non-x86 issues)
My kernel was patched using aufs3-base-6.patch and aufs3-standalone-6.patch. The same issue affects sys-fs/aufs3-3_p20120813-r1.
Same issue with aufs3-*-5.patch. dentry_open is defined in include/linux/fs.h: /usr/src/linux-3.6.2-gentoo/include/linux/fs.h:extern struct file * dentry_open(const struct path *, int, const struct cred *); /usr/src/linux-3.5.3-gentoo/include/linux/fs.h:extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, /usr/src/linux-3.5.3-gentoo/include/linux/fs.h- const struct cred *); Apparently the definition changed between linux-3.5 and linux-3.6 and aufs3 needs to adapt.
Figured it out. It seems linux-mod.eclass does by default not detect the version based on KBUILD_OUTPUT, but on KERNEL_DIR. If the latter is not set, it defaults to the running kernel, which does not match the version in KBUILD_OUTPUT. After I set both variables the build succeeds. I'll hence blame it on linux-mod.eclass not detecting that the KERNEL_DIR it selected does not match the KBUILD_OUTPUT. The latter should contain a "source" symlink to KERNEL_DIR, and hence allow to detect its version in the same way as for KERNEL_DIR. Further KERNEL_DIR could be automatically set to $KBUILD_OUTPUT/source, if the latter is set but not the former.
The patch is not to solve this problem (but bug #432392 and its children), but just informative to tell you what modifications I made. Hence I remove Keywords:PATCH.
If this is still an issue after the latest fixes please re-open with reproducible steps.