Rosanswers logo

Linking CXX executable gazebo-non-ros libgazebo_server.so.0.10.0: undefined reference to clock_gettime' collect2: ld returned 1 exit status make[4]: *** [server/gazebo-non-ros] Error 1 make[4]: Leaving directory /home/klapfer/ros/stacks/simulator_gazebo/gazebo/build/gazebo/build' make[3]: *** [server/CMakeFiles/gazebo-exec.dir/all] Error 2 make[3]: Leaving directory /home/klapfer/ros/stacks/simulator_gazebo/gazebo/build/gazebo/build' make[2]: *** [all] Error 2 make[2]: Leaving directory /home/klapfer/ros/stacks/simulator_gazebo/gazebo/build/gazebo/build' make[1]: *** [installed] Error 2 make[1]: Leaving directory `/home/klapfer/ros/stacks/simulator_gazebo/gazebo' CMake Error at CMakeLists.txt:32 (message): Build of Gazebo failed

I just changed computer this morning and when trying to compile the gazebo_simulator I get this error. It is computer depended, but I have no clue where the error comes from.

I hope I can find some help here. Thank you all in advance.


Originally posted by ReiniK on ROS Answers with karma: 84 on 2012-02-28

Post score: 0

Original comments

Comment by ReiniK on 2012-02-28:
Note: I am tryng to compile the latest version taken from https://code.ros.org/svn/ros-pkg/stacks/simulator_gazebo/tags/electric/


1 Answer 1


Rosanswers logo

Modifying the file: ~/ros/stacks/simulator_gazebo/gazebo/build/gazebo/server/CMakeLists.txt helped.

target_link_libraries( gazebo-exec ${libtool_library}


But is is not optimal and the changes are undone when cleaning the project. If someone knows a solution to this it would be nice to share it here.

Thank you.

Originally posted by ReiniK with karma: 84 on 2012-02-28

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by hsu on 2012-02-28:
this has change has been added to the repo, and will be there in the next release 1.4.12 (https://kforge.ros.org/gazebo/hg/rev/2ab1039c959f)


Your Answer

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