'gcc cross compiling for raspberry pi /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.34' not found

On Ubuntu 22.04 LTS, I'm cross-compiling for raspberry pi. When I run any built executable on the pi, I get this linking error:

/lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.34' not found

I get this error cross-compiling with gcc-9, gcc-10, gcc-11, and gcc-12.

The pi is running 'Raspbian GNU/Linux 11 (bullseye)'. What's the best was to resolve this issue? Will a different version of Raspbian resolve this issue, or do I need to install a newer version of glibc?



Solution 1:[1]

I've resolved this issue by finding the right pre-built cross-compiler for raspberry pi bullseye here.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user2809286