R2025a Ros2 Jazzy Ubuntu LIBSTDC++ error help!
Show older comments
Hello,
I am fairly new to ROS2 and Linux in-general, so bear with me. I am trying to update a robotics software stack from a previous version of MATLAB running on Ubuntu 22.04.5 and ROS2 Humble to R2025a MATLAB running on Ubuntu 24.04(.3 i believe, I am writing this away from my computer so apologies) and using ROS2 Jazzy. Additionally, I have the simulink, control system toolbox, MATLAB coder, MATLAB compiler, requirements toolbox. ROS toolbox, and simulink coder toolboxes installed.
I have gotten R2025a installed withinUbuntu 24.04, as well as ROS2 Jazzy, onto a virtual machine through Quickemu. However, recently I have been stuck on the following errors and have yet to find a working solution.
First, I got a few unrecognized custom message type errors which I attempted to fix by utilizing ros2genmsg, and then refresh_custom_msgs, but was then hit with the following –
>> refresh_custom_msgs
Preparing work directory
Identifying message files in folder '/home/dino/osu-uwrt/matlab/custom_msgs'..Validating message files in folder '/home/dino/osu-uwrt/matlab/custom_msgs'..Done.
Done.
[0/1] 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 524)
[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);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in refresh_custom_msgs (line 44)
ros2genmsg(WORK_DIR);
^^^^^^^^^^^^^^^^^^^^
I have tried installing new GCC versions but to no avail, alongside many other things. Any help would be greatly appreciated!
1 Comment
Walter Roberson
on 8 Feb 2026
It would be of interest to put a breakpoint at line 73 of ros.internal.utilities.checkAndGetCompatibleCompilersLocation and check to see what was stored in matlabLIBSTDCXXVersionNum
Answers (0)
Categories
Find more on Custom Message Support 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!