フィルターのクリア

How to get details on "Unable to load interface library" in using clib.

4 ビュー (過去 30 日間)
Andreas Lobinger
Andreas Lobinger 2021 年 8 月 17 日
コメント済み: Trevor 2024 年 5 月 29 日
We're building interface modules for a C++ library with clibgen - in different linux setups (server, local PC, cloud). We have a build that works, but not on all setups - and we use Matlab2021a. The error message on computer is:
Unable to load interface library:
'/home/de11/sim_interfaces/matlab_to_cpp/cpp_lib/WI_MatlabInterface/WI_MatlabInterfaceInterface.so'.
Reason: The specified module could not be found.
Ensure the C++ dependent libraries for the interface library are added to
run-time path.
is telling me something, but not the full picture. As far as i can see all C++ dependent libraries are on the LD_LIBRARY_PATH and calling ldd on the command line tells me all dependencies can be resolved.
But how can i check the same within the matlab session?
  1 件のコメント
Sreevatsank K
Sreevatsank K 2021 年 12 月 25 日
I am facing the same issue, were you able to resolve this?

サインインしてコメントする。

採用された回答

Andreas Lobinger
Andreas Lobinger 2021 年 8 月 18 日
Partial solution:
one can call ldd via system - within the matlab enviroment.
>> system('ldd WI_MatlabInterfaceInterface.so')
./WI_MatlabInterfaceInterface.so: /home/de11/matlab2021a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/de11/genmat/build.Release/libCore.so)
linux-vdso.so.1 (0x00007ffc9859e000)
libCore.so => /home/de11/genmat/build.Release/libCore.so (0x00007f5c3f31a000)
libMatlabDataArray.so => /home/de11/matlab2021a/bin/glnxa64/libMatlabDataArray.so (0x00007f5c3f2f4000)
libstdc++.so.6 => /home/de11/matlab2021a/sys/os/glnxa64/libstdc++.so.6 (0x00007f5c3ef71000)
libgcc_s.so.1 => /home/de11/matlab2021a/sys/os/glnxa64/libgcc_s.so.1 (0x00007f5c3ed59000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5c3eb5f000)
libpython3.8.so.1.0 => /lib/x86_64-linux-gnu/libpython3.8.so.1.0 (0x00007f5c3e607000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5c3e4b8000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5c3f83d000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5c3e4b2000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5c3e48f000)
libexpat.so.1 => /home/de11/matlab2021a/bin/glnxa64/libexpat.so.1 (0x00007f5c3e464000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f5c3e446000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f5c3e441000)
ans =
0
  2 件のコメント
Sreevatsank K
Sreevatsank K 2021 年 12 月 25 日
setenv LD_LIBRARY_PATH 'path/to/lib'
Can modify the LD_LIBRARY_PATH, and you can get system('ldd libname.so') to work. But this does not solve the original problem
Trevor
Trevor 2024 年 5 月 29 日
Is there a way to get more info on which library failed to load with this error on macos?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBuild MATLAB Interface to C++ Library についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by