Why do I get the error: “Error in ros.internal.utilities.checkAndGetCompatibleCompilersLocation (line 73)”?
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.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. 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. ros2, matlab, custom messages, ros2genmsg, ubuntu2204 MATLAB Answers — New Questions