Noting what everybody else has said, but I believe that the fundamental issue is that the linker resolves/follows symlinks so the actual filename in the executable is that of the actual library.
I don't believe that's fixable, it's quite simply the way that the linker and loader work on Linux (and possibly other unices).
I've definitely seen comparable issues, although I can't recall whether they specifically involved (g)libc. Also I can't say whether they apply to unices other than Linux, since I've rarely (if ever) had multiple versions of these running and in any event it's long been my policy to try to have FPC/Lazarus on representatives of all OS variants and versions.
A related problem I had a couple of years ago was due to an ALSA version change. I worked around that by putting Docker on my development system and setting up a container with the target OS such that I could ssh in and get a shell, after which I could run Lazarus and FPC in the normal way.
So I suggest that the first thing to do is to follow through the symlink chain on both systems. I'd be very happy to be told I was wide of the mark, and that there was a simpler fix :-)
Added: If it is a library naming issue, it might be possible to fix it using patchelf
http://manpages.ubuntu.com/manpages/bionic/man1/patchelf.1.htmlI've not experimented with this, and I don't know what would happen if a symlink name was patched into the ELF header.
MarkMLl