Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcasadi_importer_clang.so: cannot open shared object file: No such file or directory #3372

Closed
ksomml opened this issue Sep 15, 2023 · 1 comment

Comments

@ksomml
Copy link

ksomml commented Sep 15, 2023

I wanted to try out the examples of the github project urdf2casadi and received the following error:

Traceback (most recent call last):
  File "/.../urdf2casadi/examples/numerical/kuka/forward_dynamics_aba_kuka.py", line 24, in <module>
    qddot_sym_aba = kuka.get_forward_dynamics_aba(root, tip, gravity=gravity)
  File "/home/****/.local/lib/python3.10/site-packages/urdf2casadi/urdfparser.py", line 560, in get_forward_dynamics_aba
    q_ddot = cs.Function("q_ddot", [q, q_dot, tau],
  File "/home/****/.local/lib/python3.10/site-packages/casadi/casadi.py", line 23607, in __init__
    this = _casadi.new_Function(*args)
RuntimeError: Error in Function::Function for 'q_ddot' [SXFunction] at .../casadi/core/function.cpp:224:
.../casadi/core/function_internal.cpp:153: Error calling SXFunction::finalize for 'q_ddot':
.../casadi/core/casadi_os.cpp:166: Assertion "handle!=nullptr" failed:
PluginInterface::load_plugin: Cannot load shared library 'libcasadi_importer_clang.so': 
   (
    Searched directories: 1. casadipath from GlobalOptions
                          2. CASADIPATH env var
                          3. PATH env var (Windows)
                          4. LD_LIBRARY_PATH env var (Linux)
                          5. DYLD_LIBRARY_PATH env var (osx)
    A library may be 'not found' even if the file exists:
          * library is not compatible (different compiler/bitness)
          * the dependencies are not found
   )
  Tried '/home/somml/.local/lib/python3.10/site-packages/casadi' :
    Error code: /home/somml/.local/lib/python3.10/site-packages/casadi/libcasadi_importer_clang.so: cannot open shared object file: No such file or directory
  Tried '' :
    Error code: libcasadi_importer_clang.so: cannot open shared object file: No such file or directory
  Tried '.' :
    Error code: ./libcasadi_importer_clang.so: cannot open shared object file: No such file or directory

Not sure if I looked in the right directory but i only found a file called libcasadi_importer_shell.so.3.7 inside /home/****/.local/lib/python3.10/site-packages/casadi.

I installed casadi through pip install casadi. Due to the error message, I thought the issue might be due to Casadi and not the examples of the urdf2casadi github project.

Any hint to fixing this would be appreciated!

@jgillis
Copy link
Member

jgillis commented Sep 15, 2023

'clang' plugin used to be shipped with casadi binaries, but not any longer since it as a burden to maintain. The suggestion is to use 'shell' instead. You can pass 'compiler' option 'shell' at Functioj construction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants