Why do I get the error: "Error in ros.internal.utilities.checkAndGetCompatibleCompilersLocation (line 73)"?
Show older comments
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 Comments
Garmit Pant
on 12 Aug 2024
Hello Alberto
The error seems to be arrising when MATLAB is checking for compatible compliers' location. Specifically, the error is being triggered when MATLAB is extracting the maximum version of GLIBCXX_ symbols supported by MATLAB shipped libstdc++.so.6 library.
Please run the following lines of code in a script, live script or command window and please share the value of 'matlabLIBSTDCXXVersion' for further investigation:
matlabLIBSTDCXX = fullfile(matlabroot,'sys','os','glnxa64','libstdc++.so.6');
stringsCmd = ['strings ', matlabLIBSTDCXX, ' | grep LIBCXX_3 | sort -V | tail -1'];
[stringsCmdStatus, matlabLIBSTDCXXVersion] = system(stringsCmd);
Josh Chen
on 13 Aug 2024
Hello Alberto,
Is there any log file or "build log" hyperlink showing up when you see this error message?
Thanks,
Josh
Alberto Piccina
on 13 Aug 2024
decs
on 23 Oct 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
Accepted Answer
More Answers (0)
Categories
Find more on Get Started with ROS Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!