Closed JHagemeister closed 2 years ago
On a 64-bit installation, full pathnames like /usr/lib64/libdlfaker.so in LD_PRELOAD will cause whining about "wrong ELF class" when you run 32-bit programs.
vglrun
does not manipulate LD_LIBRARY_PATH
by default. It only does so under two circumstances:
-ld
is passed to the script, then the specified directory is prepended to LD_LIBRARY_PATH
. This is an undocumented convenience feature that is useful for testing..vglrun.vars64
or .vglrun.vars32
) into the same directory as vglrun
. That script, if it exists, is invoked by vglrun
, and it prepends the faker directory to LD_LIBRARY_PATH
.The full path is not used in LD_PRELOAD
for precisely the reason that @karlkleinpaste cites. VirtualGL is designed so that both 64-bit and 32-bit applications can be launched using the same script (vglrun
.) Using the full path in LD_PRELOAD
would necessitate having a separate vglrun
script for 64-bit and 32-bit applications. That being said, eventually 32-bit applications will go away, and that would make it possible to do what you propose.
Ah, I see. Thank you very much for your replies!
Is there a reason for vglrun to manipulate both LD_LIBRARY_PATH as well as LD_PRELOAD?
It seems not to be necessary to modify LD_LIBRARY_PATH when the full path is used in LD_PRELOAD. That would make things more concise, I believe. :)