Lazarus

Free Pascal => Unix => Topic started by: OH1KH on January 04, 2022, 05:59:39 pm

Title: Glibc 2.34 and compiled binary
Post by: OH1KH on January 04, 2022, 05:59:39 pm
Hi!
Running here Fedora35 with Lazarus 2.0.12 I have now faced a problem with compiled binary files.

I have been lazy to issue Fedora updates, but now when done so I started to receive reports that program compiled with my system does not start any more with other systems giving a "/usr/lib/libc.so.6: version `GLIBC_2.34' not found "

I found one fedora and glbc related thread from here, but it seems to be problem with compile  using Lazarus, not with the produced binary.

This problem affects both GTK2 and QT5 binaries.
GTK3 can not be tested as it has had long time an unfixed error with LCLNet that stops compiler.
 
If program binary is compiled with system having older GLIBC this binary will run OK with version having GLIBC 2.34. But not other way round.
This drops out users that have systems where GLIBC is not updated to 2.34 (and there are many of them)

Any suggestions (than using old enough system to compile) ?
Title: Re: Glibc 2.34 and compiled binary
Post by: Jonas Maebe on January 04, 2022, 08:38:27 pm
Any suggestions (than using old enough system to compile) ?
Either that, or build a custom sysroot with the desired glibc version (e.g. with https://github.com/crosstool-ng/crosstool-ng) and pass that sysroot location to FPC with the -XR command line parameter.
Title: Re: Glibc 2.34 and compiled binary
Post by: PascalDragon on January 05, 2022, 09:45:10 am
GTK3 can not be tested as it has had long time an unfixed error with LCLNet that stops compiler.

Not related to your problem, but was this error reported?
Title: Re: Glibc 2.34 and compiled binary
Post by: OH1KH on January 10, 2022, 11:19:50 am
I do not know!
At least I haven't. It has been there for long (years now).
TinyPortal © 2005-2018