Kernel Bug Tracker – Bug 59041
[PATCH 001/001] Compiling iwlwifi or alx against 3.4.47 kernel gives redefinition error
Last modified: 2015-11-22 07:29:18 UTC
from: Steve Russo <email@example.com>
Compiling iwlwifi or alx against 3.4.47 kernel gives redefinition error. Tried using compat-drivers-3.9-rc4-2-su, compat-drivers-3.9-rc2-2-su, and compat-drivers-3.8.3-2-snpu. Does not work from any of them.
Patch against compat-drivers-3.9-rc4-2-su follows body.
make -C /lib/modules/3.4.47/build M=/path/to/home/Dev/Wired/compat-drivers-3.9-rc4-2-su modules
make: Entering directory `/path/to/home/Dev/Kernel/generic/linux-3.4.47'
CC [M] /path/to/home/Dev/Wired/compat-drivers-3.9-rc4-2-su/compat/main.o
In file included from /path/to/home/Dev/Wired/compat-drivers-3.9-rc4-2-su/include/linux/compat-2.6.h:71:0,
/path/to/home/Dev/Wired/compat-drivers-3.9-rc4-2-su/include/linux/compat-3.8.h:49:32: error: redefinition of ‘kref_get_unless_zero’
In file included from include/linux/kobject.h:24:0,
include/linux/kref.h:113:32: note: previous definition of ‘kref_get_unless_zero’ was here
make: *** [/path/to/home/Dev/Wired/compat-drivers-3.9-rc4-2-su/compat/main.o] Error 1
make: *** [/path/to/home/Dev/Wired/compat-drivers-3.9-rc4-2-su/compat] Error 2
make: *** [_module_/path/to/home/Dev/Wired/compat-drivers-3.9-rc4-2-su] Error 2
make: Leaving directory `/path/to/home/Dev/Kernel/generic/linux-3.4.47'
make: *** [modules] Error 2
Signed-off-by: Steve Russo <firstname.lastname@example.org>
The following patch against compat-drivers-3.9-rc4-2-su allowed compilation to complete.
--- compat-3.8.h.0 2013-05-30 15:57:51.333132738 -0400
+++ compat-3.8.h 2013-05-30 15:59:12.689517900 -0400
@@ -22,6 +22,7 @@ extern void netdev_set_default_ethtool_o
extern bool hid_ignore(struct hid_device *);
/* This backports:
* commit 4b20db3de8dab005b07c74161cb041db8c5ff3a7
@@ -50,6 +51,7 @@ static inline int __must_check kref_get_
return atomic_add_unless(&kref->refcount, 1, 0);
/* This backports:
Please try the new backports releases, compat-drivers is deprecated.
I've tried 3.10.4-1 as well as the latest development release (20130802), and had this issue with kernel 3.6.10 in Fedora 18. I did not have this issue however in Fedora 19 with kernel 3.9.5
(In reply to CSS from comment #3)
> I've tried 3.10.4-1 as well as the latest development release (20130802),
> and had this issue with kernel 3.6.10 in Fedora 18. I did not have this
> issue however in Fedora 19 with kernel 3.9.5
Specifically, I've tried backports 3.10.4-1.
kref_get_unless_zero() was removed in backports-20131122-2, please try that version, that should fix your problem.
This should be fixed in the latest releases.