Boost C++ Libraries: Ticket #10637: Certain thread unit tests fail to compile on Xcode 6 because BOOST_NO_CXX11_SMART_PTR is not defined https://svn.boost.org/trac10/ticket/10637 <pre class="wiki">./b2 toolset=darwin variant=release address-model=32 architecture=x86 -sNO_BZIP2=1 cxxflags=-Wno-c99-extensions cxxflags=-Wno-variadic-macros cxxflags=-Wno-unused-function cxxflags=-Wno-unused-const-variable libs/thread/test//async__async_p libs/thread/test//async__async_executor_p libs/thread/test//promise__set_rvalue_at_thread_exit_p ... darwin.compile.c++ bin.v2/libs/thread/test/async__async_p.test/darwin-4.2.1/release/address-model-32/architecture-x86/threading-multi/sync/futures/async/async_pass.o libs/thread/test/sync/futures/async/async_pass.cpp:129:10: error: calling a private constructor of class 'std::__1::unique_ptr&lt;int, std::__1::default_delete&lt;int&gt; &gt;' return boost::move(r); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2464:5: note: declared private here unique_ptr(unique_ptr&amp;); ^ </pre><pre class="wiki">darwin.compile.c++ bin.v2/libs/thread/test/async__async_executor_p.test/darwin-4.2.1/release/address-model-32/architecture-x86/threading-multi/sync/futures/async/async_executor_pass.o In file included from libs/thread/test/sync/futures/async/async_executor_pass.cpp:34: In file included from ./boost/thread/executors/basic_thread_pool.hpp:19: In file included from ./boost/thread/csbl/vector.hpp:18: ./boost/container/vector.hpp:1526:72: warning: unused parameter 'last' [-Wunused-parameter] iterator insert(const_iterator pos, size_type num, InIt first, InIt last) ^ libs/thread/test/sync/futures/async/async_executor_pass.cpp:127:10: error: calling a private constructor of class 'std::__1::unique_ptr&lt;int, std::__1::default_delete&lt;int&gt; &gt;' return boost::move(r); ^ </pre><pre class="wiki">darwin.compile.c++ bin.v2/libs/thread/test/promise__set_rvalue_at_thread_exit_p.test/darwin-4.2.1/release/address-model-32/architecture-x86/threading-multi/syn\ c/futures/promise/set_rvalue_at_thread_exit_pass.o In file included from libs/thread/test/sync/futures/promise/set_rvalue_at_thread_exit_pass.cpp:23: ./boost/thread/future.hpp:687:24: error: calling a private constructor of class 'std::__1::unique_ptr&lt;int, std::__1::default_delete&lt;int&gt; &gt;' return boost::move(*result); ^ ./boost/thread/future.hpp:2092:25: note: in instantiation of member function 'boost::detail::shared_state&lt;std::__1::unique_ptr&lt;int, std::__1::default_delete&lt;in\ t&gt; &gt; &gt;::get' requested here future_(new detail::shared_state&lt;R&gt;()), ^ </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10637 Trac 1.4.3 nat@… Wed, 08 Oct 2014 19:11:44 GMT severity changed https://svn.boost.org/trac10/ticket/10637#comment:1 https://svn.boost.org/trac10/ticket/10637#comment:1 <ul> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Regression</span> </li> </ul> <p> This appears to be a regression. Although async<span class="underline">async_executor_p (async_executor_pass.cpp) does not appear in Boost 1.55.0, the other two unit tests pass in Boost 1.55.0. </span></p> Ticket viboes Wed, 08 Oct 2014 19:22:19 GMT <link>https://svn.boost.org/trac10/ticket/10637#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10637#comment:2</guid> <description> <p> Please, could you tell me with which version, platform, compiler and C++ lib these error appear? </p> </description> <category>Ticket</category> </item> <item> <author>nat@…</author> <pubDate>Wed, 08 Oct 2014 19:29:46 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10637#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10637#comment:3</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10637#comment:2" title="Comment 2">viboes</a>: </p> <blockquote class="citation"> <p> Please, could you tell me with which version, platform, compiler and C++ lib these error appear? </p> </blockquote> <p> version: Boost 1.56.0 </p> <p> platform: Mac OS X 10.9.5 </p> <p> g++ --version <br /> Configured with: --prefix=<a class="missing wiki">/Applications/Xcode</a>.app/Contents/Developer/usr --with-gxx-include-dir=<a class="missing wiki">/Applications/Xcode</a>.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1 <br /> Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn) <br /> Target: x86_64-apple-darwin13.4.0 </p> <p> library: thread </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Wed, 08 Oct 2014 20:22:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10637#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10637#comment:4</guid> <description> <p> I suspect that you are using option c++0x and libstdcpp. This is not supported. </p> </description> <category>Ticket</category> </item> <item> <author>nat@…</author> <pubDate>Wed, 08 Oct 2014 20:37:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10637#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10637#comment:5</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10637#comment:4" title="Comment 4">viboes</a>: </p> <blockquote class="citation"> <p> I suspect that you are using option c++0x and libstdcpp. This is not supported. </p> </blockquote> <p> I pasted the b2 command line I used in the Description. How should I modify that command line? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Wed, 08 Oct 2014 21:29:38 GMT</pubDate> <title>owner, status changed https://svn.boost.org/trac10/ticket/10637#comment:6 https://svn.boost.org/trac10/ticket/10637#comment:6 <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> </ul> <p> Oh, I'm really sorry. I believed that you were using clang. </p> <p> It seems that default_delete is not movable with your default library. I suggest you to do the following. </p> <p> In boost/thread/csbl/memory/unique_ptr.hpp, there is the following check </p> <pre class="wiki">// 20.8.1 class template unique_ptr: #if defined BOOST_NO_CXX11_SMART_PTR </pre><p> You could define in your application BOOST_NO_CXX11_SMART_PTR </p> <p> BTW, there are no problems inhttp://www.boost.org/development/tests/master/developer/thread.html for Sandia-darwin-4.2.1 Please, could you tell me if it works on develop or master branch, so that I can see what I can do if it is not the case? </p> <p> P.S. in version 1.57 I'm using always movelib::unique_ptr. </p> Ticket viboes Wed, 08 Oct 2014 21:35:55 GMT <link>https://svn.boost.org/trac10/ticket/10637#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10637#comment:7</guid> <description> <p> After more thoughts, you should be compiling with c++98 and you have unique_ptr. This is a mess. </p> </description> <category>Ticket</category> </item> <item> <author>nat@…</author> <pubDate>Wed, 08 Oct 2014 22:58:56 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10637#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10637#comment:8</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10637#comment:6" title="Comment 6">viboes</a>: </p> <blockquote class="citation"> <p> You could define in your application BOOST_NO_CXX11_SMART_PTR </p> <p> Please, could you tell me if it works on develop or master branch, so that I can see what I can do if it is not the case? </p> </blockquote> <p> Thank you! Adding BOOST_NO_CXX11_SMART_PTR to the b2 command line does indeed permit these tests to pass: </p> <pre class="wiki">./b2 toolset=darwin variant=release address-model=32 architecture=x86 -sNO_BZIP2=1 cxxflags=-DBOOST_NO_CXX11_SMART_PTR cxxflags=-Wno-c99-extensions cxxflags=-Wno-variadic-macros cxxflags=-Wno-unused-function cxxflags=-Wno-unused-const-variable libs/thread/test//async__async_p libs/thread/test//async__async_executor_p libs/thread/test//promise__set_rvalue_at_thread_exit_p </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 11 Oct 2014 03:03:25 GMT</pubDate> <title>component, summary changed https://svn.boost.org/trac10/ticket/10637#comment:9 https://svn.boost.org/trac10/ticket/10637#comment:9 <ul> <li><strong>component</strong> <span class="trac-field-old">thread</span> → <span class="trac-field-new">config</span> </li> <li><strong>summary</strong> <span class="trac-field-old">Certain thread unit tests fail to compile on Xcode 6</span> → <span class="trac-field-new">Certain thread unit tests fail to compile on Xcode 6 because BOOST_NO_CXX11_SMART_PTR is not defined</span> </li> </ul> <p> So resuming you are using the following command line with c++98 and BOOST_NO_CXX11_SMART_PTR is not defined. </p> <pre class="wiki">./b2 toolset=darwin variant=release address-model=32 architecture=x86 -sNO_BZIP2=1 cxxflags=-DBOOST_NO_CXX11_SMART_PTR cxxflags=-Wno-c99-extensions cxxflags=-Wno-variadic-macros cxxflags=-Wno-unused-function cxxflags=-Wno-unused-const-variable libs/thread/test//async__async_p libs/thread/test//async__async_executor_p libs/thread/test//promise__set_rvalue_at_thread_exit_p </pre><p> Moving it to Boost.Config then. </p> Ticket John Maddock Mon, 23 Feb 2015 13:01:26 GMT <link>https://svn.boost.org/trac10/ticket/10637#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10637#comment:10</guid> <description> <p> Sorry to be late coming to this - that macro should be set for all GCC-4.3 and earlier (including your 4.2.x install) in boost/config/stdlib/libstdcpp3.hpp. Can you see why the branch starting: </p> <table class="wiki"> <tr>#if (BOOST_LIBSTDCXX_VERSION &lt; 40400) <td> !defined(BOOST_LIBSTDCXX11) </td></tr></table> <p> Is not being taken on your system? </p> <p> Thanks, John. </p> </description> <category>Ticket</category> </item> <item> <author>nat@…</author> <pubDate>Mon, 23 Feb 2015 18:30:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10637#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10637#comment:11</guid> <description> <p> I'm sorry. At some point a couple months ago the config did start defining that symbol, so I removed our explicit definition because it was producing a ton of duplicate-macro warnings. I've reviewed our changelog. The only change (between introducing BOOST_NO_CXX11_SMART_PTR and removing it again) that suggests itself as a possible cause is that we set the Mac OS X SDK to 10.9. I confess I don't know what effect that has on the set of predefined macros. </p> <p> Shortly after removing BOOST_NO_CXX11_SMART_PTR, we updated our Boost source to 1.57. Notably, though, that changeset was committed after the changeset removing BOOST_NO_CXX11_SMART_PTR. </p> <p> In any case, I should have updated this ticket to note that the problem no longer manifests for us. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 23 Feb 2015 19:22:19 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/10637#comment:12 https://svn.boost.org/trac10/ticket/10637#comment:12 <ul> <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">obsolete</span> </li> </ul> <p> OK thanks, closing down, please reopen if it comes back again or you can provide more info. </p> Ticket