rbdl / rbdl-toolkit

Application for visualizing and working with rbdl models
European Union Public License 1.2
19 stars 11 forks source link

Linking error ... #8

Closed mjhmilla closed 4 years ago

mjhmilla commented 4 years ago

When I run rbdl-toolkit on a test model and file I get a linking error:


rbdl-toolkit: error while loading shared libraries: librbdl.so.3.0.0: cannot open shared object file: No such file or directory

I have just built the latest version of rbdl from the Orb-hd page, and the install folder contains librbdl.so.3.0.0. I suspect this is a CMakeLists error in rbdl-toolkit. Perhaps the custom rbdl directory is not being used to find the library? I'd check myself right now but I'm nearly out of time today.

nag92 commented 2 years ago

I am having the same problem, how was it solved?

ju6ge commented 2 years ago

Make extra sure to have a clean environment. A thing that bit me was that there where two versions of the toolkitlib … RBDL Toolkit has most of its functionality within the toolkitlib so that the plugins can interact with the main software. But if you build and installed rbld-toolkit it may be the case, that the toolkitlib build previously is still present and it is used instead of the newer version that was just build. This leads to rbdl-toolkit launching with the old toolkitlib which loads the wrong version of rbdl. While the plugin load rbdl directly leading to version mismatches.

nag92 commented 2 years ago

It seems like the problem is that I am using librbdl.so.3.1.3 and it wants librbdl.so.3.0.0

ju6ge commented 2 years ago

Okay so I can not tell you what is happening on your system. But for me when I had a similar issue it was not a problem of the build binaries, but a problem when the program is started.

The linkage situation is the following:

rbdl-toolkit   -> toolkitlib -> rbdl

toolkit-plugin -> toolkitlib
               -> rbdl

My problem arisos when an older toolkitlib is loaded at runtime instead of the freshly build one. This happend to me because the toolkitlib that was located in my installation path was older. Because that toolkitlib loads an older version of rbdl. The conflict happens when the plugins try to load the newer version of rbdl. So make extra sure what libraries are loaded at runtime. A helpful tool is ldd it tells you what libraries a specific binary/library depends on.