-
Notifications
You must be signed in to change notification settings - Fork 0
Update glibc from 2.36 to 2.43 #3354
Open
pmenzel
wants to merge
11
commits into
master
Choose a base branch
from
update-glibc-from-2.36-to-2.43
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+46
−8
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
Author
|
Currently breaks PAM, and therefore SSH and sudo. I’ll fix dose in the next days. |
Collaborator
|
Maybe this is related to the removal/deprecation of libcrypt.so.1 in glibc 2.38 /1/ ? /1/ https://sourceware.org/glibc/wiki/Release/2.38#Building_libcrypt_is_disabled_by_default |
Collaborator
Author
|
@thomas, thank you for the tip. That was indeed it. After
|
Collaborator
Author
|
Tested on maleficent. |
Collaborator
|
tested on theinternet |
Collaborator
|
|
donald
requested changes
Jun 11, 2026
Collaborator
|
Can we get C.UTF8 locale? |
Collaborator
Are there cookies included ? Ice ? Go for it. |
glibc 2.43 already contains the three fixes below, so drop the patches:
glibc-linux-Fix-sys-mount.h-usage-with-kernel-headers.patch
glibc-2.36-0004-tunables-Terminate-if-end-of-input-is-reached-CVE-2023-4911.patch
glibc-2.36-Makerules-fix-MAKEFLAGS-assignment-for-upcoming-make.patch
The two ldconfig patches are MarIuX specific and have to stay.
Update to the latest stable Linux release, so glibc is built against up to date kernel headers.
Building glibc 2.43 against the Linux 7.0 headers fails, because
glibc's <sys/mount.h> and the kernel's <linux/mount.h> both define
OPEN_TREE_CLONE, and the two definitions differ:
In file included from ../sysdeps/unix/sysv/linux/include/sys/mount.h:22,
from ../sysdeps/unix/sysv/linux/umount.c:18:
../sysdeps/unix/sysv/linux/sys/mount.h:268: error: "OPEN_TREE_CLONE" redefined [-Werror]
268 | #define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
|
In file included from ../sysdeps/unix/sysv/linux/sys/mount.h:32:
/usr/include/linux/mount.h:64: note: this is the location of the previous definition
64 | #define OPEN_TREE_CLONE (1 << 0) /* Clone the target tree and attach the clone */
|
In file included from ../sysdeps/unix/sysv/linux/include/sys/mount.h:22,
from ../sysdeps/unix/sysv/linux/umount2.c:19:
../sysdeps/unix/sysv/linux/sys/mount.h:268: error: "OPEN_TREE_CLONE" redefined [-Werror]
268 | #define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
|
In file included from ../sysdeps/unix/sysv/linux/sys/mount.h:32:
/usr/include/linux/mount.h:64: note: this is the location of the previous definition
64 | #define OPEN_TREE_CLONE (1 << 0) /* Clone the target tree and attach the clone */
|
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [/dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/sysd-rules:263: /dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/misc/umount.os] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [/dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/sysd-rules:263: /dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/misc/umount2.os] Error 1
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [/dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/sysd-rules:247: /dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/misc/umount.o] Error 1
make[2]: *** [/dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/sysd-rules:247: /dev/shm/bee-pmenzel/glibc/glibc-2.43-0/build/misc/umount2.o] Error 1
make[2]: Leaving directory '/dev/shm/bee-pmenzel/glibc/glibc-2.43-0/source/misc'
make[1]: *** [Makefile:484: misc/subdir_lib] Error 2
make[1]: Leaving directory '/dev/shm/bee-pmenzel/glibc/glibc-2.43-0/source'
make: *** [Makefile:20: all] Error 2
So go back to the 6.18 series, whose headers glibc 2.43 builds against.
Building glibc 2.43 against the Linux 7.0 headers fails, because
glibc's <sys/mount.h> redefines OPEN_TREE_CLONE, which the kernel's
<linux/mount.h> already defines:
../sysdeps/unix/sysv/linux/sys/mount.h:268: error: "OPEN_TREE_CLONE" redefined [-Werror]
268 | #define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
So backport the two upstream commits fixing bug 33921 [1]:
Commit 419245719ccb ("include: isolate __O_CLOEXEC flag for
sys/mount.h and fcntl.h", 2026-01-26) stops <sys/mount.h> from
pulling in <fcntl.h>, and commit d12b017cddfe ("Linux: Only define
OPEN_TREE_* macros in <sys/mount.h> if undefined (bug 33921)",
2026-03-04) only defines the OPEN_TREE_* macros if the kernel
headers did not already define them.
[1]: https://sourceware.org/bugzilla/show_bug.cgi?id=33921
`--enable-kernel` tells glibc the oldest Linux version it has to support at runtime. The higher the version, the more compatibility code glibc can drop, but the resulting binaries refuse to start on older kernels. Raise it from 5.15.77 to the current Linux release 7.0.3.
glibc 2.38 stopped building libcrypt by default [1]:
* libcrypt is no longer built by default; one may use the
"--enable-crypt" option to build libcrypt. libcrypt is likely to
be removed from the GNU C Library in a future release; we
recommend that distributions and applications port away from it
to an alternative such as libxcrypt.
As `glibc.be0` does not pass `--enable-crypt`, updating glibc to 2.43
leaves MarIuX without `libcrypt.so.1` and `<crypt.h>`. So add
libxcrypt, the replacement recommended above, which by default
(`--enable-obsolete-api=yes`) ships a `libcrypt.so.1` compatible with
the one from glibc.
[1]: https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;hb=refs/tags/glibc-2.38
libxcrypt requires Perl 5.14 or later — `configure.ac` calls `zw_PROG_PERL([5.14.0])` and uses Perl to generate the hash tables and the symbol version floor — but MarIuX' system Perl is 5.12.1, so `configure` aborts with *Perl version 5.14.0 or later is required*. So source the profile of the packaged Perl 5.34.0.
Requiring Linux 7.0.3 makes the glibc binaries refuse to start on every
kernel MarIuX currently ships, the oldest being 5.15.77:
$ fakeroot bee list linux | grep ^linux
linux-5.15.77-440.x86_64
linux-5.15.86-443.x86_64
linux-5.15.94-447.x86_64
linux-5.15.112-449.x86_64
linux-5.15.131-457.x86_64
linux-5.15.160-476.x86_64
linux-6.1.53-458.x86_64
linux-6.6.12-461.x86_64
linux-6.6.35-477.x86_64
linux-6.12.11-479.x86_64
linux-6.12.29-483.x86_64
linux-6.12.40-484.x86_64
linux-6.12.49-487.x86_64
linux-6.12.74-489.x86_64
linux-firmware-20230804_p7_g789aa815-2.x86_64
linux-headers-6.15.3-0.x86_64
So lower `--enable-kernel` to 5.15 again.
`mee_install_post()` only generates the locales listed there, and C.UTF-8 is not among them. It is the locale independent UTF-8 locale more and more programs expect, and without it `LC_ALL=C.UTF-8` fails and programs fall back to the ASCII only C locale. So generate it, too.
761da85 to
63302e1
Compare
Sign in
to join this conversation on GitHub.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update with
sudo mxgrub --rebootalso worked.