ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Matlab Engine and ROS Library Incompatible?

asked 2012-05-05 05:28:18 -0600

mikemodanoxxx gravatar image

updated 2012-05-05 05:28:44 -0600

Hi there,

i am trying to establich a connection between Matlab 2012a and ROS fuerte. For the beginning i tried to modify the Listener/Talker tutorial. I just included the matlab api in the listener.cpp. It took me some time until i could compile the package with make. I changed the CMakeLists.txt in the beginner_tutorials folder in the following way and it seemed to work:

include_directories(/usr/local/MATLAB/R2012a/extern/include)
link_directories(/usr/local/MATLAB/R2012a/bin/glnx86)
link_directories(/usr/local/MATLAB/R2012a/sys/os/glnx86)

target_link_libraries(listener libeng.so)

But when i want to start a node now, i get the following errors:

/home/simon/ros_workspace/beginner_tutorials/bin/listener: /usr/local/MATLAB/R2012a/bin/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /opt/ros/fuerte/lib/libroscpp.so)

Are there some libs that are incompatible? Is there a way to fix that?

edit retag flag offensive close merge delete

Comments

I think you are using ipc bridge to connect if I am not wrong. I posted the solution to this problem in your previous question http://answers.ros.org/question/33279/matlab-ros-communication-with-ipc_bridge_ros . do check it.

sj haque gravatar image sj haque  ( 2012-05-05 05:33:40 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-06-03 20:02:46 -0600

rmattes gravatar image

MATLAB bundles its own libstdc++.so.6, which is generally older than the system-provided version. In my case, MATLAB is bundling libstdc++.so.6.0.13, whereas my distribution provides libstdc++.so.6.0.17.

You can try to replace the symlinks to libstdc++.so.6 in /usr/local/MATLAB/R2012a/bin/glnx86 and /usr/local/MATLAB/R2012a/sys/os/glnx86 to point to your system-installed version in /usr/lib. README.libstdc++ in /usr/local/MATLAB/R2012a/sys/os/glnx86 seems to indicate that at least that version is just included as a convenience. As long as the SOVERSION is the same and your system version is newer, you should be OK (and if MATLAB doesn't start, just put the symlinks back to the libstdc++ in your matlab installation folder.) I just changed the symlinks on my MATLAB installation to point to the distribution's libstdc++, it looks like I don't have any issues.

edit flag offensive delete link more
1

answered 2012-06-03 12:36:58 -0600

tfoote gravatar image

If you're using a different glibc version on your system from the one the debs are built against you will need to compile all of ROS from source against your custom version.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-05-05 05:28:18 -0600

Seen: 733 times

Last updated: Jun 03 '12