sys-fs/aufs3-3_p20111205 fail to build kernel module for kernel < 3.2.0 since it uses a newly defined inline function set_nlink. Reproducible: Always Steps to Reproduce: With /usr/src/linux pointing to tree < 3.2.0 1. emerge aufs3 2. 3. Actual Results: >>> Compiling source in /var/tmp/portage/sys-fs/aufs3-3_p20111205/work/aufs3-standalone ... make -j4 --load-average CC=x86_64-pc-linux-gnu-gcc CONFIG_AUFS_FS=m KDIR=/usr/src/linux -I/var/tmp/portage/sys-fs/aufs3-3_p20111205/work/aufs3-standalone/include -DCONFIG_AUFS_FS_MODULE -UCONFIG_AUFS -DCONFIG_AUFS_BRANCH_MAX_127 -DCONFIG_AUFS_HNOTIFY -DCONFIG_AUFS_HFSNOTIFY -DCONFIG_AUFS_SBILIST -DCONFIG_AUFS_RDU -DCONFIG_AUFS_BR_RAMFS -DCONFIG_AUFS_BR_FUSE -DCONFIG_AUFS_POLL make -C /usr/src/linux M=/var/tmp/portage/sys-fs/aufs3-3_p20111205/work/aufs3-standalone/fs/aufs EXTRA_CFLAGS="-I/var/tmp/portage/sys-fs/aufs3-3_p20111205/work/aufs3-standalone/include -DCONFIG_AUFS_FS_MODULE -UCONFIG_AUFS -DCONFIG_AUFS_BRANCH_MAX_127 -DCONFIG_AUFS_HNOTIFY -DCONFIG_AUFS_HFSNOTIFY -DCONFIG_AUFS_SBILIST -DCONFIG_AUFS_RDU -DCONFIG_AUFS_BR_RAMFS -DCONFIG_AUFS_BR_FUSE -DCONFIG_AUFS_POLL" modules make[1]: Entering directory `/usr/src/linux-3.1.4-ck' make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. CC [M] /var/tmp/portage/sys-fs/aufs3-3_p20111205/work/aufs3-standalone/fs/aufs/dir.o CC [M] /var/tmp/portage/sys-fs/aufs3-3_p20111205/work/aufs3-standalone/fs/aufs/vdir.o CC [M] /var/tmp/portage/sys-fs/aufs3-3_p20111205/work/aufs3-standalone/fs/aufs/iinfo.o CC [M] /var/tmp/portage/sys-fs/aufs3-3_p20111205/work/aufs3-standalone/fs/aufs/inode.o CC [M] /var/tmp/portage/sys-fs/aufs3-3_p20111205/work/aufs3-standalone/fs/aufs/i_op.o /var/tmp/portage/sys-fs/aufs3-3_p20111205/work/aufs3-standalone/fs/aufs/i_op.c: In function ‘au_refresh_iattr’: /var/tmp/portage/sys-fs/aufs3-3_p20111205/work/aufs3-standalone/fs/aufs/i_op.c:769:3: error: implicit declaration of function ‘set_nlink’ make[2]: *** [/var/tmp/portage/sys-fs/aufs3-3_p20111205/work/aufs3-standalone/fs/aufs/i_op.o] Error 1 make[1]: *** [_module_/var/tmp/portage/sys-fs/aufs3-3_p20111205/work/aufs3-standalone/fs/aufs] Error 2 make[1]: Leaving directory `/usr/src/linux-3.1.4-ck' make: *** [fs/aufs/aufs.ko] Error 2 A simple fix is to add static inline void set_nlink(struct inode *inode, unsigned int nlink) { inode->i_nlink = nlink; } to aufs.h, maybe wrap it around an #if/#endif preprocessor to check for kernel version (sorry, don't know how to do that).
Please try with a clean kernel srource dir and attach the full build.log of aufs3.
The ebuilds has a serious problem. I am on fixnig it
(In reply to comment #2) > The ebuilds has a serious problem. I am on fixnig it make clean and make modules_prepare, then ran ebuild compile and got the same error. Doesn't seem like an ebuild issue. You can grep the kernel source and find no definition of the function set_nlink().
The problem is in the ebuild. Thanks for the report I will fix that.
+*aufs3-3_p20111205-r1 (08 Jan 2012) + + 08 Jan 2012; Justin Lecher <jlec@gentoo.org> -aufs3-3_p20111205.ebuild, + +aufs3-3_p20111205-r1.ebuild: + Restructure patching, #398139 + Please test with new revision