Why do I get the error: "Error in ros.internal.utilities.checkAndGetCompatibleCompilersLocation (line 73)"?
26 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Alberto Piccina
el 12 de Ag. de 2024
Comentada: decs
el 23 de Oct. de 2024
Hi,
I'm trying to implement some ROS2 custom messages into Matlab and I've not found a solution yet.
I downloaded the following repo: https://github.com/ros2/common_interfaces.git
In order to recreate the errors:
- download the repo (I choose to clone it in the home);
- open Matlab and move to this folder;
- give the following command in the command window
ros2genmsg(".")
After this, I get these errors:
>> ros2genmsg(".")
Identifying message files in folder '/home/alberto/common_interfaces'..Validating message files in folder '/home/alberto/common_interfaces'..Done.
Done.
[0/11] Generating MATLAB interfaces for custom message packages... 0%Error using ()
Key not found.
Error in ros.internal.utilities.checkAndGetCompatibleCompilersLocation (line 73)
matlabInCompatibleCompilerVer = supportedCompilerVersions(matlabLIBSTDCXXVersionNum+1);
Error in ros.internal.ROSProjectBuilder (line 453)
[h.GccLocation, h.GppLocation] = ros.internal.utilities.checkAndGetCompatibleCompilersLocation();
Error in ros.ros2.internal.ColconBuilder (line 26)
h@ros.internal.ROSProjectBuilder(varargin{:});
Error in ros2genmsg (line 278)
builder = ros.ros2.internal.ColconBuilder(genDir, pkgInfos{iPkg}, UseNinja=useNinja, SuppressOutput=suppressOutput);
I tried to recompile ROS packages and even to change compilers' version, but I can't find a way out.
I'm working on Ubuntu 22.04, the Matlab version that I'm using is:
MATLAB Version: 23.2.0.2599560 (R2023b) Update 8
Operating System: Linux 6.5.0-45-generic #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 15 16:40:02 UTC 2 x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Following, I'm reporting versions of gcc, g++, Python, cmake and ROS:
- gcc (Ubuntu 10.5.0-1ubuntu1~22.04) 10.5.0
- g++ (Ubuntu 10.5.0-1ubuntu1~22.04) 10.5.0
- Python 3.10.12
- cmake 3.22.1
- ROS2 humble
Thanks for the help.
4 comentarios
decs
el 23 de Oct. de 2024
Hi Alberto,
Did you find a solution for this problem? I am stuck with the same error, but it hasn't been resolved by the suggestions given so far.
Thanks,
Declan
Respuesta aceptada
Garmit Pant
el 13 de Ag. de 2024
Hello Alberto
The error you are facing is due to missing libraries. Based on the investigation of the error and the output of the ‘matlabLIBSTDCXXVersion’ reflecting “No such file”, it is evident that the C++ standard library shipped with MATLAB is missing. The symbolic link ‘libstdc++.so.6’ is not present in the MATLAB installation folder on your system.
This can be resolved by re-installing MATLAB on your system, which will ensure that all the necessary libraries are installed.
Alternatively, you can install the ‘matlab-support’ package to configure MATLAB to integrate with the Linux distro. You can install this package by using the following command in the terminal:
sudo apt-get install matlab-support
I hope you find the above explanation and suggestions useful!
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Custom Message Support en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!