[MacPorts] #18894: Internal libboost dependency failure at reference time.

MacPorts noreply at macports.org
Wed Mar 18 16:24:36 PDT 2009


#18894: Internal libboost dependency failure at reference time.
--------------------------------+-------------------------------------------
 Reporter:  trog24@…            |       Owner:  macports-tickets@…                   
     Type:  defect              |      Status:  new                                  
 Priority:  Normal              |   Milestone:  Port Bugs                            
Component:  ports               |     Version:  1.7.0                                
 Keywords:                      |        Port:                                       
--------------------------------+-------------------------------------------

Comment(by braden@…):

 The problem noted in the description is actually occurring when linking
 one of OpenVRML 0.17.12's test programs. The tests use some parts of Boost
 that the rest of OpenVRML doesn't.

 I'm seeing a similar problem when compiling '''trunk''' libopenvrml (which
 uses boost::filesystem):

 {{{
 libtool: link: g++ -dynamiclib  -o libopenvrml/.libs/libopenvrml.8.dylib
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-bad_url.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-vrml97_grammar.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-x3d_vrml_grammar.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-read_write_mutex.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-basetypes.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-field_value.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-event.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-exposedfield.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-scope.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-node.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-script.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-bounding_volume.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-scene.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-browser.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-viewer.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-rendering_context.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-frustum.o
 libopenvrml/openvrml/.libs/libopenvrml_libopenvrml_la-node_impl_util.o
 libopenvrml/openvrml/local/.libs/libopenvrml_libopenvrml_la-dl.o
 libopenvrml/openvrml/local/.libs/libopenvrml_libopenvrml_la-uri.o
 libopenvrml/openvrml/local/.libs/libopenvrml_libopenvrml_la-xml_reader.o
 libopenvrml/openvrml/local/.libs/libopenvrml_libopenvrml_la-parse_vrml.o
 libopenvrml/openvrml/local/.libs/libopenvrml_libopenvrml_la-component.o
 libopenvrml/openvrml/local/.libs/libopenvrml_libopenvrml_la-proto.o
 libopenvrml/openvrml/local/.libs/libopenvrml_libopenvrml_la-externproto.o
 libopenvrml/openvrml/local/.libs/libopenvrml_libopenvrml_la-
 node_metatype_registry_impl.o   -L/opt/local/lib
 /opt/local/lib/libxml2.dylib -lpthread -lz /opt/local/lib/libiconv.dylib
 -lm -lboost_thread-mt -lboost_filesystem-mt /opt/local/lib/libltdl.dylib
 -install_name  /usr/local/lib/libopenvrml.8.dylib -compatibility_version 9
 -current_version 9.8 -Wl,-single_module
 Undefined symbols:
   "boost::system::get_generic_category()", referenced from:
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-scene.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-scene.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-scene.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-browser.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-browser.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-browser.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-dl.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-dl.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-dl.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-parse_vrml.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-parse_vrml.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-parse_vrml.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-component.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-component.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-component.o
   "boost::system::get_system_category()", referenced from:
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-scene.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-scene.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-browser.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-browser.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-dl.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-dl.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-parse_vrml.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-parse_vrml.o
 boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char,
 std::char_traits<char>, std::allocator<char> >,
 boost::filesystem::path_traits> >::increment()in
 libopenvrml_libopenvrml_la-component.o
 boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char,
 std::char_traits<char>, std::allocator<char> >,
 boost::filesystem::path_traits>
 >::m_init(boost::filesystem::basic_path<std::basic_string<char,
 std::char_traits<char>, std::allocator<char> >,
 boost::filesystem::path_traits> const&)in libopenvrml_libopenvrml_la-
 component.o
 boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char,
 std::char_traits<char>, std::allocator<char> >,
 boost::filesystem::path_traits> >, bool>::type
 boost::filesystem::is_directory<boost::filesystem::basic_path<std::basic_string<char,
 std::char_traits<char>, std::allocator<char> >,
 boost::filesystem::path_traits>
 >(boost::filesystem::basic_path<std::basic_string<char,
 std::char_traits<char>, std::allocator<char> >,
 boost::filesystem::path_traits> const&)in libopenvrml_libopenvrml_la-
 component.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-component.o
       __static_initialization_and_destruction_0(int, int)in
 libopenvrml_libopenvrml_la-component.o
 ld: symbol(s) not found
 collect2: ld returned 1 exit status
 }}}

 I think I have some idea of what's going on here. OpenVRML headers include
 boost::filesystem headers which in turn include boost::system headers. But
 I don't understand why it's necessary to include `-lboost_system-mt` on
 the command link when linking libopenvrml. libboost_filesystem '''does'''
 appear to know about the libboost_system dependency:

 {{{
 $ otool -L /opt/local/lib/libboost_filesystem-mt.dylib
 /opt/local/lib/libboost_filesystem-mt.dylib:
         /opt/local/lib/libboost_filesystem-mt.dylib (compatibility version
 0.0.0, current version 0.0.0)
         /opt/local/lib/libboost_system-mt.dylib (compatibility version
 0.0.0, current version 0.0.0)
         /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
 version 7.4.0)
         /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
 version 1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 111.0.0)
 }}}

 Is what we're observing Just The Way It Is with the Darwin linker? Or is
 there something that can be done with the way Boost is built so that the
 libbboost_system dependency is picked up automatically in this case?

-- 
Ticket URL: <http://trac.macports.org/ticket/18894#comment:4>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list