Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Building against /usr/src/linux and linux-info.eclass
Date: Thu, 21 Feb 2013 22:05:57
Message-Id: pan$aa1b3$62bcb978$ad99d55$ef9ffc33@cox.net
In Reply to: Re: [gentoo-dev] Building against /usr/src/linux and linux-info.eclass by Markos Chandras
1 Markos Chandras posted on Thu, 21 Feb 2013 21:25:30 +0000 as excerpted:
2
3 >>> Eg. bug #458014.
4 >>>
5 >>> Any ideas about how to deal cleanly with situations like that?
6 >>>
7 >>>
8 >> I'm no expert, but I always thought that modules are supposed to
9 >> consume headers from the kernel source directory, not from
10 >> /usr/include/linux.
11
12 I believe I've read that somewhere quite authoritative (like LWN) as
13 well. Kernel modules, kernel sources. Userspace, the cleaned up Linux-
14 headers.
15
16 In fact, there has been quite some kernel work recently (3.7 I believe,
17 the commit log was heavy with related commits) done in ordered to make
18 the separation cleaner.
19
20 >> As well, the modules should be installed for whatever kernel version is
21 >> present in /usr/src/linux (or KERNEL_DIR. This may be distinct from the
22 >> currently running kernel.
23
24 This problem is much worse with gentoo than with a typical binary distro
25 that much more strictly controls both the kernel and headers shipped.
26 AFAIK, that's one of the major reasons the eclass is there, to semi-
27 standardize both the handling and the relative priority of the various
28 possibilities, but no solution's going to hit every corner-case, and if
29 something's breaking on specific user's systems, in the end it's them
30 that may have to either standardize their system (and build practices) to
31 some degree, or handle their own breakage if they choose not to.
32
33 But userspace definitely should be using the installed linux-headers.
34 And in-treeing kernel modules is STRONGLY encouraged upstream exactly due
35 to this and other issues, to the point that while out-of-tree modules are
36 tolerated as a fact of life, they're very much on a "the responsible dev
37 (and users who choose to use his code) gets to keep his pieces" policy.
38 That being the upstream policy, there's definitely limits on what gentoo
39 can do to unbreak what upstream has already declared broken, too.
40
41 --
42 Duncan - List replies preferred. No HTML msgs.
43 "Every nonfree program has a lord, a master --
44 and if you use the program, he is your master." Richard Stallman