Using non-system glibc

Florian Weimer
Thu May 28 11:53:35 GMT 2020

* Mahmood Naderan:

> On the way to use a custom glibc build, I tried to modify the Makefile of the program (nginx)
> with 
> -Wl,--rpath=/opt/glibc-2.23-install -Wl,--dynamic-linker=/opt/glibc-2.23-install/lib/
> After build and install, I see the following ldd output
> $ ldd install/sbin/nginx
> =>  (0x00007ffd6c335000)
> => /lib/x86_64-linux-gnu/ (0x00007fad02350000)
> => /lib/x86_64-linux-gnu/ (0x00007fad02133000)
> => /lib/x86_64-linux-gnu/ (0x00007fad01efb000)
> => /lib/x86_64-linux-gnu/ (0x00007fad01c8b000)
> => /lib/x86_64-linux-gnu/ (0x00007fad01a71000)
> => /opt/glibc-2.23-install/ (0x00007fad016d0000)
>         /opt/glibc-2.23-install/lib/ => /lib64/
> (0x00007fad02554000)
> The last line shows that my own glibc build is using system libc. But the file my
> program is using, comes from my own glibc build.
> So, is that all? Or something is missing? Any advice?

I would try to reference the dynamic linker under its soname, like this:


Not sure if it makes a difference.

It's also concerning that and are loaded from
system paths. could be fine, depending on whether it uses
internal glibc symbols or not.


More information about the Libc-help mailing list