| Summary: | build buildroot with glibc and linux kernel 5.4, start with qemu will cause error: "FATAL: kernel too old" | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | Fugui Liu <tgeh23> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED NEEDINFO | ||
| Severity: | major | CC: | buildroot, yann.morin.1998 |
| Priority: | P5 | ||
| Version: | 2022.02.3 | ||
| Target Milestone: | 2022.02 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
Fugui Liu
2022-07-18 02:43:14 UTC
Thanks for the bug report. I am surprised we never realized this before. Isn't the solution as simple as: diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk index f3a08fbf24..6c54d044a5 100644 --- a/package/glibc/glibc.mk +++ b/package/glibc/glibc.mk @@ -99,7 +99,7 @@ GLIBC_MAKE = $(BR2_MAKE) GLIBC_CONF_ENV += ac_cv_prog_MAKE="$(BR2_MAKE)" ifeq ($(BR2_PACKAGE_GLIBC_KERNEL_COMPAT),) -GLIBC_CONF_OPTS += --enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)) +GLIBC_CONF_OPTS += --enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)).0 endif # Even though we use the autotools-package infrastructure, we have to Indeed, $(BR2_TOOLCHAIN_HEADERS_AT_LEAST) never includes the minor version as far as I can see. Yann, any opinion? (In reply to Thomas Petazzoni from comment #1) > -GLIBC_CONF_OPTS += --enable-kernel=$(call strip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)) > +GLIBC_CONF_OPTS += --enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)).0 It should not be necessary, because the glibc machinery explicitly already adds a buncha dot-zeroes: https://github.com/bminor/glibc/blob/master/sysdeps/unix/sysv/linux/configure.ac#L39 (mips has a special case, but uses the same construct). user_version=$((`echo "$minimum_kernel.0.0.0" | [....] with minimum_kernel defined there, from --enable-kernel=NNN : https://github.com/bminor/glibc/blob/master/configure.ac#L273 Note that this is not recent; it's been there since 48d0c5d847a, in 2000... So yeah, weird... (In reply to Thomas Petazzoni from comment #1) The solution I want is to be able to set the minior version when we `make xxconfig`. (In reply to Yann E. MORIN from comment #2) I tested multi combinations. 1. buildroot-2022.02.3 with glibc 2.34 linux kernel 5.4/5.15 2. buildroot-2020.08 with glibc 2.31 linux kernle 5.4/5.7 All throw error: FATAL: kernel too old If I modify buildroot's .config `BR2_TOOLCHAIN_HEADERS_AT_LEAST` to `5.4.0`, everything is ok. You can try to build and start. Fugui Liu, All, Can you provide a defconfig that exhibits the issue, please? Regards, Yann E. MORIN. No feedback from the contributor, insufficient information to reproduce, so closing the bug. |