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-an...).
So currently we must have nbdkit start up with $LD_LIBRARY_PATH set,
in other words how it works at the moment.
Rich.