Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 753263 - sys-libs/glibc-2.32-r2: states that kernel headers are too old, but they are not
Summary: sys-libs/glibc-2.32-r2: states that kernel headers are too old, but they are not
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-06 01:09 UTC by Rick Elrod
Modified: 2020-11-06 19:46 UTC (History)
2 users (show)

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


Attachments
`emerge -vat glibc` and `emerge --info` (glibc.txt,20.89 KB, text/plain)
2020-11-06 01:09 UTC, Rick Elrod
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Elrod 2020-11-06 01:09:42 UTC
Created attachment 670118 [details]
`emerge -vat glibc` and `emerge --info`

Trying to upgrade glibc, I'm getting this failure:

running configure fragment for sysdeps/unix/sysv/linux
checking installed Linux kernel header files... missing or too old!
configure: error: GNU libc requires kernel header files from
Linux 3.2.0 or later to be installed before configuring.
The kernel header files are found usually in /usr/include/asm and
/usr/include/linux; make sure these directories use files from
Linux 3.2.0 or later.  This check uses <linux/version.h>, so
make sure that file was built correctly when installing the kernel header
files.  To use kernel headers not from /usr/include/linux, use the
configure option --with-headers.
 * ERROR: sys-libs/glibc-2.32-r2::gentoo failed (configure phase):


However:

beryl ~ # equery l linux-headers
 * Searching for linux-headers ...
[IP-] [  ] sys-kernel/linux-headers-5.4-r1:0


beryl ~ # cat /usr/include/linux/version.h 
#define LINUX_VERSION_CODE 328704
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

(328704 corresponds to 5.4.0)

I've attached a full log of the emerge output and of emerge --info

I am not confident that this isn't something specific to my system somehow - I don't have another system to try to reproduce this on right now. But it seemed worth reporting just in case, as I'm not sure how I could have broken this detection. :)
Comment 1 Rick Elrod 2020-11-06 01:11:03 UTC
Also, the pre-detection seems to look fine (from the log):


 * Checking running kernel version (5.4.60-gentoo >= 3.2.0) ...
 [ ok ]
 * Checking linux-headers version (5.4.0 >= 3.2.0) ...
 [ ok ]

So I don't know why the later check is failing, it seems weird.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-11-06 10:25:24 UTC
Don't trust equery:
emerge -pvO sys-kernel/linux-headers.

Any better if you reinstall them, too?
Comment 3 Rick Elrod 2020-11-06 16:56:08 UTC
(In reply to Sam James from comment #2)
> Don't trust equery:
> emerge -pvO sys-kernel/linux-headers.

Sorry and thanks :) That shows the same though:

beryl ~ # emerge -pvO sys-kernel/linux-headers

These are the packages that would be merged, in order:

[ebuild   R    ] sys-kernel/linux-headers-5.4-r1::gentoo  USE="-headers-only" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


> 
> Any better if you reinstall them, too?

I did try reinstalling linux-headers to no avail. Happy to try anything else, or give any further info to help debug. Just let me know what you need :)

For now, I am fine masking the update so I can update the rest of my system, so this isn't critically blocking me on anything.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2020-11-06 19:25:07 UTC
Can you extract `config.log` from the glibc build directory? Hopefully it will mrovide more detailed error message on what went wrong.
Comment 5 Rick Elrod 2020-11-06 19:46:25 UTC
(In reply to Sergei Trofimovich from comment #4)
> Can you extract `config.log` from the glibc build directory? Hopefully it
> will mrovide more detailed error message on what went wrong.

Good call- I found the config.log and earlier in it (above the error in my original report), there was another error (permissions due to my ccache configuration).

Fixed that and it seems to be building fine now. I think the linux-headers error was just a red herring. :(

Sorry for the trouble and thanks for the quick responses!