You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to install mystica on a linux machine (see documentation).
I ran the autogenerated deps/setup.m file that configure matlabpath (see documentation)
But when I call a basic casadi function I got an error
So, it is clear that the problem is in the MATLAB vendored version that is not new enough, i.e. the problem usually described in robotology/robotology-superbuild#64 , I think it can be solved with one of this three tricks that are widespread in the lab:
Install the matlab-support package with apt (sudo apt install matlab-support, I am not sure this actually works)
Always launch matlab with LD_PRELOAD, i.e. add
alias matlab="LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 matlab"
in .bashrc
Rename /usr/local/MATLAB/R2020b/sys/os/glnxa64/libstdc++.so.6 to /usr/local/MATLAB/R2020b/sys/os/glnxa64/libstdc++.so.6.back
It seems that iiticubws050 is a Ubuntu 18.04, that so has an older GCC/libstdc++.so.6 . If there you are getting the same error, probably it is better to do the LD_PREALOAD trick with $CONDA_PREFIX/lib/libstdc++.so.6 .
@FabioBergonti commented on Wed May 18 2022
I tried to install mystica on a linux machine (see documentation).
I ran the autogenerated
deps/setup.m
file that configure matlabpath (see documentation)But when I call a basic casadi function I got an error
@FabioBergonti commented on Wed May 18 2022
Here the autogenerated
setup.m
@FabioBergonti commented on Wed May 18 2022
@traversaro
Have you ever seen something similar?
@traversaro commented on Wed May 18 2022
It is probably an incompatibility problem between libstdc++ of either:
Can you provide more info (operating system,
mamba list
, MATLAB version) to simplify the debugging?@traversaro commented on Wed May 18 2022
Related errors:
@FabioBergonti commented on Thu May 19 2022
Hi @traversaro
Here the requested info
Ubuntu 20.04.3 LTS
r2020b
@traversaro commented on Thu May 19 2022
So,
GLIBCXX_3.4.26
was added in gcc/libstcxx in 2018 : https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/ChangeLog-2018#L1072 and release in GCC 9.1 that was released in May 2019 (see https://gcc.gnu.org/gcc-9/). ApparentlycasadiMEX.so
requires at least that version, but something is not providing it.I have a version similar to yours, and I tried to see which version of libstdcxx is not providing it.
The apt version has ~430 symbols with that version:
The conda version has ~431 symbols
The MATLAB vendored version has ~0 symbols:
So, it is clear that the problem is in the MATLAB vendored version that is not new enough, i.e. the problem usually described in robotology/robotology-superbuild#64 , I think it can be solved with one of this three tricks that are widespread in the lab:
matlab-support
package withapt
(sudo apt install matlab-support
, I am not sure this actually works)matlab
with LD_PRELOAD, i.e. addin
.bashrc
/usr/local/MATLAB/R2020b/sys/os/glnxa64/libstdc++.so.6
to/usr/local/MATLAB/R2020b/sys/os/glnxa64/libstdc++.so.6.back
@FabioBergonti commented on Thu May 19 2022
I tried to run matlab with LD_PRELOAD
and it worked 🎉🎉
Thanks @traversaro
@FabioBergonti commented on Thu May 19 2022
I opened a PR in mystica to document this problem #5
Closing this issue
@FabioBergonti commented on Fri May 20 2022
I continued the investigation by installing only casadi via mamba.
I executed this test with these machines:
iiticubws022
withUbuntu 20.04.3 LTS
andMatlab R2021a
casadi worked without the need of running matlab with LD_PRELOAD
iiticubws050
withUbuntu 18.04.6 LTS
andMatlab R2019b
it didn't work even with LD_PRELOAD. I got the same error
Here the mamba list
@FabioBergonti commented on Fri May 20 2022
I tried to repeat on
iiticubws050
the analysis done by @traversaro beforeDoes this mean that
GLIBCXX_3.4.26
is not available in the installed librarylibstdc++.so.6
?@traversaro commented on Fri May 20 2022
It seems that
iiticubws050
is a Ubuntu 18.04, that so has an older GCC/libstdc++.so.6 . If there you are getting the same error, probably it is better to do the LD_PREALOAD trick with$CONDA_PREFIX/lib/libstdc++.so.6
.@FabioBergonti commented on Fri May 20 2022
indeed
Yes! Running Matlab with
LD_PRELOAD=$CONDA_PREFIX/lib/libstdc++.so.6 matlab
solved the issue.Thanks @traversaro
The text was updated successfully, but these errors were encountered: