Use a new libc.so.6 with LD_PRELOAD

Trying to get 7z running on 15.4 but it require a newer libc.so.6.
So I downloaded a new glibc package from software.opensuse.org/package/glibc (tried most of them), extracted all the binaries from the rpm to /lib64_2/ and ran this command for a check:

#LD_PRELOAD=/lib64_2/libc.so.6 ldd --version
/usr/bin/bash: symbol lookup error: /lib64_2/libc.so.6: undefined symbol: _dl_audit_symbind_alt, version GLIBC_PRIVATE

I also tried to run 7z

# LD_PRELOAD=/lib64_2/libc.so.6 /usr/share/7zip/7zz
/usr/share/7zip/7zz: symbol lookup error: /lib64_2/libc.so.6: undefined symbol: _dl_audit_symbind_alt, version GLIBC_PRIVATE

What am I doing wroing?

GNU libc is more than one library. All libraries and binaries must match; it is not enough to force preload just one. In particular, your binary still refers to ld-linux.so from the different glibc which already can be a problem.

Okay…can I then specify multiple LD_PRELOAD’s somehow or what would the solution be, if it’s possible at all?

The libc-package contained all these binaries which I all extracted to /lib64_2/

1   ..                          -     01/01/0001 00:00:00
2   ld-linux-x86-64.so.2      239 KB  11/19/2022 08:59:48
3   ld-lsb-x86-64.so.3          0 KB  11/19/2022 09:02:31
4   libanl.so.1                 7 KB  11/19/2022 08:59:45
5   libBrokenLocale.so.1        7 KB  11/19/2022 08:59:07
6   libc_malloc_debug.so.0     61 KB  11/19/2022 08:59:21
7   libc.so.6               2,370 KB  11/19/2022 08:59:25
8   libdl.so.2                  7 KB  11/19/2022 08:59:20
9   libm.so.6               1,012 KB  11/19/2022 08:59:17
10  libmvec.so.1            1,044 KB  11/19/2022 08:59:43
11  libnsl.so.1               122 KB  11/19/2022 08:59:46
12  libnss_compat.so.2         41 KB  11/19/2022 08:59:46
13  libnss_db.so.2             40 KB  11/19/2022 08:59:46
14  libnss_dns.so.2             7 KB  11/19/2022 08:59:45
15  libnss_files.so.2           7 KB  11/19/2022 08:59:46
16  libnss_hesiod.so.2         26 KB  11/19/2022 08:59:46
17  libpthread.so.0             8 KB  11/19/2022 08:59:21
18  libresolv.so.2             73 KB  11/19/2022 08:59:45
19  librt.so.1                  8 KB  11/19/2022 08:59:21
20  libthread_db.so.1          44 KB  11/19/2022 08:59:44
21  libutil.so.1                7 KB  11/19/2022 08:59:47

UPDATE:
It seem one can do: LD_PRELOAD="path1 path2"…I’ll play with that and see

Both ldd and 7zz now says Segmentation fault (core dumped)
E.g.

# LD_PRELOAD="/lib64_2/libc.so.6 /lib64_2/ld-linux-x86-64.so.2 /lib64_2/libdl.so.2" ldd --version
Segmentation fault (core dumped)

LMGIFY

linux - Multiple glibc libraries on a single host - Stack Overflow

7z is in the Update Sle Repo.
Does this one not working?

rpm -ql p7zip-full
/usr/bin/7z
/usr/bin/7za
/usr/lib64/p7zip
/usr/lib64/p7zip/7z
/usr/lib64/p7zip/7z.so
/usr/lib64/p7zip/7zCon.sfx
/usr/lib64/p7zip/7za
/usr/share/man/man1/7z.1.gz
/usr/share/man/man1/7za.1.gz

As I remember they all require the newer library :frowning:

linux - Multiple glibc libraries on a single host - Stack Overflow
Thanks…will look into those solutions.