[MacPorts] #53460: boost: incompatible with _LIBCPP_DEBUG?

MacPorts noreply at macports.org
Wed Feb 1 14:34:48 UTC 2017


#53460: boost: incompatible with _LIBCPP_DEBUG?
--------------------+-------------------
 Reporter:  akimd   |      Owner:
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:
 Keywords:          |       Port:  boost
--------------------+-------------------
 Hi,

 This might not be a bug, but since I found no page with a clear statement
 about this, I prefer reporting it anyway, so that at least people facing
 the same issue can find this ticket :)

 Boost cannot be used with _LIBCPP_DEBUG enabled.  I don't know if it would
 be possible for boost to deliver versions of the libraries that would have
 been compiled with it?  Maybe that's exactly why some distros with `-d`
 versions of the libraries?

 {{{
 $ cat foo.cc
 #include <boost/filesystem/path.hpp>

 int
 main ()
 {
   boost::filesystem::path p;
   return 0;
 }
 $ clang++-mp-3.9 -std=c++1z  -D_LIBCPP_DEBUG=1 -isystem /opt/local/include
 -L/opt/local/lib  foo.cc -lboost_filesystem-mt  -lboost_system-mt
 Undefined symbols for architecture x86_64:
   "std::__1::__libcpp_db::__find_c_and_lock(void*) const", referenced
 from:
       std::__1::basic_string<char, std::__1::char_traits<char>,
 std::__1::allocator<char> >::assign(char const*, unsigned long) in foo-
 28f256.o
   "std::__1::__libcpp_db::unlock() const", referenced from:
       std::__1::basic_string<char, std::__1::char_traits<char>,
 std::__1::allocator<char> >::assign(char const*, unsigned long) in foo-
 28f256.o
   "std::__1::__libcpp_db::__insert_c(void*)", referenced from:
       boost::filesystem::path::path() in foo-28f256.o
   "std::__1::__libcpp_db::__invalidate_all(void*)", referenced from:
       std::__1::basic_string<char, std::__1::char_traits<char>,
 std::__1::allocator<char> >::__grow_by_and_replace(unsigned long, unsigned
 long, unsigned long, unsigned long, unsigned long, unsigned long, char
 const*) in foo-28f256.o
   "std::__1::__libcpp_db::__erase_c(void*)", referenced from:
       std::__1::basic_string<char, std::__1::char_traits<char>,
 std::__1::allocator<char> >::~basic_string() in foo-28f256.o
   "std::__1::__c_node::~__c_node()", referenced from:
       std::__1::_C_node<std::__1::basic_string<char,
 std::__1::char_traits<char>, std::__1::allocator<char> > >::~_C_node() in
 foo-28f256.o
   "std::__1::__get_db()", referenced from:
       boost::filesystem::path::path() in foo-28f256.o
       std::__1::basic_string<char, std::__1::char_traits<char>,
 std::__1::allocator<char> >::~basic_string() in foo-28f256.o
       std::__1::basic_string<char, std::__1::char_traits<char>,
 std::__1::allocator<char> >::__grow_by_and_replace(unsigned long, unsigned
 long, unsigned long, unsigned long, unsigned long, unsigned long, char
 const*) in foo-28f256.o
       std::__1::basic_string<char, std::__1::char_traits<char>,
 std::__1::allocator<char> >::assign(char const*, unsigned long) in foo-
 28f256.o
   "typeinfo for std::__1::__c_node", referenced from:
       typeinfo for std::__1::_C_node<std::__1::basic_string<char,
 std::__1::char_traits<char>, std::__1::allocator<char> > > in foo-28f256.o
   "vtable for std::__1::__c_node", referenced from:
       std::__1::_C_node<std::__1::basic_string<char,
 std::__1::char_traits<char>, std::__1::allocator<char> > >::_C_node(void*,
 std::__1::__c_node*) in foo-28f256.o
   NOTE: a missing vtable usually means the first non-inline virtual member
 function has no definition.
 ld: symbol(s) not found for architecture x86_64
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 $ clang++-mp-3.9 -std=c++1z  -isystem /opt/local/include
 -L/opt/local/lib  foo.cc -lboost_filesystem-mt  -lboost_system-mt
 $
 }}}

 Thanks!

--
Ticket URL: <https://trac.macports.org/ticket/53460>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list