robotology / wb-toolbox

Simulink toolbox to rapidly prototype robot controllers
https://robotology.github.io/wb-toolbox/
GNU Lesser General Public License v2.1
24 stars 17 forks source link

Error using WBToolbox on Ubuntu 20.04 #199

Closed S-Dafarra closed 3 years ago

S-Dafarra commented 3 years ago

Description

When I try to compile a simple project like https://github.com/robotology/whole-body-controllers/blob/master/utilities/debug_positionControl.mdl, it fails with the errors:

Failed to create factory
Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so)
Failed to get factory object (className=YarpRead,libName=WBToolbox)
Failed to get the factory

Platform

Ubuntu 20.04. It happens also without the robot or a simulator. Simply open the model of the link and try to compile.

Reproducibility

Describe the steps for reproducing the behavior. If possible, upload a simple Simulink model (only if the error does not either involve the real robot or it is reproducible in simulation).

  1. Open https://github.com/robotology/whole-body-controllers/blob/master/utilities/debug_positionControl.mdl
  2. Compile

Additional information

Additional context

It was working just months ago, on the same system. I wonder what it could have gone wrong. I usually call matlab as follows

alias matlab='cd ~/Documents/MATLAB && LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libstdc++.so.6 && LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SOFTWARE_DIR/IPOPT_Solvers matlab'

I wonder if this is still TROMH hitting once more.

Long output ``` Failed to create factory Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so) Failed to get factory object (className=YarpRead,libName=WBToolbox) Failed to get the factory Failed to create factory Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so) Failed to get factory object (className=YarpRead,libName=WBToolbox) Failed to get the factory Failed to create factory Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so) Failed to get factory object (className=YarpRead,libName=WBToolbox) Failed to get the factory Failed to create factory Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so) Failed to get factory object (className=YarpRead,libName=WBToolbox) Failed to get the factory Failed to create factory Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so) Failed to get factory object (className=YarpRead,libName=WBToolbox) Failed to get the factory Failed to create factory Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so) Failed to get factory object (className=YarpRead,libName=WBToolbox) Failed to get the factory Failed to create factory Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so) Failed to get factory object (className=YarpRead,libName=WBToolbox) Failed to get the factory Failed to create factory Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so) Failed to get factory object (className=YarpRead,libName=WBToolbox) Failed to get the factory Failed to create factory Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so) Failed to get factory object (className=YarpRead,libName=WBToolbox) Failed to get the factory Failed to create factory Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so) Failed to get factory object (className=YarpRead,libName=WBToolbox) Failed to get the factory Failed to create factory Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so) Failed to get factory object (className=GetMeasurement,libName=WBToolbox) Failed to get the factory Failed to create factory Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so) Failed to get factory object (className=GetMeasurement,libName=WBToolbox) Failed to get the factory Failed to create factory Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so) Failed to get factory object (className=GetMeasurement,libName=WBToolbox) Failed to get the factory Failed to create factory Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so) Failed to get factory object (className=RealTimeSynchronizer,libName=WBToolbox) Failed to get the factory ```
traversaro commented 3 years ago

Probably some change in iDynTree that used some STL function that in turn require some symbol from a modern libstdcxx, given that the error is:

Factory error (3): /usr/local/MATLAB/R2020a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/sdafarra/Software/robotology-superbuild/build/install/lib/libidyntree-high-level.so)

I wonder if this is still TROMH hitting once more.

I think so.

Cross-link : https://github.com/robotology/robotology-superbuild/issues/64 .

S-Dafarra commented 3 years ago

I am using the current iDynTree master https://github.com/robotology/idyntree/commit/e52d72a6fb3c0872bd9bcf830325776caf909db5

S-Dafarra commented 3 years ago

Related comment: https://github.com/robotology/robotology-superbuild/issues/64#issuecomment-767042608

S-Dafarra commented 3 years ago

This got fixed by installing the matlab-support package. See https://github.com/robotology/robotology-superbuild/issues/64#issuecomment-727241894