You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't understand the purpose of such code in production - it looks like a testing hack that got accidentally committed?
The environment variable LD_LIBRARY_PATH, just like PATH, can contain arbitrary entries that should be ignored whenever they are irrelevant to the program itself.
Only way I could see this kind of logic making sense is trying bothdlopen(basename((char *)fileName), RTLD_LAZY) and dlopen(fileName, RTLD_LAZY), when LD_LIBRARY_PATH is set (because, yes, they can pick different libraries).
But which one should you prefer? If the user explicitly passed e.g.: --deqp-vk-library-path=/my/local/build/of/vulkan-loader/lib/libvulkan.so
Why would that full path be ignored in favor of just libvulkan.so?
Also, even with LD_LIBRARY_PATH unset, there is a hardcoded list of search directories built into libdl, so dlopen("libfoo.so") could still succeed even then.
(think /lib64, but also e.g. automatically appending subpaths like glibc-hwcaps/x86-64-v3/ etc.)
Personally, I had deqp-vk work before, and it so happens that LD_LIBRARY_PATH isn't set for me normally (e.g. in Konsole), but something or other leads to it being set in VSCode, and I was running deqp-vk from inside VSCode this time.
The text was updated successfully, but these errors were encountered:
Commit 5aa5b08 changed the way
libraries are dynamically loaded when `LD_LIBRARY_PATH` is set to only
take the filename into account and not the complete path. This seems to
be overlooked code meant for testing as the commit is about video
testing and not library loading.
Revert the file to its previous state to fix loading libraries that are
specified with absolute paths.
Fixes GitHub issue KhronosGroup#479.
VK-GL-CTS/framework/delibs/deutil/deDynamicLibrary.c
Lines 40 to 49 in 50e8312
I don't understand the purpose of such code in production - it looks like a testing hack that got accidentally committed?
The environment variable
LD_LIBRARY_PATH
, just likePATH
, can contain arbitrary entries that should be ignored whenever they are irrelevant to the program itself.Only way I could see this kind of logic making sense is trying both
dlopen(basename((char *)fileName), RTLD_LAZY)
anddlopen(fileName, RTLD_LAZY)
, whenLD_LIBRARY_PATH
is set (because, yes, they can pick different libraries).But which one should you prefer? If the user explicitly passed e.g.:
--deqp-vk-library-path=/my/local/build/of/vulkan-loader/lib/libvulkan.so
Why would that full path be ignored in favor of just
libvulkan.so
?Also, even with
LD_LIBRARY_PATH
unset, there is a hardcoded list of search directories built intolibdl
, sodlopen("libfoo.so")
could still succeed even then.(think
/lib64
, but also e.g. automatically appending subpaths likeglibc-hwcaps/x86-64-v3/
etc.)Personally, I had
deqp-vk
work before, and it so happens thatLD_LIBRARY_PATH
isn't set for me normally (e.g. in Konsole), but something or other leads to it being set in VSCode, and I was runningdeqp-vk
from inside VSCode this time.The text was updated successfully, but these errors were encountered: