[Lazarus] version `GLIBC_2.34' not found error when running app on different PC

Kostas Michalopoulos badsector at runtimeterror.com
Fri Mar 17 06:17:53 CET 2023


On 3/17/23 01:36, Bo Berglund via lazarus wrote:
> I do not know what the library libc.so.6 even does....

It is the C library that one or more of units/libraries you are linking 
against require.

The issue is that you are making a binary on a newer version of glibc 
(the C library) than the system you want to run it - glibc (and most 
libraries really) is *backwards* compatible but not *forward* 
compatible: you can only run binaries on a system that uses the same or 
older versions of the library/libraries but not newer.

The solution is very simple: build the binary on the oldest version of 
libraries you want to support - with the easiest approach being to 
download an ISO of some older version of a distro that has the oldest 
versions you want to support. For example AppImage suggests using at 
most the oldest still supported version of Ubuntu (e.g. Bionic Beaver 
from 2018).

This is not unique to Lazarus or FPC, BTW, it is the same for any 
language and program that links against shared libraries on Linux.

Kostas



More information about the lazarus mailing list