Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 398139 - <sys-fs/aufs3-3_p20111205 Doesn't use the correct patches
Summary: <sys-fs/aufs3-3_p20111205 Doesn't use the correct patches
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Justin Lecher (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-08 10:49 UTC by Mathieu Z
Modified: 2012-01-08 13:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Z 2012-01-08 10:49:10 UTC
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).
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2012-01-08 11:05:27 UTC
Please try with a clean kernel srource dir and attach the full build.log of aufs3.
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2012-01-08 11:17:36 UTC
The ebuilds has a serious problem. I am on fixnig it
Comment 3 Mathieu Z 2012-01-08 11:41:32 UTC
(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().
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2012-01-08 11:55:08 UTC
The problem is in the ebuild. Thanks for the report I will fix that.
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2012-01-08 13:31:46 UTC
+*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