oneDAL icon indicating copy to clipboard operation
oneDAL copied to clipboard

Can not deploy an application that is dynamically linked against oneDAL

Open emmenlau opened this issue 3 years ago • 0 comments

Describe the bug I'm using cmake do make a deployable archive of my application. When I started linking oneDAL dynamically, the building of the archive failed. I have patched cmake to report more information about the problem. The extended cmake error message is:

CMake Error at cppserver/cmake/bda_get_runtime_deps.cmake:62 (file):
  file Paths to dependencies are not supported (in dependency
  '/data/usr/oneapi/dal/2021.5.3/lib/intel64/libonedal_core.so.1.1'
  of file
  '/data/user/Debug/bin/BDALicenseServer',
  origin '/data/user/Debug/bin')
Call Stack (most recent call first):
  cppserver/cmake_install.cmake:60 (include)
  cmake_install.cmake:52 (include)

I am not sure what the error means because I have never seen this before. I did run ldd on the executable to understand the problem better, and there is something very curious:

#> ldd /data/user/bin/DemoApp
	linux-vdso.so.1 (0x00007ffc91b83000)
	libssl.so.1.1 => /data/user/bin/../lib/libssl.so.1.1 (0x00007f64da88d000)
	libcrypto.so.1.1 => /data/user/bin/../lib/libcrypto.so.1.1 (0x00007f64da52d000)
	libduckdb.so => /data/user/bin/../lib/libduckdb.so (0x00007f64d759c000)
	libpq.so.5 => /data/user/bin/../lib/libpq.so.5 (0x00007f64d753f000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f64d7514000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f64d74ef000)
	libexpat.so.1 => /data/user/bin/../lib/libexpat.so.1 (0x00007f64d74b0000)
	libdouble-conversion.so.3 => /data/user/bin/../lib/libdouble-conversion.so.3 (0x00007f64d7490000)
	libtbb_debug.so.12 => /data/user/bin/../lib/libtbb_debug.so.12 (0x00007f64d73d6000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f64d7287000)
	libtiff.so.5 => /data/user/bin/../lib/libtiff.so.5 (0x00007f64d71e4000)
	libproj.so.12 => /data/user/bin/../lib/libproj.so.12 (0x00007f64d715e000)
	libtiffxx.so.5 => /data/user/bin/../lib/libtiffxx.so.5 (0x00007f64d7158000)
	libpng16.so.16 => /data/user/bin/../lib/libpng16.so.16 (0x00007f64d7110000)
	libturbojpeg.so.0 => /data/user/bin/../lib/libturbojpeg.so.0 (0x00007f64d702e000)
	libjpeg.so.8 => /data/user/bin/../lib/libjpeg.so.8 (0x00007f64d6f66000)
	liblcms2.so.2 => /data/user/bin/../lib/liblcms2.so.2 (0x00007f64d6eeb000)
	liblzma.so.5 => /data/user/bin/../lib/liblzma.so.5 (0x00007f64d6ea8000)
	libbz2.so.1.0.8 => /data/user/bin/../lib/libbz2.so.1.0.8 (0x00007f64d6e8e000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f64d6e88000)
	/data/user/oneapi/dal/2021.5.3/lib/intel64/libonedal_core.so.1.1 (0x00007f64cde8f000)
	/data/user/oneapi/dal/2021.5.3/lib/intel64/libonedal_sequential.so.1.1 (0x00007f64cc01c000)
	libz.so.1 => /data/user/bin/../lib/libz.so.1 (0x00007f64cbff4000)
	libQt6Core.so.6 => /data/user/bin/../lib/libQt6Core.so.6 (0x00007f64cb721000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/debug/libstdc++.so.6 (0x00007f64cb4cb000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f64cb4b0000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f64cb2be000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f64db965000)
	libzstd.so.1 => /data/user/bin/../lib/../lib/libzstd.so.1 (0x00007f64cb0d8000)
	libicui18n.so.70 => /data/user/bin/../lib/../lib/libicui18n.so.70 (0x00007f64cac9d000)
	libicuuc.so.70 => /data/user/bin/../lib/../lib/libicuuc.so.70 (0x00007f64caa02000)
	libicudata.so.70 => /data/user/bin/../lib/../lib/libicudata.so.70 (0x00007f64c8de5000)
	libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f64c8cbc000)
	libpcre2-16.so.0 => /data/user/bin/../lib/../lib/libpcre2-16.so.0 (0x00007f64c8c4f000)
	libgthread-2.0.so.0 => /lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f64c8c4a000)
	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f64c8bd7000)

The libonedal is not present as a name followed by =>, but instead just as an absolute library name.

To Reproduce Steps to reproduce the behavior:

  1. Use cmake to detect oneDAL
  2. Link the application against the found libraries
  3. See the problem with ldd

Expected behavior The linker path should be "normal" with a name and a path, separated by arrow =>

Environment:

  • OS: Ubuntu 20.04 x86_64
  • Compiler: Clang 14.0.1 from LLVM

emmenlau avatar Apr 09 '22 10:04 emmenlau