version `glibc_2.34' not found

My computer’s OS is Ubuntu 22.04. I use eclipse c to develop beagleplay’s Linux app. When debugging, the error message version `glibc_2.34’ not found (required by helloworld…) will appear. My computer glibc version is 2.35, but beagleplay’s glibc version is 2.34, how do I solve this error?

There are a couple of options.

  1. setup a VM with the same OS version you are running on the Play and develop in that.

  2. If you build a custom OS image, either Yocto or Buildroot, they will generate a cross compiler that will build properly.

  3. use the sysroot option on gcc to specify a local path where you have copied the lib / header files from the Play. I think it is something like --sysroot= for your C and linker flags. Check to see if there is a Linaro compiler available. I am current using one to build software for a Debian 10 target on my much newer OS.

This will work up to a point, however this is will only include some standard libraries. If on the Play you have installed additional libraries, you will then need to copy them and relevant header files to the sysroot of the cross compiler or compiling/linking will fail.

For example I am using a gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf from a vendor. Inside that there is a directory arm-linux-gnueabihf/libc/ containing etc,lib,sbin,usr,var folders that have the relevant files from the target system

1 Like

Thank you for your opinion. I tried various methods and finally chose to lower the compiler version to solve the problem because I also had to consider using the TI Linux SDK, which only supports the ubuntu 22.04 version. If I use Debian 11 KDE, the TI SDK displays a message that the installation cannot continue.

Whether it is Ubuntu 22.04 or Debian 11.x, you need to use aarch64-linux-gnu-gcc-9 to compile normally. In Debian 11.x, there is no need to add -static static compilation. In Ubuntu 22.04, you need to add -static. This way the problem that the GLibc version cannot be found will not be displayed.
For me, a newbie developing Beagleplay’s Linux os, I did try many methods to successfully compile a Linux app program.

I use netbeans, remote build on the target that has gcc and gdb plus what ever other package you are using installed on it. Build the code on the localhost and test it remotely on the actual hardware. Much faster that way.