Results 129 comments of Stefan Marsiske

musl does not implement LD_DEBUG. i'll strace ocloc instead and see what libs it loads.

what's loaded: ``` "/usr/lib/libunwind.so.8" "/usr/lib/libexecinfo.so.1" "/usr/lib/libstdc++.so.6" "/usr/lib/libgcc_s.so.1" "/usr/lib/libigdfcl.so.1" "/usr/lib/libLLVM-9.so" "/usr/lib/libopencl-clang.so.9" "/usr/lib/libffi.so.6" "/lib/libz.so.1" "/usr/lib/libxml2.so.2" "/usr/lib/liblzma.so.5" "/usr/lib/libigc.so.1" ``` strangely libgic gets loaded, but still i get the same error as in the...

it looks like libigc.so is mapped correctly, as seen in strace: ``` open("/usr/lib/libigc.so.1", O_RDONLY|O_CLOEXEC) = 3 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 fstat(3, {st_mode=S_IFREG|0755, st_size=28370792, ...}) = 0 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\241\r\0\0\0\0\0"..., 960)...

when i run ocloc with `LD_PRELOAD=/usr/lib/libigc.so` and strace it, then i get this: ``` open("/usr/lib/libigc.so.1", O_RDONLY|O_CLOEXEC) = 3 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 fstat(3, {st_mode=S_IFREG|0755, st_size=28370792, ...}) = 0 read(3,...

> "Error loading the Generic builtin resource" this message came from IGC, see line 951 yes, and it is fixed by linking/preloading libigc to ocloc, i traced that.

> "Error loading the Generic builtin resource" this message came from IGC, see [line 951](https://github.com/intel/intel-graphics-compiler/blob/master/IGC/AdaptorOCL/dllInterfaceCompute.cpp#L951) llvm::LoadBufferFromResource is failing and returning NULL here: https://github.com/intel/intel-graphics-compiler/blob/67351f4e52f52eb2e4d68a9a40599a77733b5603/IGC/AdaptorOCL/OCL/LoadBuffer.cpp#L59 when libigc is not linked/preloaded by only...

> Can you verify IGC was built correctly, linked with builtins? I've observed successful IGC builds although there were problems with builtins. sure, how do i verify builtins?

confirmed, i have this: ``` % nm -DC /usr/lib/libigc.so | grep _igc_bif_ 0000000000aa7020 D _igc_bif_BC_120 0000000000aa7000 D _igc_bif_BC_120_size 0000000000b226e0 D _igc_bif_BC_121 0000000000b226d8 D _igc_bif_BC_121_size 0000000000b9ecc0 D _igc_bif_BC_122 0000000000b9eca8 D _igc_bif_BC_122_size...

after consulting with the fine people of #musl the suggestion was to add RTLD_GLOBAL to this line: https://github.com/intel/compute-runtime/blob/master/shared/source/os_interface/linux/os_library_linux.cpp#L33 and it seems to work.

with a few more minor changes i manage to compile most of it now. however at the "end" i get random errors, like: ``` Running igdrcl_tests 1x6x16 in /home/s/tasks/aports/ugly/compute-runtime/src/compute-runtime-20.08.15750/build/bin/tgllp cd...