0
$\begingroup$

Rosanswers logo

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?


Originally posted by mikemodanoxxx on ROS Answers with karma: 33 on 2012-05-05

Post score: 0


Original comments

Comment by sj haque on 2012-05-05:
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.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by rmattes with karma: 71 on 2012-06-03

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by tfoote with karma: 58457 on 2012-06-03

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.