Using non-system glibc

Mahmood Naderan nt_mahmood@yahoo.com
Wed May 27 18:37:45 GMT 2020


Excuse me, Should I do something like this:



$ /opt/glibc-2.23-install/testrun.sh --list nginx
nginx: error while loading shared libraries: nginx: cannot open shared object file


but in the same directory as I said, ldd works

$ ldd nginx
        linux-vdso.so.1 =>  (0x00007ffdad776000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb9a3ef4000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb9a3cd7000)
        libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007fb9a3a9f000)
        libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fb9a382f000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb9a3615000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb9a324b000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fb9a40f8000)




Regards,
Mahmood 

    On Wednesday, May 27, 2020, 10:17:26 PM GMT+4:30, Mahmood Naderan via Libc-help <libc-help@sourceware.org> wrote:  
 
 >Please see the parallel thread “how to link with old versions of glibc?”
>for some suggestions.

Didn't find that via google
 https://www.google.com/search?safe=off&client=firefox-b-1-d&sxsrf=ALeKk00i0RHucEYMaEUPoJ515GN2M8hfaQ%3A1590601354199&ei=iqbOXrfPC8-PlwSQuZP4CA&q=%E2%80%9Chow+to+link+with+old+versions+of+glibc%3F%E2%80%9D&oq=%E2%80%9Chow+to+link+with+old+versions+of+glibc%3F%E2%80%9D&gs_lcp=CgZwc3ktYWIQDDoECAAQRzoHCCMQ6gIQJ1DthgJYqZECYKeaAmgBcAN4AIAB-QGIAfkBkgEDMi0xmAEAoAEBoAECqgEHZ3dzLXdperABCg&sclient=psy-ab&ved=0ahUKEwi3vMjly9TpAhXPx4UKHZDcBI8Q4dUDCAs



>If it's a just a matter of running one application with a different
>glibc version, you can use the testrun.sh script in the build tree.



Excuse me I didn't understand the testrun.sh.Is this a normal output then? How can I use that?
$ ./testrun.sh
Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
You have invoked `ld.so', the helper program for shared library executables.
This program usually lives in the file `/lib/ld.so', and special directives
in executable files using ELF shared libraries tell the system's program
loader to load the helper program from this file.  This helper program loads
the shared libraries needed by the program executable, prepares the program
to run, and runs it.  You may invoke this helper program directly from the
command line to load and run an ELF executable file; this is like executing
that file itself, but always uses this helper program from the file you
specified, instead of the helper program file specified in the executable
file you run.  This is mostly of use for maintainers to test new versions
of this helper program; chances are you did not intend to run this program.

  --list                list all dependencies and how they are resolved
  --verify              verify that given object really is a dynamically linked
                        object we can handle
  --inhibit-cache       Do not use /opt/glibc-2.23-install/etc/ld.so.cache
  --library-path PATH   use given PATH instead of content of the environment
                        variable LD_LIBRARY_PATH
  --inhibit-rpath LIST  ignore RUNPATH and RPATH information in object names
                        in LIST
  --audit LIST          use objects named in LIST as auditors




Regards,
Mahmood 
  


More information about the Libc-help mailing list