[Nix-dev] dlopen in NixOS

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


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:
> * libXfixes
> * libcups
> * libGL
> * libgdk-x11-2.0 (QtWebKit for flash plugin)
> * libgtk-x11-2.0 (QtWebKit for flash plugin)
> * Various gnome/gtk libraries if compiled with GTK+ style support
> * libnsl (qprinterinfo_unix.cpp)
> * libXrandr
> * libXcursor
> * libXinerama
> * libwacomcfg
> * libresolv (qhostinfo_unix.cpp)
> * icui18n, icuuc (qlocale_icu.cpp)
> * /usr/lib/libiconv (on MacOS X)
> 
> It seems that (most) of these calls should fail on NixOS. Is there any 
> standard workaround for this issue? Hardcode library paths into Qt code?
> 
> P.S.: I'll be able to tell you which of those calls actually fail when I'll 
> recompile Qt with debug messages.

It did the same with openssl. I remember having committed some trick long ago.

Iirc, it works fine if you force a "-lthelib" in LDFLAGS, and have the libs in the
buildInputs.

Regards,
Lluís.


More information about the nix-dev mailing list