Boost C++ Libraries: Ticket #7570: Boost 1.52 in trunk has undefined references https://svn.boost.org/trac10/ticket/7570 <p> Environment g++ 4.7 Ubuntu 64 bits 12.10 </p> <p> Using the non-boost threadpool.sf.net. </p> <p> The same code compiles and works fine with 1.51 </p> <pre class="wiki">Linking CXX executable pced CMakeFiles/pced.dir/algo_api/algo_api.cpp.o: In function `boost::thread::join()': algo_api.cpp:(.text._ZN5boost6thread4joinEv[_ZN5boost6thread4joinEv]+0x27): undefined reference to `boost::thread::join_noexcept()' CMakeFiles/pced.dir/algo_api/algo_api.cpp.o: In function `boost::thread::thread&lt;boost::_bi::bind_t&lt;unsigned long, boost::_mfi::mf0&lt;unsigned long, boost::asio::io_service&gt;, boost::_bi::list1&lt;boost::_bi::value&lt;boost::asio::io_service*&gt; &gt; &gt; &gt;(boost::_bi::bind_t&lt;unsigned long, boost::_mfi::mf0&lt;unsigned long, boost::asio::io_service&gt;, boost::_bi::list1&lt;boost::_bi::value&lt;boost::asio::io_service*&gt; &gt; &gt;&amp;&amp;, boost::disable_if&lt;boost::is_same&lt;boost::decay&lt;boost::_bi::bind_t&lt;unsigned long, boost::_mfi::mf0&lt;unsigned long, boost::asio::io_service&gt;, boost::_bi::list1&lt;boost::_bi::value&lt;boost::asio::io_service*&gt; &gt; &gt; &gt;::type, boost::thread&gt;, boost::thread::dummy*&gt;::type)': algo_api.cpp:(.text._ZN5boost6threadC2INS_3_bi6bind_tImNS_4_mfi3mf0ImNS_4asio10io_serviceEEENS2_5list1INS2_5valueIPS7_EEEEEEEEOT_NS_10disable_ifINS_7is_sameINS_5decayISF_E4typeES0_EEPNS0_5dummyEE4typeE[_ZN5boost6threadC5INS_3_bi6bind_tImNS_4_mfi3mf0ImNS_4asio10io_serviceEEENS2_5list1INS2_5valueIPS7_EEEEEEEEOT_NS_10disable_ifINS_7is_sameINS_5decayISF_E4typeES0_EEPNS0_5dummyEE4typeE]+0x72): undefined reference to `boost::thread::start_thread_noexcept()' CMakeFiles/pced.dir/server_threadpool.cpp.o: In function `boost::threadpool </pre><pre class="wiki">typeE]+0xe0): undefined reference to `boost::thread::start_thread_noexcept()' collect2: error: ld returned 1 exit status make[2]: *** [apps/server/pced] Error 1 </pre><p> May be related to </p> <p> svn:boost <a class="changeset" href="https://svn.boost.org/trac10/changeset/80824" title="Thread: Fix bug with gcc4.4, prepare change to v3 by default">r80824</a> - in trunk: boost/thread/detail libs/thread/example libs/thread/src/pthread </p> <p> Thanks </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7570 Trac 1.4.3 viboes Sun, 28 Oct 2012 14:24:22 GMT owner, status, severity, milestone changed https://svn.boost.org/trac10/ticket/7570#comment:1 https://svn.boost.org/trac10/ticket/7570#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Showstopper</span> → <span class="trac-field-new">Problem</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.52.0</span> → <span class="trac-field-new">To Be Determined</span> </li> </ul> <p> This code has not been released yet, so I could not fix it for 1.52. </p> <p> The regressions are passing for me on Ubuntu g++ 4.7. could you provide a concrete example, and the command line used to get these errors? Are you linking with boost_thread? </p> <p> Anyway, I will take a look in case I can catch it be code review. </p> Ticket viboes Mon, 29 Oct 2012 12:39:47 GMT cc set https://svn.boost.org/trac10/ticket/7570#comment:2 https://svn.boost.org/trac10/ticket/7570#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">viboes</span> added </li> </ul> Ticket anonymous Thu, 01 Nov 2012 20:51:46 GMT <link>https://svn.boost.org/trac10/ticket/7570#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7570#comment:3</guid> <description> <p> Hi Vicente, sure, I have been using trunk. </p> <p> ubuntu quantal 64 bits </p> <pre class="wiki">gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-5ubuntu1) </pre><pre class="wiki"> g++ -DFUSION_MAX_VECTOR_SIZE=20 -DPHOENIX_THREADSAFE -DBOOST_LEXICAL_CAST_ASSUME_C_LOCAL -DBOOST_FILESYSTEM_NO_DEPRECATED -DBOOST_SPIRIT_THREADSAFE -DBOOST_SP_USE_QUICK_ALLOCATOR -DBOOST_FILESYSTEM_VERSION=3 -DBOOST_EXCEPTION_DISABLE -std=gnu++0x -pthread -pedantic -Wno-variadic-macros -Wextra -fPIC -DPIC -pipe -Wno-long-long -fno-strict-aliasing -D_REENTRANT -D_FORTIFY_SOURCE=2 -export-dynamic -rdynamic -Wno-deprecated -Wno-unused-local-typedefs -fvisibility-inlines-hidden -O3 -DNDEBUG </pre><p> Linking </p> <pre class="wiki">g++ -std=gnu++0x -pthread -pedantic -Wno-variadic-macros -Wextra -fPIC -DPIC -pipe -Wno-long-long -fno-strict-aliasing -D_REENTRANT -D_FORTIFY_SOURCE=2 -export-dynamic -rdynamic -Wno-deprecated -Wno-unused-local-typedefs -fvisibility-inlines-hidden -O3 -DNDEBUG -DPCE_RELEASE_BUILD ...*.o -o pced -rdynamic -L/adnet/src/cttc-pce-trunk/build/release/apps/common -lboost_system-mt -lboost_iostreams-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_graph-mt -lboost_serialization-mt -lboost_signals-mt -lboost_regex-mt -lboost_iostreams-mt -lboost_chrono-mt -lboost_random-mt -lboost_thread-mt -lstdc++ -ldl -lpcep_common-4.6.9 -lboost_filesystem-mt -lboost_program_options-mt -lboost_graph-mt -lboost_serialization-mt -lboost_signals-mt -lboost_regex-mt -lboost_chrono-mt -lboost_random-mt -lboost_thread-mt -lstdc++ -ldl -lpcep_common-4.6.9 -Wl,-rpath,/adnet/src/cttc-pce-trunk/build/release/apps/common:::: </pre><p> I got several _noexcept </p> <p> CMakeFiles/pced.dir/algo_api/algo_api.cpp.o: In function `boost::thread::join()': algo_api.cpp:(.text._ZN5boost6thread4joinEv[_ZN5boost6thread4joinEv]+0x27): undefined reference to `boost::thread::join_noexcept()' </p> <p> server_threadpool.cpp:(.text._ZNV5boost10threadpool6detail9 ... terminate_all_workersEb]+0x204): undefined reference to `boost::thread::join_noexcept()' </p> <p> <code>boost::thread::thread&lt;boost::_bi::bind_t&lt;void, boost::_mfi::mf0&lt;void, ... _sameINS_5decayISP_E4typeES0_EEPNS0_5dummyEE4typeE]+0xe0): undefined reference to </code>boost::thread::start_thread_noexcept() </p> <p> I'll try in the following days to have a self contained example, this is a quite long code base that uses the (unoffcial) boost thread pool </p> <p> Thanks R. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Fri, 02 Nov 2012 00:31:41 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7570#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7570#comment:4</guid> <description> <p> Could you check the LD_LIBRARY_PATH and verify you are linking with the 1.52 version? </p> <p> BTW, I don't see any -I compiler flag. How do you state which Boost library are you using including? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 02 Nov 2012 14:12:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7570#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7570#comment:5</guid> <description> <p> Hi again Vicente, </p> <p> I think this may be due to a mistake on my CMake based build, since it seems that some update of Ubuntu has installed boost-1.50 so although the build gets the 1.52 trunk headers the linking part may be picking the libs from /usr/lib </p> <p> The missing part is of the form </p> <pre class="wiki">-I/adnet/src/cttc-pce-trunk/build/release -I/adnet/src/cttc-pce-trunk/ext/threadpool -I/adnet/src/cttc-pce-trunk/ext/process -I/adnet/src/cttc-pce-trunk/ext/urdl/include -I/adnet/boost-1.52.0/include -I/adnet/src/cttc-pce-trunk -I/adnet/src/cttc-pce-trunk/pce -I/adnet/src/cttc-pce-trunk/apps -I/adnet/src/cttc-pce-trunk/core -o CMakeFiles/pce_algorithm_of32800_spp_basic-4.6.9.dir/of32800_entry.cpp. </pre><p> However, linking uses the short system form. Thank you for your time, please close this ticket and I'll open a new one if need be. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Fri, 02 Nov 2012 15:23:56 GMT</pubDate> <title>status changed; resolution set; cc, milestone deleted https://svn.boost.org/trac10/ticket/7570#comment:6 https://svn.boost.org/trac10/ticket/7570#comment:6 <ul> <li><strong>cc</strong> <span class="trac-author">viboes</span> removed </li> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> <li><strong>milestone</strong> <span class="trac-field-deleted">To Be Determined</span> </li> </ul> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7570#comment:5" title="Comment 5">anonymous</a>: </p> <blockquote class="citation"> <p> However, linking uses the short system form. Thank you for your time, please close this ticket and I'll open a new one if need be. </p> </blockquote> <p> What do you mean by short system form? </p> Ticket anonymous Wed, 03 Aug 2016 20:57:06 GMT <link>https://svn.boost.org/trac10/ticket/7570#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7570#comment:7</guid> <description> <p> ayy lmao </p> </description> <category>Ticket</category> </item> </channel> </rss>