opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
778 stars 311 forks source link

Failed to load libraries when executing opensim after build, similar to Problem2 in Trouble shooting but different #3447

Closed ExtremelyDullCoder closed 1 year ago

ExtremelyDullCoder commented 1 year ago

When building MATLAB Scripting Environment on a linux server, after starting the configureOpenSim(), I encountered a failure of missing Utility folder, as shown below in the pictures. After that, when I entered 'org.opensim.modeling.opensimCommon.Getversion()' to test if I succeed, an error came out showing a library failure which is quite similar to the problem2 in the Trouble shooting. However, though I have add the path '~/opensim-workspace/opensim-core-dependencies-install/simbody/lib64' to LD_LIBRARY_PATH following the instructions in Trouble shooting, the error still exists. Notably, there is no 'lib' folder in '~/opensim-workspace/opensim-core-dependencies-install/simbody' as the Trouble shooting instructed. Only 'lib64' and 'libexec' folder exist. 1 2 3

aymanhab commented 1 year ago

This refers to a library that was used to link OpenSim during build time that can't be located by Matlab during runtime. The solution is to either use Matlab's version of this library or to add the path to this library to librarypath inside Matlab, just be aware of the risk of conflicts between this library and matlab's own. This doesn't seem to be an OpenSim bug/issue but rather two environments that are in conflict. Some solutions found online: https://stackoverflow.com/questions/35046753/using-mkl-error-while-loading-shared-libraries-libmkl-intel-lp64-so https://stackoverflow.com/questions/67257008/oserror-libmkl-intel-lp64-so-1-cannot-open-shared-object-file-no-such-file-or