Boost C++ Libraries: Ticket #3584: Boost.Python fails to build using gcc 4.4 on linux (-std=c++0x) https://svn.boost.org/trac10/ticket/3584 <p> I'm running Boost nightly regression tests on a 64-bit Debian linux platform for quite some time. I've recently added gcc 4.4 and Boost.Python is failing miserably; c.f. <a class="ext-link" href="http://tinyurl.com/yl7yjkv"><span class="icon">​</span>http://tinyurl.com/yl7yjkv</a> </p> <p> If I click on a test result URL, such as for "andreas_beyer" <a class="ext-link" href="http://tinyurl.com/yft8k3o"><span class="icon">​</span>http://tinyurl.com/yft8k3o</a>, I'm redirected ("See boost/bin.v2/libs/python/build/gcc-4.4/debug") which shows that the compile succeeded, but nothing more <a class="ext-link" href="http://tinyurl.com/yft8k3o"><span class="icon">​</span>http://tinyurl.com/yft8k3o</a>. </p> <p> Digging into the bjam.log file, it turns out these tests are skipped because the Boost.Python library failed to build. It would be nice to improve the error reporting to make this clear. </p> <p> The compilation error is: </p> <pre class="wiki">gcc.compile.c++ /home/steve/Packages/boost/upstream/testing/release/results/boost/bin.v2/libs/python/build/gcc-4.4/debug/object/function_doc_signature.o "g++-4.4" -ftemplate-depth-128 -std=c++0x -O0 -fno-inline -w -g -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -I".." -I"/usr/include/python2.5" -c -o "/home/steve/Packages/boost/upstream/testing/release/results/boost/bin.v2/libs/python/build/gcc-4.4/debug/object/function_doc_signature.o" "../libs/python/src/object/function_doc_signature.cpp" ../libs/python/src/object/function_doc_signature.cpp: In static member function 'static boost::python::str boost::python::objects::function_doc_signature_generator::pretty_signature(const boost::python::objects::function*, size_t, bool)': ../libs/python/src/object/function_doc_signature.cpp:238: error: no match for 'operator%' in '"%s %s(%s%s%s%s)" % std::make_tuple(_Elements&amp;&amp; ...) [with _Elements = boost::python::str&amp;, const boost::python::api::object&amp;, boost::python::str, boost::python::str, boost::python::str, std::string](((const boost::python::api::object&amp;)(&amp; f-&gt;boost::python::objects::function::m_name)), ((boost::python::str&amp;&amp;)(&amp; boost::python::str::join(const T&amp;) const [with T = boost::python::api::object_slice](((const boost::python::api::object_slice&amp;)((const boost::python::api::object_slice*)(&amp; boost::python::api::object_operators&lt;U&gt;::slice(const T&amp;, const V&amp;) [with T = int, V = size_t, U = boost::python::api::object](((const int&amp;)((const int*)(&amp;0))), ((const size_t&amp;)((const size_t*)(&amp;(((size_t)arity) - n_overloads))))))))))), ((boost::python::str&amp;&amp;)(&amp;((n_overloads != 0u) ? ((((size_t)arity) != n_overloads) ? boost::python::str(((const char*)" [,")) : boost::python::str(((const char*)"[ "))) : boost::python::str()))), ((boost::python::str&amp;&amp;)(&amp; boost::python::str::join(const T&amp;) const [with T = boost::python::api::object_slice](((const boost::python::api::object_slice&amp;)((const boost::python::api::object_slice*)(&amp; boost::python::api::object_operators&lt;U&gt;::slice(const T&amp;, const V&amp;) [with T = size_t, V = unsigned int, U = boost::python::api::object](((const size_t&amp;)((const size_t*)(&amp;(((size_t)arity) - n_overloads)))), ((const unsigned int&amp;)((const unsigned int*)(&amp; arity)))))))))), ((std::string&amp;&amp;)(&amp; std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;(n_overloads, 93, ((const std::allocator&lt;char&gt;&amp;)((const std::allocator&lt;char&gt;*)(&amp; std::allocator&lt;char&gt;())))))))' ../boost/python/object_operators.hpp:104: note: candidates are: boost::python::api::object boost::python::api::operator%(const boost::python::api::object&amp;, const boost::python::api::object&amp;) ../libs/python/src/object/function_doc_signature.cpp:249: error: no match for 'operator%' in '"%s(%s%s%s%s) -&gt; %s" % std::make_tuple(_Elements&amp;&amp; ...) [with _Elements = const boost::python::api::object&amp;, boost::python::str, boost::python::str, boost::python::str, std::string, boost::python::str&amp;](((boost::python::str&amp;&amp;)(&amp; boost::python::str::join(const T&amp;) const [with T = boost::python::api::object_slice](((const boost::python::api::object_slice&amp;)((const boost::python::api::object_slice*)(&amp; boost::python::api::object_operators&lt;U&gt;::slice(const T&amp;, const V&amp;) [with T = int, V = size_t, U = boost::python::api::object](((const int&amp;)((const int*)(&amp;0))), ((const size_t&amp;)((const size_t*)(&amp;(((size_t)arity) - n_overloads))))))))))), ((boost::python::str&amp;&amp;)(&amp;((n_overloads != 0u) ? ((((size_t)arity) != n_overloads) ? boost::python::str(((const char*)" [,")) : boost::python::str(((const char*)"[ "))) : boost::python::str()))), ((boost::python::str&amp;&amp;)(&amp; boost::python::str::join(const T&amp;) const [with T = boost::python::api::object_slice](((const boost::python::api::object_slice&amp;)((const boost::python::api::object_slice*)(&amp; boost::python::api::object_operators&lt;U&gt;::slice(const T&amp;, const V&amp;) [with T = size_t, V = unsigned int, U = boost::python::api::object](((const size_t&amp;)((const size_t*)(&amp;(((size_t)arity) - n_overloads)))), ((const unsigned int&amp;)((const unsigned int*)(&amp; arity)))))))))), ((std::string&amp;&amp;)(&amp; std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;(n_overloads, 93, ((const std::allocator&lt;char&gt;&amp;)((const std::allocator&lt;char&gt;*)(&amp; std::allocator&lt;char&gt;())))))), ((boost::python::str&amp;)(&amp; ret_type)))' ../boost/python/object_operators.hpp:104: note: candidates are: boost::python::api::object boost::python::api::operator%(const boost::python::api::object&amp;, const boost::python::api::object&amp;) ../libs/python/src/object/function_doc_signature.cpp:262: error: no match for 'operator%' in '"%s %s(%s%s%s%s) %s" % std::make_tuple(_Elements&amp;&amp; ...) [with _Elements = boost::python::str, const boost::python::api::object&amp;, boost::python::str, boost::python::str, boost::python::str, std::string, boost::python::str](((const boost::python::api::object&amp;)(&amp; f-&gt;boost::python::objects::function::m_name)), ((boost::python::str&amp;&amp;)(&amp; boost::python::str::join(const T&amp;) const [with T = boost::python::api::object_slice](((const boost::python::api::object_slice&amp;)((const boost::python::api::object_slice*)(&amp; boost::python::api::object_operators&lt;U&gt;::slice(const T&amp;, const V&amp;) [with T = int, V = size_t, U = boost::python::api::object](((const int&amp;)((const int*)(&amp;0))), ((const size_t&amp;)((const size_t*)(&amp;(((size_t)arity) - n_overloads))))))))))), ((boost::python::str&amp;&amp;)(&amp;((n_overloads != 0u) ? ((((size_t)arity) != n_overloads) ? boost::python::str(((const char*)" [,")) : boost::python::str(((const char*)"[ "))) : boost::python::str()))), ((boost::python::str&amp;&amp;)(&amp; boost::python::str::join(const T&amp;) const [with T = boost::python::api::object_slice](((const boost::python::api::object_slice&amp;)((const boost::python::api::object_slice*)(&amp; boost::python::api::object_operators&lt;U&gt;::slice(const T&amp;, const V&amp;) [with T = size_t, V = unsigned int, U = boost::python::api::object](((const size_t&amp;)((const size_t*)(&amp;(((size_t)arity) - n_overloads)))), ((const unsigned int&amp;)((const unsigned int*)(&amp; arity)))))))))), ((std::string&amp;&amp;)(&amp; std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;(n_overloads, 93, ((const std::allocator&lt;char&gt;&amp;)((const std::allocator&lt;char&gt;*)(&amp; std::allocator&lt;char&gt;())))))), ((boost::python::str&amp;&amp;)(&amp;(cpp_types ? boost::python::str(((const char*)"")) : boost::python::str(((const boost::python::str&amp;)((const boost::python::str*)(&amp; ret_type))))))))' ../boost/python/object_operators.hpp:104: note: candidates are: boost::python::api::object boost::python::api::operator%(const boost::python::api::object&amp;, const boost::python::api::object&amp;) ...failed gcc.compile.c++ /home/steve/Packages/boost/upstream/testing/release/results/boost/bin.v2/libs/python/build/gcc-4.4/debug/object/function_doc_signature.o... </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3584 Trac 1.4.3 Richard Webb <richard.webb@…> Mon, 02 Nov 2009 13:05:57 GMT <link>https://svn.boost.org/trac10/ticket/3584#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3584#comment:1</guid> <description> <p> I don't know whats wrong with the error reporting, but the compiler error posted above looks like a conflict between std::make_tuple and boost::python::make_tuple when building in c++0x mode. </p> <p> Explicitly calling python::make_tuple allows the lib to build for me on Mingw 4.4.0. </p> </description> <category>Ticket</category> </item> <item> <author>Richard Webb <richard.webb@…></author> <pubDate>Mon, 02 Nov 2009 13:06:19 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/3584 https://svn.boost.org/trac10/ticket/3584 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">python.patch</span> </li> </ul> Ticket Richard Webb <richard.webb@…> Mon, 02 Nov 2009 13:57:15 GMT <link>https://svn.boost.org/trac10/ticket/3584#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3584#comment:2</guid> <description> <p> There are also failures in 3 of the pickle tests because some calls to make_tuple are trying to call std::make_tuple. (e.g. <a class="ext-link" href="http://tinyurl.com/ycm2y3r"><span class="icon">​</span>http://tinyurl.com/ycm2y3r</a>). </p> <p> Explicitly calling boost::python::make_tuple seems to avoid the problem on Mingw 4.4.0. </p> </description> <category>Ticket</category> </item> <item> <author>Richard Webb <richard.webb@…></author> <pubDate>Mon, 02 Nov 2009 13:57:39 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/3584 https://svn.boost.org/trac10/ticket/3584 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">python_test.patch</span> </li> </ul> Ticket troy d. straszheim Fri, 13 Nov 2009 04:04:35 GMT cc changed https://svn.boost.org/trac10/ticket/3584#comment:3 https://svn.boost.org/trac10/ticket/3584#comment:3 <ul> <li><strong>cc</strong> <span class="trac-author">Stefan</span> <span class="trac-author">Seefeld</span> <span class="trac-author">&lt;seefeld@…&gt;</span> <span class="trac-author">troy@…</span> added; <span class="trac-author">Stefan Seefeld &lt;seefeld@…&gt;</span> removed </li> </ul> <p> Thanks for the ticket! </p> <p> I've verified on recent 64 bit linux and fixed these on my branch: </p> <p> <a class="ext-link" href="http://gitorious.org/~straszheim/boost/straszheim/commit/ebb91573be359ec0a4dcff1a8a417c3de0c0c5e8"><span class="icon">​</span>http://gitorious.org/~straszheim/boost/straszheim/commit/ebb91573be359ec0a4dcff1a8a417c3de0c0c5e8</a> </p> <p> Currently asking Ralf if we want to try to squeeze these in to the 1.41.0 release, they look plenty safe to me. Unfortunately I don't have any wisdom on the various boost.build and/or test reporting issues, you may want to file a bug with them. </p> Ticket Ralf W. Grosse-Kunstleve Fri, 13 Nov 2009 20:53:31 GMT cc, owner, status, summary changed https://svn.boost.org/trac10/ticket/3584#comment:4 https://svn.boost.org/trac10/ticket/3584#comment:4 <ul> <li><strong>cc</strong> <span class="trac-author">rwgk@…</span> added </li> <li><strong>owner</strong> changed from <span class="trac-author">Dave Abrahams</span> to <span class="trac-author">Ralf W. Grosse-Kunstleve</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>summary</strong> <span class="trac-field-old">Boost.Python fails to build using gcc 4.4 on linux</span> → <span class="trac-field-new">Boost.Python fails to build using gcc 4.4 on linux (-std=c++0x)</span> </li> </ul> <p> Resolved on the trunk with svn rev. 57641. </p> <p> Intel C++ 10.1 and 11.1 don't need the patches, therefore I'm guessing it is a gcc 4.4 name lookup bug. </p> <p> I'll wait for a test cycle before merging into the release. </p> Ticket Ralf W. Grosse-Kunstleve Sat, 21 Nov 2009 14:47:51 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3584#comment:5 https://svn.boost.org/trac10/ticket/3584#comment:5 <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">fixed</span> </li> </ul> <p> Merged into the release branch with svn rev. 57837. </p> <p> Sorry it was too late for the 1.41.0 release. I didn't want to push it for this change. </p> Ticket