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

ros installation on mac architecture symbol error.

asked 2011-03-28 12:46:49 -0500

updated 2012-02-20 11:35:16 -0500

Kevin gravatar image

Hi, That is my first time programming on mac since I just bought a brand new mac book pro. When I try to install ros by following the wiki, I get this error :

 Linking CXX executable ../bin/rosplay
 Undefined symbols for architecture x86_64:
    "boost::filesystem3::path::wchar_t_codecvt_facet()", referenced from:
        ros::record::Player::open(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ros::Time, bool)in rosplay.o
    "boost::filesystem3::path::extension() const", referenced from:
        ros::record::Player::open(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ros::Time, bool)in rosplay.o
  ld: symbol(s) not found for architecture x86_64
  collect2: ld returned 1 exit status
  make[3]: *** [../bin/rosplay] Error 1
  make[2]: *** [CMakeFiles/rosplay.dir/all] Error 2
  make[1]: *** [all] Error 2

The architecture isn't x86 on a mac...so I don't really understand this error, does someone happen to know why?

edit retag flag offensive close merge delete

Comments

All modern mac's are x86 as of a few year ago. And in the last year or so they switched to 64 bit.
tfoote gravatar image tfoote  ( 2011-04-07 15:33:16 -0500 )edit

6 Answers

Sort by ยป oldest newest most voted
3

answered 2011-04-20 06:25:04 -0500

Mac gravatar image

Adding

#define BOOST_FILESYSTEM_VERSION 2

immediately above the #include <boost/filesystem.hpp> line in ros_comm/tools/ros_record/Player.h at least gets it to build for me.

As yet untested; caveat compiler.

edit flag offensive delete link more

Comments

There's a ticket for a similar problem at https://code.ros.org/trac/ros-pkg/ticket/4923
tfoote gravatar image tfoote  ( 2011-04-27 08:03:24 -0500 )edit
1
Confirming that this will let the package build, but probably not a long-term solution to this problem.
mjcarroll gravatar image mjcarroll  ( 2011-05-13 06:19:17 -0500 )edit
3

answered 2011-04-15 23:57:17 -0500

Can you try to adapt the CMakeLists.txt of the rosrecord package? On line 22 (or close to it) you should change the line

rosbuild_link_boost(rosplay iostreams system)

to

rosbuild_link_boost(rosplay iostreams system filesystem)
edit flag offensive delete link more

Comments

Same error here. Adding the link to filesystem solved the issue. Thanks!
Stephan gravatar image Stephan  ( 2011-05-21 03:27:02 -0500 )edit
0

answered 2011-04-10 13:14:07 -0500

Yes, I get the same error on my macbook.

edit flag offensive delete link more
0

answered 2011-03-29 06:28:51 -0500

Can you give the output of make VERBOSE=1 ? What boost version are you using?

-- Ruben

edit flag offensive delete link more
0

answered 2011-07-03 11:35:05 -0500

I had to update the following two files, but this worked for me as well!

~/ros/ros_comm/tools/rosrecord/src/rosrecord/recorder.cpp ~/ros/ros_comm/tools/rosrecord/include/rosrecord/Player.h

edit flag offensive delete link more
0

answered 2011-03-29 07:27:48 -0500

Hi Ruben,

Thank you for your answer. I use the last version of boost : 1.46.1. I can't get to another version with macport since I just installed it.

I compiled with verbose and here is the result :

mkdir -p bin
  cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake  ..
  [rosbuild] Building package rosrecord
  [rosbuild] Including /Users/morgancormier/ros/ros_comm/clients/roslisp/cmake/roslisp.cmake
  [rosbuild] Including /Users/morgancormier/ros/ros_comm/clients/rospy/cmake/rospy.cmake
  [rosbuild] Including /Users/morgancormier/ros/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake
  -- Configuring done
  -- Generating done
  CMake Warning: The variable, 'CMAKE_TOOLCHAIN_FILE', specified manually, was not used during the generation.
  -- Build files have been written to: /Users/morgancormier/ros/ros_comm/tools/rosrecord/build
    cd build && make -l4
  [  0%] Built target rospack_genmsg_libexe
  [  0%] Built target rosbuild_precompile
  Linking CXX executable ../bin/rosplay
  Undefined symbols for architecture x86_64:
    "boost::filesystem3::path::wchar_t_codecvt_facet()", referenced from:
        ros::record::Player::open(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ros::Time, bool)in rosplay.o
    "boost::filesystem3::path::extension() const", referenced from:
        ros::record::Player::open(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ros::Time, bool)in rosplay.o
  ld: symbol(s) not found for architecture x86_64
  collect2: ld returned 1 exit status
  make[3]: *** [../bin/rosplay] Error 1
  make[2]: *** [CMakeFiles/rosplay.dir/all] Error 2
  make[1]: *** [all] Error 2

I hope that can help you.

edit flag offensive delete link more

Comments

Please add new information to your original question (use the edit link just below the question) instead of posting it as a new answer, then delete this answer. This will help keep ROS Answers easy to search and read in the future. Thanks!
Eric Perko gravatar image Eric Perko  ( 2011-04-07 16:47:39 -0500 )edit

Question Tools

Stats

Asked: 2011-03-28 12:46:49 -0500

Seen: 1,828 times

Last updated: Jul 03 '11