Unable to compile livestatus newer than 1.5.0p24

I have Checkmk Multisite on our central, running as x86 VM. On client sites, I have Raspberries 3Bs with Debian Stretch/Buster and Nagios 3/4 with Livestatus. I am booting from USB flash disks, not SD cards, and have performed some modifications in the OS like disabling swap and mounting /tmp as tmpfs, to minimize writes to the flash drives. Oldest ones run for several years, and failure rate of the USB disks is very low. Now we are slowly switching to Raspi4, Debian Bullseye, however on one side the same USB flash thumb drives have much higher failure rate (heat? Better preformance due to USB3? Don´ t know), but on the other side there is much better SD card performance, so we use SD cards with “endurance” attribute, and until now, not one failed.