[Nix-dev] dlopen in NixOS

Lluís Batlle i Rossell viric at viric.name
Sun Dec 18 10:32:29 CET 2011


On Sun, Dec 18, 2011 at 01:28:34PM +0400, Yury G.  Kudryashov wrote:
> Lluís Batlle i Rossell wrote:
> 
> > On Sun, Dec 18, 2011 at 01:15:26PM +0400, Yury G.  Kudryashov wrote:
> >> Hi!
> >> 
> >> Today I realized that Qt looks for many libraries using dlopen(). The
> >> list of libraries Qt tries to dlopen() include:
> > It did the same with openssl. I remember having committed some trick long
> > ago.
> Yes, `./configure -openssl-linked`.

No, I did not mean that. 4.6/default.nix has:

# libQtNetwork will call libQtCore for it to dlopen openssl.
NIX_LDFLAGS = "-rpath ${openssl}/lib";
# Don't shrink the rpath, to keep ${openssl} in it.
dontPatchELF = 1;

> > 
> > Iirc, it works fine if you force a "-lthelib" in LDFLAGS, and have the
> > libs in the buildInputs.
> +do not remove 'unused' libs/dirs during fixupPhase, yes?

Right. As above.

But sometimes it works even leaving the removal phase... For exampl, the case
of pthread_cancel, that requires "-lgcc_s". Adding simply "-lgcc_s" gets the lib
in, and the fixup phase does not remove it.

Regards,
Lluís.


More information about the nix-dev mailing list