Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 157618 - dev-libs/klibc fails with linux-headers-2.6.19 due to no linux/config.h
Summary: dev-libs/klibc fails with linux-headers-2.6.19 due to no linux/config.h
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
: 159500 162901 (view as bug list)
Depends on:
Blocks: kernel-2.6.19 sane-linux-headers
  Show dependency tree
 
Reported: 2006-12-09 07:31 UTC by Mike Lothian
Modified: 2007-01-20 11:10 UTC (History)
9 users (show)

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


Attachments
Patch for resumelib.c which fixes config.h breakage (klibc-1.4.13-resumelib.patch,403 bytes, patch)
2007-01-04 16:10 UTC, Mike Benson
Details | Diff
Modified ebuild to patch klibc against 2.6.19 (klibc-1.4.13.ebuild,6.14 KB, text/plain)
2007-01-04 16:13 UTC, Mike Benson
Details
revised klibc-1.4.13-resumelib.patch (klibc-1.4.13-resumelib.patch,545 bytes, patch)
2007-01-15 12:22 UTC, Thomas S. Howard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2006-12-09 07:31:09 UTC
This just requires klibc-1.4.13/usr/kinit/resume/resumelib.c to be changed 

#include <linux/config.h>     /* For CONFIG_PM_STD_PARTITION */

to

#include <linux/autoconf.h>     /* For CONFIG_PM_STD_PARTITION */
Comment 1 RB 2006-12-16 15:51:15 UTC
Ditto for x11-base/x11-drm
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-12-30 12:17:54 UTC
*** Bug 159500 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2006-12-30 17:56:34 UTC
Michal: any interest in fixing this?
actually the line in question can just be removed.
Comment 4 Kaiting Chen 2006-12-30 18:32:19 UTC
Just to let everyone know, if you create the following symlink, everything works:

config.h -> autoconf.h

in the /usr/src/linux/include/linux directory.

This isn't specific to klibc. If you google it, a bunch of packages were broken with this lack of config.h in 2.6.19. And the problem is not in linux-headers, but is instead in the source tree.
Comment 5 Mike Lothian 2006-12-31 01:52:34 UTC
Doesn't that defeat the purpose?

I mean Linux wants rid of it so shouln't these packages "Do The Right Thing" and stop using it?
Comment 6 Kaiting Chen 2006-12-31 12:37:51 UTC
What I don't understand about Linux is how they can have a thousand backwards compatability options in the kernel config (try it, hit `make menuconfig` and see how many features are in there for backwards compatability), but then not tell anyone and kill linux/config.h. The only evidence I can find that it was deprecated was one entry in a mailing list.

So no, I don't think it defeats the purpose. If you're going to have all those deprecated options in the kernel config, then making that symlink is no different.
Comment 7 Daniel Drake (RETIRED) gentoo-dev 2007-01-02 20:52:10 UTC
(In reply to comment #6)
> What I don't understand about Linux is how they can have a thousand backwards
> compatability options in the kernel config (try it, hit `make menuconfig` and
> see how many features are in there for backwards compatability)

Those are for documented userspace interfaces. Including kernel configuration headers into userspace isn't a supported interface. Neither is building kernel modules outside of the source tree, hence all of the breakage of external kernel modules. Read http://lxr.free-electrons.com/source/Documentation/stable_api_nonsense.txt for why we deliberately don't try to maintain API interface stability.

In other words, this is both a klibc bug in that it includes configuration-sensitive headers, and a bug in older versions of linux-headers that this file was installed in the first place.
Comment 8 Kaiting Chen 2007-01-03 06:19:33 UTC
Just to let everyone know, I'm pretty sure it's not a linux-headers bug. klibc depends on the headers in /usr/src/linux/include, not /usr/include.
Comment 9 Daniel Drake (RETIRED) gentoo-dev 2007-01-04 10:48:08 UTC
Oops, must have misread that. In that case it is a klibc bug which can be patched easily, including autoconf.h instead is probably the correct fix, and also this does fall under the "Linux deliberately doesn't try to produce a stable interface here" category that I outlined above.
Comment 10 Mike Benson 2007-01-04 16:10:54 UTC
Created attachment 105432 [details, diff]
Patch for resumelib.c which fixes config.h breakage

Patch to implement Martin's fix, including autoconf.h instead of config.h in resumelib.c
Comment 11 Mike Benson 2007-01-04 16:13:30 UTC
Created attachment 105433 [details]
Modified ebuild to patch klibc against 2.6.19

I modified the ebuild (should be bumped to -r1?) to include the patch above if linux/include/linux/config.h is not found.
Comment 12 Daniel Drake (RETIRED) gentoo-dev 2007-01-07 16:30:54 UTC
The patch should be applied unconditionally and it is safe to do so.

Maintainers, this is your 1 week warning of 2.6.19 going stable.
Comment 13 Marcin D. Mikielewicz 2007-01-10 23:17:15 UTC
patch and new ebuild works for me too
Comment 14 Conrad Kostecki gentoo-dev 2007-01-13 17:13:13 UTC
Please bump!
Works fine on x86!
Comment 15 Sudharshan S 2007-01-13 17:18:33 UTC
>Please bump!
>Works fine on x86!
I had to make a touch /usr/include/linux/config.h to make it work..spca5xx also got affected..
Comment 16 Thomas S. Howard 2007-01-15 12:22:31 UTC
Created attachment 107054 [details, diff]
revised klibc-1.4.13-resumelib.patch

Seems to me the kernel version should be checked, so I added a check for 2.6.19 to the patch.
Comment 17 Attila Fazekas 2007-01-17 10:04:09 UTC
Attachments work on amd64.
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2007-01-20 10:01:01 UTC
*** Bug 162901 has been marked as a duplicate of this bug. ***
Comment 19 Christian Heim (RETIRED) gentoo-dev 2007-01-20 11:00:04 UTC
I've just commited the needed changes to CVS, I'll leave this bug open, as we need  the latest version stable for gentoo-sources-2.6.19.
Comment 20 Christian Heim (RETIRED) gentoo-dev 2007-01-20 11:10:46 UTC
(In reply to comment #19)
> I've just commited the needed changes to CVS, I'll leave this bug open, as we
> need  the latest version stable for gentoo-sources-2.6.19.

The above isn't even right, current stable works just fine with 2.6.19 based sources (checked it against hardened-sources-2.6.19-r4 / linux-headers-2.6.19.2-r1).