[Libguestfs] [PATCH nbdkit v2 2/3] NOT WORKING: vddk: Drive library loading from libdir parameter.

Richard W.M. Jones rjones at redhat.com
Thu Feb 13 16:04:46 UTC 2020


I couldn't get this to work in the end.  This is the latest
non-working version.  This email documents what doesn't work for the
permanent record.

The central problem is that VDDK InitEx() appears to dlopen() various
of its own plugins.  Although I wasn't able to capture exactly what
dlopen() command it is running, the plugins cannot be loaded because
they rely on the recompiled system libraries (libcrypto.so.X etc) and
it cannot find those because $LD_LIBRARY_PATH is not set.

Setting $LD_LIBRARY_PATH using setenv around the call to InitEx() does
not work because glibc only consults $LD_LIBRARY_PATH when the program
starts up.  Various workarounds have been suggested for this but none
of them are pleasant
(https://stackoverflow.com/questions/6713692/problems-with-using-setenv-and-then-making-the-dlopen-call).

So currently we must have nbdkit start up with $LD_LIBRARY_PATH set,
in other words how it works at the moment.

Rich.





More information about the Libguestfs mailing list