Correct glibc version for linux-rpi4-headers not available


i have a raspberry pi with manjaro arm installed. I try to stay up to date with the system and currently pacman finds no pending updates.

Nevertheless, the installed version of linux-rpi4-headers - namely a binary named modpost - seems to require GLIBC_2.38 but only 2.35 is installed and available through the manjaro arm repository.

I checked my mirrors and everything seems to be configured correctly, still I am unable to build kernel modules because the linux-rpi4-headers seem to be built against a newer version than available in the repo?

1 Like

Switch to the unstable branch and update or downgrade your kernel.

I’m having the same issue that I cannot build a kernel module. I have the previous kernel (5.15) in my pacman cache. Is there any other way to safely downgrade the kernel to a more recent version?

1 Like

If I remember right the linux-rpi4-mainline, linux-rpi4-mainline-headers in the stable branch should be with the older gcc/glib.

The linux-rpi4-mainline are on kernel 6.9, while the linux-rpi4 is on 6.6. Could that cause issues with other currently installed packages?

Should not if you are on the stable branch.

I was depending on the unstable branch being snapped down to the stable branch weeks ago but that has not happened yet…


That helped with the glibc problem, but now I have a problem with the gcc -fmin-function-alignment option, that seems to be new with gcc14. Do you by chance have any idea on a workaround for that? The kernel is build with gcc14, but I only have gcc12 available.

DKMS make.log for pivccu-modules-1.0.84 for kernel 6.9.1-1-MANJARO-RPI4 (aarch64)
Tue 18 Jun 16:10:20 CEST 2024
make: Entering directory '/usr/lib/modules/6.9.1-1-MANJARO-RPI4/build'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (GCC) 14.1.1 20240507
  You are using:           gcc (GCC) 12.1.0
  CC [M]  /var/lib/dkms/pivccu-modules/1.0.84/build/plat_eq3ccu2.o
  CC [M]  /var/lib/dkms/pivccu-modules/1.0.84/build/generic_raw_uart.o
  CC [M]  /var/lib/dkms/pivccu-modules/1.0.84/build/pl011_raw_uart.o
  CC [M]  /var/lib/dkms/pivccu-modules/1.0.84/build/dw_apb_raw_uart.o
gcc: error: unrecognized command-line option ‘-fmin-function-alignment=8’; did you mean ‘-flimit-function-alignment’?
make[2]: *** [scripts/ /var/lib/dkms/pivccu-modules/1.0.84/build/plat_eq3ccu2.o] Error 1
make[2]: *** Waiting for unfinished jobs....
gcc: error: unrecognized command-line option ‘-fmin-function-alignment=8’; did you mean ‘-flimit-function-alignment’?
make[2]: *** [scripts/ /var/lib/dkms/pivccu-modules/1.0.84/build/generic_raw_uart.o] Error 1
gcc: error: unrecognized command-line option ‘-fmin-function-alignment=8’; did you mean ‘-flimit-function-alignment’?
make[2]: *** [scripts/ /var/lib/dkms/pivccu-modules/1.0.84/build/pl011_raw_uart.o] Error 1
gcc: error: unrecognized command-line option ‘-fmin-function-alignment=8’; did you mean ‘-flimit-function-alignment’?
make[2]: *** [scripts/ /var/lib/dkms/pivccu-modules/1.0.84/build/dw_apb_raw_uart.o] Error 1
make[1]: *** [/usr/lib/modules/6.9.1-1-MANJARO-RPI4/build/Makefile:1919: /var/lib/dkms/pivccu-modules/1.0.84/build] Error 2
make: *** [Makefile:240: __sub-make] Error 2
make: Leaving directory '/usr/lib/modules/6.9.1-1-MANJARO-RPI4/build'

I did not remember that was compiled with gcc 14. I am going to build the latest 6.6.34 with gcc 12. Give ne some time to build and test.

1 Like

Yes, both the linux-rpi4 and the linux-rpi4-mainline were giving the warning about the compiler. I guess that was also the initial issue with the glibc library. I should have posted the log in my first reply.

Actually it will be 6.6.33 so it will be upgraded if 6.6.34 built with gcc 14 in unstable will be upgraded if it ever makes it to stable.

@Clerius Here is the linux-rpi4-6.6.33-1 kernel packages compiled with gcc12. I also included the latest raspberrypi-bootloader package with the latest fixes to match the kernel. The repo would not let me upload because the version alreay existed in unstable but of course it was compiled with gcc12. I did not have time today to recompile so here is a link to the files you can install after downloading and unpacking the tarball. Use sudo pacman -U *.zst after unpacking tarball and cd to the linux-rpi4-gcc12 directory.


Thank you very much for your help! Kernel module building works fine now for me and everything else as well.

1 Like

Great. I have recompiled the packages with a different revision number (-2) so they will push to the repo. Packages pushed when the mirrors sync.

linux-rpi4 6.6.33-2
linux-rpi4-headers 6.6.33-2
linux-rpi5 6.6.33-2
linux-rpi5-headers 6.6.33-2
raspberrypi-bootloader 20240612-2
1 Like

Just updated and everything is still working and kernel modules build successful. Thank you again for your help!

1 Like