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

Trouble building Roslib (diamondback) on 64-bit OSX Snow Leopard.

asked 2011-03-05 04:22:26 -0600

Marrok gravatar image

updated 2012-02-20 11:41:24 -0600

Kevin gravatar image

I just pulled down the latest ros-turtle, diamond back and it doesn't seem to build on OSX 64-bit. I'm following along on the install wiki.

And it fails to build with:

Finished <<< roslib [FAIL] [ 29.47 seconds ]

the output log says:

cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake  ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
[rosbuild] Building package roslib
[rosbuild] Cached build flags older than manifests; calling rospack to get flags
[rosbuild] Including /Users/mike/Code/ros/ros_comm/clients/roslisp/cmake/roslisp.cmake
[rosbuild] Including /Users/mike/Code/ros/ros_comm/clients/rospy/cmake/rospy.cmake
[rosbuild] Including /Users/mike/Code/ros/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mike/Code/ros/ros/core/roslib/build
cd build && make -l4
Scanning dependencies of target rospack_genmsg_libexe
[  0%] Built target rospack_genmsg_libexe
Scanning dependencies of target rosbuild_precompile
[  0%] Built target rosbuild_precompile
Scanning dependencies of target roslib
[100%] Building CXX object CMakeFiles/roslib.dir/src/package.o
In file included from /usr/include/architecture/i386/math.h:626,
                 from /usr/include/math.h:28,
                 from /usr/include/c++/4.2.1/cmath:54,
                 from /opt/local/include/boost/config/no_tr1/cmath.hpp:21,
                 from /opt/local/include/boost/date_time/posix_time/posix_time_config.hpp:15,
                 from /opt/local/include/boost/date_time/posix_time/posix_time_system.hpp:13,
                 from /opt/local/include/boost/date_time/posix_time/ptime.hpp:12,
                 from /opt/local/include/boost/date_time/posix_time/posix_time_types.hpp:12,
                 from /opt/local/include/boost/thread/thread_time.hpp:11,
                 from /opt/local/include/boost/thread/locks.hpp:12,
                 from /opt/local/include/boost/thread/pthread/mutex.hpp:12,
                 from /opt/local/include/boost/thread/mutex.hpp:16,
                 from /Users/mike/Code/ros/ros/core/roslib/src/package.cpp:37:
/usr/include/AvailabilityMacros.h:108:14: warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid.
Linking CXX shared library ../lib/libroslib.dylib
ld: -rpath can only be used when targeting Mac OS X 10.5 or later
collect2: ld returned 1 exit status
make[3]: *** [../lib/libroslib.dylib] Error 1
make[2]: *** [CMakeFiles/roslib.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

Has anyone else seen anything like this? Any help ... (more)

edit retag flag offensive close merge delete

Comments

I'm running ok on the same system. Which step is giving you this problem?
Eponymous gravatar image Eponymous  ( 2011-03-05 04:39:09 -0600 )edit
'rosmake roslib' is the part I'm having issue with.
Marrok gravatar image Marrok  ( 2011-03-08 08:15:04 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2011-03-05 09:04:03 -0600

Paul Vernaza gravatar image

My roslib compile works out-of-the-box (diamondback, 10.6, 64-bit). These lines look very suspicious:

/usr/include/AvailabilityMacros.h:108:14: warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid.
Linking CXX shared library ../lib/libroslib.dylib
ld: -rpath can only be used when targeting Mac OS X 10.5 or later

Building for Intel for Mac OS X < 10.4? It looks like your build environment is screwed up. Maybe you have MACOSX_DEPLOYMENT_TARGET set in your environment?

edit flag offensive delete link more

Comments

I do not have MACOSX_DEPLOYMENT_TARGET set. Setting it to 10.6 does not seem to help.
Marrok gravatar image Marrok  ( 2011-03-08 08:24:58 -0600 )edit
I'm also building on the latest rev of Mac Book Pro released on February 24, 2011.
Marrok gravatar image Marrok  ( 2011-03-08 08:40:47 -0600 )edit
I'm actually building on the same model with no problems. Maybe cmake is incorrectly setting the MACOSX_DEPLOYMENT_TARGET? You can try checking build/CMakeCache.txt (search for OSX) to see if it detects something weird.
Paul Vernaza gravatar image Paul Vernaza  ( 2011-03-08 12:18:17 -0600 )edit
There must have been cruft from a migration I did from an old Mac, I was able to get it to build, although I did have to tweak the install_dirs() in rosboost_cfg.py it seemed to always return the empty string.
Marrok gravatar image Marrok  ( 2011-03-11 05:59:25 -0600 )edit

Question Tools

Stats

Asked: 2011-03-05 04:22:26 -0600

Seen: 796 times

Last updated: Mar 05 '11