-
Notifications
You must be signed in to change notification settings - Fork 85
Closed
Description
I met this assert in opencl clang building NEO driver:
cd /home/dvrogozh/git/github/tmp/neo/compute-runtime/runtime/built_ins/kernels && LD_LIBRARY_PATH=/home/dvrogozh/git/github/tmp/neo/compute-runtime/build/bin /home/dvrogozh/git/github/tmp/neo/compute-runtime/build/bin/ocloc -q -file aux_translation.igdrcl_built_in -device glk -64 -out_dir /home/dvrogozh/git/github/tmp/neo/compute-runtime/build/bin/built_ins/x64/gen9 -cpp_file -options -cl-kernel-arg-info
ocloc: /home/dvrogozh/git/github/tmp/common_clang/common_clang.cpp:127: bool GetHeaders(std::vector<Resource>&): Assertion `0 && "Resource not found"' failed.
It happens because libcommon_clang tries to open itself (#61 - why?) via linker name (i.e. libcommon_clang.so without .${LLVM_VERSION_MAJOR}) suffix:
LD_DEBUG=libs LD_LIBRARY_PATH=/home/dvrogozh/git/github/tmp/neo/compute-runtime/build/bin /home/dvrogozh/git/github/tmp/neo/compute-runtime/build/bin/ocloc -q -file aux_translation.igdrcl_built_in -device glk -64 -out_dir /home/dvrogozh/git/github/tmp/neo/compute-runtime/build/bin/built_ins/x64/gen9 -cpp_file -options -cl-kernel-arg-info
30327: find library=libcommon_clang.so [0]; searching
30327: search path=/lib64/../lib (RPATH from file /lib64/libLLVM-8.so)
30327: trying file=/lib64/../lib/libcommon_clang.so
30327: search path=/home/dvrogozh/git/github/tmp/neo/compute-runtime/build/bin (LD_LIBRARY_PATH)
30327: trying file=/home/dvrogozh/git/github/tmp/neo/compute-runtime/build/bin/libcommon_clang.so
30327: search cache=/etc/ld.so.cache
30327: trying file=/lib64/libcommon_clang.so
30327: search path=/lib64/tls/x86_64:/lib64/tls:/lib64/x86_64:/lib64:/usr/lib64/tls/x86_64:/usr/lib64/tls:/usr/lib64/x86_64:/usr/lib64 (system search path)
30327: trying file=/lib64/tls/x86_64/libcommon_clang.so
30327: trying file=/lib64/tls/libcommon_clang.so
30327: trying file=/lib64/x86_64/libcommon_clang.so
30327: trying file=/lib64/libcommon_clang.so
30327: trying file=/usr/lib64/tls/x86_64/libcommon_clang.so
30327: trying file=/usr/lib64/tls/libcommon_clang.so
30327: trying file=/usr/lib64/x86_64/libcommon_clang.so
30327: trying file=/usr/lib64/libcommon_clang.so
Linker name will be typically included in the opencl-clang**-devel** package which might be absent if user will install application which uses NEO driver, i.e. he will install runtime package only. Hence, opencl clang should use library soname to load other libraries.
dlopen() is called here:
Line 170 in 325cbb5
| void *handle = dlopen(lib, RTLD_NOW); |
Library name to load is set here:
Line 147 in 325cbb5
| add_definitions( -DLIBCOMMON_CLANG_NAME="lib${COMMON_CLANG_LIBRARY_NAME}.so") |
Metadata
Metadata
Assignees
Labels
No labels