0

I'm trying to build ROS for OSX and having an issue with a undefined symbol for boost. Boost is latest version. How do I fix this so I can finish compiling?! Note: I do not want to edit any source code (make files, etc) if possible.

Undefined symbols for architecture x86_64: "boost::re_detail::get_mem_block()", referenced from:` boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find_imp() in rosconsole.cpp.o ... Eventually to: ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [/users/andor/workspace/ros/devel_isolated/rosconsole/lib/librosconsole.dylib] Error 1 make[1]: *** [CMakeFiles/rosconsole.dir/all] Error 2 clang: error: linker command failed with exit code 1 (use -v to see invocation)

System Info:

  • Macbook 2015
  • OSX High Sierra
  • Clang Version - Apple LLVM version 9.1.0 (clang-902.0.39.1)
  • Target: x86_64-apple-darwin17.5.0
  • Boost: 1.67.0_1
  • G++ Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1

Thanks in advance!

Full Stack Trace Below:.

[ 33%] Built target rosconsole_backend_interface
[ 66%] Built target rosconsole_log4cxx
[ 83%] Linking CXX shared library 
 ace/ros/devel_isolated/rosconsole/lib/librosconsole.dylib
 Undefined symbols for architecture x86_64:
 "boost::re_detail::get_mem_block()", referenced from:
  boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, 
 std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find_imp() in rosconsole.cpp.o
  boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_all_states() in rosconsole.cpp.o
  boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_startmark() in rosconsole.cpp.o
  boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_endmark() in rosconsole.cpp.o
  boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_match() in rosconsole.cpp.o
  boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_alt() in rosconsole.cpp.o
  boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_rep() in rosconsole.cpp.o
  ...
 "boost::re_detail::put_mem_block(void*)", referenced from:
  boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find_imp() in rosconsole.cpp.o
  boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::unwind_extra_block(bool) in rosconsole.cpp.o
  "boost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)", referenced from:
  boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find_imp() in rosconsole.cpp.o
   "boost::re_detail::raise_runtime_error(std::runtime_error const&)", referenced from:
  void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type) in rosconsole.cpp.o
 "boost::re_detail::get_default_error_string
  (boost::regex_constants::error_type)", referenced from:

  boost::re_detail::cpp_regex_traits_implementation<char>
  ::error_string(boost::regex_constants::error_type) const in 
  rosconsole.cpp.o
  "boost::re_detail::
  cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const", referenced from:
  std::__1::__wrap_iter<char const*> 
  boost::re_detail::re_is_set_member<std::__1::__wrap_iter<char const*>, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(std::__1::__wrap_iter<char const*>, std::__1::__wrap_iter<char const*>, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool) in rosconsole.cpp.o
 "boost::
 re_detail::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const", referenced from:
  std::__1::__wrap_iter<char const*> boost::re_detail::re_is_set_member<std::__1::__wrap_iter<char const*>, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(std::__1::__wrap_iter<char const*>, std::__1::__wrap_iter<char const*>, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool) in rosconsole.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** 
[dir/librosconsole.dylib] Error 1
make[1]: *** [CMakeFiles/rosconsole.dir/all] Error 2
make: *** [all] Error 2
 ______________________________

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.