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

Problem rosmake piano of mit-ros-pkg

asked 2012-03-06 01:56:15 -0500

owh gravatar image

updated 2012-03-11 20:14:00 -0500

I am having problem rosmake the piano package in mit-ros-pkg. The following is the error:

fatal error: SFML/Audio.hpp: No such file or directory

I had tried rosdep install piano, and it gave an error that it couldn't find

E: Unable to locate package libsfml-audio1.5
E: Couldn't find any package by regex 'libsfml-audio1.5'

I tried edit the rosdep.yaml in piano folder to change to libsfml-audio1.6, however rosdep keeps saying:

Executing script below with cwd=/tmp
#Packages ['libsfml-audio1.5', 'libsfml-dev']
sudo apt-get install libsfml-audio1.5 libsfml-dev

Does anyone know where do rosdep obtain the above info. It doesn't seem to refer to the rosdep.yaml in the package folder. I checked the mainfest.xml and only refer to libsfml as rosdep.

I tried manually

sudo apt-get install libsfml-audio1.6

The apt installed without problem. However, rosmake piano continues to give the error:

fatal error: SFML/Audio.hpp: No such file or directory

Hope to get help here to fix the above problem. I am on ros-electric on Ubuntu 11.10.


@AzuriViolin Many thanks for the ans. I do not know why I couldn't reply (comment) directly in your ans.

Indeed, I assumed the only failure was on libsfml-audio but rosdep didn't install libsfml-dev. So, I should:

sudo apt-get install libsfml-dev libsfml-audio1.6

The libsfml-dev provides the header files (developmental files) and so I got through the error of missing Audio.hpp. As you encountered, the next error is the missing linkage to sfml-system in CMakeLists.txt. It was resolved by:

roscd piano
gedit CMakeLists.txt

scroll to the bottom, and add sfml-system (few lines repeated):

rosbuild_add_executable(testsound src/exaudio.cpp)
target_link_libraries(testsound sfml-audio sfml-system)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-03-08 20:33:42 -0500

updated 2012-03-08 22:04:42 -0500

I solved the first problem. the rosdep information comes from mit-ros-pkg/kinect_utils/rosdep.yaml file.

try add

oneiric: apt: packages: [ libsfml-dev libsfml-audio1.6 ]

in this rosdep.yaml file and you'll be fine.

After these steps, rosmake have found SFML/, but there's new problem:

  /usr/bin/ld: CMakeFiles/testsound.dir/src/exaudio.o: undefined reference to symbol 'sf::Sleep(float)'
  /usr/bin/ld: note: 'sf::Sleep(float)' is defined in DSO /usr/lib/ so try adding it to the linker command line
  /usr/lib/ could not read symbols: Invalid operation
  collect2: ld returned 1 exit status
edit flag offensive delete link more

Question Tools


Asked: 2012-03-06 01:56:15 -0500

Seen: 504 times

Last updated: Mar 11 '12