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

Kostas Michalopoulos badsector at runtimeterror.com
Fri Mar 17 16:00:20 CET 2023


On 3/17/23 15:19, Sven Barth via lazarus wrote:
> Depending on the used units static linking is simply not an option. E.g. 
> the database units load the database libraries dynamically and thus the 
> C library must not be linked statically then.

glibc officially highly discourages static linking anyway.

As a sidenote, with gcc it is easy to cherry pick which libraries will 
be linked statically and which dynamically, but from what i can tell FPC 
doesn't seem to provide such an option - there is only an all or nothing 
approach as FPC generates its own linker scripts. It'd be useful if 
there was a way to explicitly specify (e.g. via command line options) 
which libraries are meant to be linked statically (and/or the opposite) 
regardless of $linklib usage (as libraries can come through unit you 
depend on indirectly - e.g. i might want to statically link SDL but not 
X11 or glibc).

Kostas


More information about the lazarus mailing list