On Thu, Feb 21, 2013 at 1:42 PM, Anthony G. Basile
<bas...@opensource.dyc.edu> wrote:
> Hi everyone,
>
> This issue has come up in a few bugs so I want to bounce it off the
> community.  When building packages that need a configured kernel source
> tree, many ebuilds inherit linux-info to find configuration info about the
> kernel.  However, there is the running kernel with its configuration
> (/proc/config.gz if it exists), there is the kernel source tree
> (/usr/src/linux if it exists and is configured) and both of these can be of
> a different version than linux-headers.  Since building modules consumes
> headers from /usr/include/linux, but uses code from /usr/src/linux and then
> these modules are expected to insmod against the running kernel, all of
> which can be mismatched, we have a lot of room for breakage.  Eg. bug
> #458014.
>
> Any ideas about how to deal cleanly with situations like that?
>

I'm no expert, but I always thought that modules are supposed to
consume headers from the kernel source directory, not from
/usr/include/linux.

As well, the modules should be installed for whatever kernel version
is present in /usr/src/linux (or KERNEL_DIR. This may be distinct from
the currently running kernel.

I think the headers in /usr/include/linux are there for building
userspace programs, which would utilize the more stable userspace <->
kernel API.

Reply via email to