diff --git a/README.md b/README.md index f85fae066..8d72a169c 100644 --- a/README.md +++ b/README.md @@ -296,6 +296,32 @@ The `robotology-superbuild` is based on [YCM](https://github.com/robotology/ycm) International Journal of Semantic Computing (IJSC), Vol. 13, No. 02, 2019 +### How do I solve the "Invalid MEX-file <...>" error message on Linux when using MATLAB or Simulink libraries? + +If you are on Linux and you encounter errors similar to: +~~~ +Invalid MEX-file '/home/username/Software/robotology-superbuild/build/install/mex/WBToolbox.mexa64': + /home/username/Software/matlab/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: +version `GLIBCXX_3.4.21' not found (required by /home/username/Software/robotology-superbuild/build/install/mex/WBToolbox.mexa64) +~~~ +when running MATLAB or Simulink libraries installed by the robotology-superbuild, to solve the problem it should be sufficient to run: +~~~ +sudo apt install matlab-support +~~~ +and specify your MATLAB installation directory and when there is the question "Rename MATLAB's GCC libraries?" answer "Yes". + +If there are no configuration question when you run , probably that means that the package is already installed. In that case, you can just reconfigure it with the command: +~~~ +sudo dpkg-reconfigure matlab-support +~~~ +and again, specify your MATLAB installation directory and when there is the question "Rename MATLAB's GCC libraries?" answer "Yes". + +If the problem persists even after following this steps, please [open a new issue in the robotology-superbuild issue tracker](https://github.com/robotology/robotology-superbuild/issues/new). + + + + + Mantainers ========== diff --git a/doc/cmake-options.md b/doc/cmake-options.md index e029fffc9..49599a6d5 100644 --- a/doc/cmake-options.md +++ b/doc/cmake-options.md @@ -306,6 +306,7 @@ For more info on configuring MATLAB software with the robotology-superbuild, ple ### Check the installation To verify that the compilation of `ROBOTOLOGY_USES_MATLAB` option was successful, try to run a script that uses the Matlab bindings of `yarp` and see if it executes without any error, for example: + ~~~matlab yarpVec = yarp.Vector(); yarpVec.resize(3); @@ -314,6 +315,8 @@ yarpVec.toMatlab() ~~~~ This scripts should print a `1 2 3` vector, but only if the `yarp` bindings are working correctly. +If executing this script you obtain a "Invalid MEX-file ..." error, please check how to solve this problem in [the related FAQ question in robotology-superbuild's README](../README.md#how-do-i-solve-the-invalid-mex-file--error-message-on-linux-when-using-matlab-or-simulink-libraries). + ## Octave @@ -334,7 +337,8 @@ yarpVec.resize(3); yarpVec.fromMatlab([1;2;3]); yarpVec.toMatlab() ~~~~ -This scripts should print a `1 2 3` vector, but only if the `yarp` bindings are working correctly. +This scripts should print a `1 2 3` vector, but only if the `yarp` bindings are working correctly. + ## Python diff --git a/doc/matlab-one-line-install.md b/doc/matlab-one-line-install.md index fb28d4e36..ee4d59fd1 100644 --- a/doc/matlab-one-line-install.md +++ b/doc/matlab-one-line-install.md @@ -20,6 +20,7 @@ vec.fromMatlab([1,2,3]) vec.toString(); ~~~ +If executing this script you obtain a "Invalid MEX-file ..." error, please check how to solve this problem in [the related FAQ question in robotology-superbuild's README](../README.md#how-do-i-solve-the-invalid-mex-file--error-message-on-linux-when-using-matlab-or-simulink-libraries). ### Installation on MATLAB Online