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

bondcpp fails on osx

asked 2014-10-03 12:51:08 -0600

Tiberius gravatar image

updated 2014-10-06 10:29:11 -0600

ahendrix gravatar image

Hello! I tried the tutorial http://wiki.ros.org/indigo/Installati... and I know there is a section there for bondcpp fails and the exact problem I have, which is:

Built target roscpp_generate_messages_cpp
Linking CXX shared library /Users/tiberio/ros_catkin_ws/devel_isolated/bondcpp/lib/libbondcpp.dylib
ld: library not found for -luuid
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/tiberio/ros_catkin_ws/devel_isolated/bondcpp/lib/libbondcpp.dylib] Error 1
make[1]: *** [CMakeFiles/bondcpp.dir/all] Error 2
make: *** [all] Error 2
<== Failed to process package 'bondcpp':
  Command '/Users/tiberio/ros_catkin_ws/install_isolated/env.sh make -j8 -l8' returned non-zero exit status 2

Reproduce this error by running:
==> cd /Users/tiberio/ros_catkin_ws/build_isolated/bondcpp && /Users/tiberio/ros_catkin_ws/install_isolated/env.sh make -j8 -l8

Command failed, exiting.

However the solution doesn't work. Am I doing it right?

I did:

brew update
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro indigo -y

and then tried again

./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release

and had no better luck.

I thank you all for the patience and time in advance.

EDIT: Output from VERBOSE=1, I ran only cd /Users/tiberio/ros_catkin_ws/build_isolated/bondcpp && VERBOSE=1 /Users/tiberio/ros_catkin_ws/install_isolated/env.sh make -j8 -l8

cd /Users/tiberio/ros_catkin_ws/build_isolated/bondcpp && /Users/tiberio/ros_catkin_ws/install_isolated/env.sh make VERBOSE=1 -j8 -l8
/usr/local/Cellar/cmake/3.0.2/bin/cmake -H/Users/tiberio/ros_catkin_ws/src/bond_core/bondcpp -B/Users/tiberio/ros_catkin_ws/build_isolated/bondcpp --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.0.2/bin/cmake -E cmake_progress_start /Users/tiberio/ros_catkin_ws/build_isolated/bondcpp/CMakeFiles /Users/tiberio/ros_catkin_ws/build_isolated/bondcpp/CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/depend
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/bond_generate_messages_cpp.dir/build.make CMakeFiles/bond_generate_messages_cpp.dir/depend
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/bond_generate_messages_lisp.dir/build.make CMakeFiles/bond_generate_messages_lisp.dir/depend
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/bond_generate_messages_py.dir/build.make CMakeFiles/bond_generate_messages_py.dir/depend
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make CMakeFiles/std_msgs_generate_messages_lisp.dir/depend
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/roscpp_generate_messages_cpp.dir/build.make CMakeFiles/roscpp_generate_messages_cpp.dir/depend
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_py.dir/depend
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/std_msgs_generate_messages_py.dir/build.make CMakeFiles/std_msgs_generate_messages_py.dir/depend
cd /Users/tiberio/ros_catkin_ws/build_isolated/bondcpp && /usr/local/Cellar/cmake/3.0.2/bin/cmake -E cmake_depends "Unix Makefiles" /Users/tiberio/ros_catkin_ws/src/bond_core/bondcpp /Users/tiberio/ros_catkin_ws/src/bond_core/bondcpp /Users/tiberio/ros_catkin_ws/build_isolated/bondcpp /Users/tiberio/ros_catkin_ws/build_isolated/bondcpp /Users/tiberio/ros_catkin_ws/build_isolated/bondcpp/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/DependInfo.cmake --color=
cd /Users/tiberio/ros_catkin_ws/build_isolated/bondcpp && /usr/local/Cellar/cmake/3.0.2/bin ...
(more)
edit retag flag offensive close merge delete

Comments

Can you rerun your build command with VERBOSE=1 before it and edit your question to include that output? Having that before your command should cause the exact flags passed to c++ to be displayed on the console, which should give us some more insight.

William gravatar image William  ( 2014-10-05 23:26:29 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-10-06 13:25:56 -0600

William gravatar image

In order to link against uuid, I'm guessing we are using pkg-config:

% pkg-config --libs uuid
-L/usr/local/Cellar/uuid/1.6.2/lib -luuid

This looks like a bug in bondcpp, from your c++ command (I expanded it for easier reading), you can see that only -luuid is passed but the corresponding -L/usr/local/Cellar/uuid/1.6.2/lib is missing, that is why it cannot find the library:

/usr/bin/c++

-O3
-DNDEBUG
-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
-dynamiclib
-Wl,-headerpad_max_install_names


-o
/Users/tiberio/ros_catkin_ws/devel_isolated/bondcpp/lib/libbondcpp.dylib
-install_name
/Users/tiberio/ros_catkin_ws/devel_isolated/bondcpp/lib/libbondcpp.dylib
CMakeFiles/bondcpp.dir/src/timeout.cpp.o
CMakeFiles/bondcpp.dir/src/bond.cpp.o
CMakeFiles/bondcpp.dir/src/BondSM_sm.cpp.o
-luuid
/Users/tiberio/ros_catkin_ws/install_isolated/lib/libroscpp.dylib
/usr/local/lib/libboost_signals-mt.dylib
/usr/local/lib/libboost_filesystem-mt.dylib
/Users/tiberio/ros_catkin_ws/install_isolated/lib/librosconsole.dylib
/Users/tiberio/ros_catkin_ws/install_isolated/lib/librosconsole_log4cxx.dylib
/Users/tiberio/ros_catkin_ws/install_isolated/lib/librosconsole_backend_interface.dylib
/usr/local/lib/liblog4cxx.dylib
/usr/local/lib/libboost_regex-mt.dylib
/Users/tiberio/ros_catkin_ws/install_isolated/lib/libroscpp_serialization.dylib
/Users/tiberio/ros_catkin_ws/install_isolated/lib/librostime.dylib
/usr/local/lib/libboost_date_time-mt.dylib
/Users/tiberio/ros_catkin_ws/install_isolated/lib/libxmlrpcpp.dylib
/Users/tiberio/ros_catkin_ws/install_isolated/lib/libcpp_common.dylib
/usr/local/lib/libboost_system-mt.dylib
/usr/local/lib/libboost_thread-mt.dylib
/usr/local/lib/libconsole_bridge.dylib

bondcpp or who ever is originally finding uuid is either not passing along the library directory or not converting the relative library (-L/usr/local/Cellar/uuid/1.6.2/lib -luuid) into an absolute library (maybe /usr/local/Cellar/uuid/1.6.2/lib/libuuid.dylib).

Please file an issue against bond_core on GitHub:

https://github.com/ros/bond_core/issues

And include as much detail from this Q&A as appropriate.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-10-03 12:51:08 -0600

Seen: 1,502 times

Last updated: Oct 06 '14