Opened 13 years ago
Closed 13 years ago
#3584 closed Bugs (fixed)
Boost.Python fails to build using gcc 4.4 on linux (-std=c++0x)
Reported by: | Owned by: | Ralf W. Grosse-Kunstleve | |
---|---|---|---|
Milestone: | Boost 1.41.0 | Component: | python USE GITHUB |
Version: | Boost Release Branch | Severity: | Problem |
Keywords: | Cc: | Stefan, Seefeld, <seefeld@…>, troy@…, rwgk@… |
Description
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. http://tinyurl.com/yl7yjkv
If I click on a test result URL, such as for "andreas_beyer" http://tinyurl.com/yft8k3o, I'm redirected ("See boost/bin.v2/libs/python/build/gcc-4.4/debug") which shows that the compile succeeded, but nothing more http://tinyurl.com/yft8k3o.
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.
The compilation error is:
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&& ...) [with _Elements = boost::python::str&, const boost::python::api::object&, boost::python::str, boost::python::str, boost::python::str, std::string](((const boost::python::api::object&)(& f->boost::python::objects::function::m_name)), ((boost::python::str&&)(& boost::python::str::join(const T&) const [with T = boost::python::api::object_slice](((const boost::python::api::object_slice&)((const boost::python::api::object_slice*)(& boost::python::api::object_operators<U>::slice(const T&, const V&) [with T = int, V = size_t, U = boost::python::api::object](((const int&)((const int*)(&0))), ((const size_t&)((const size_t*)(&(((size_t)arity) - n_overloads))))))))))), ((boost::python::str&&)(&((n_overloads != 0u) ? ((((size_t)arity) != n_overloads) ? boost::python::str(((const char*)" [,")) : boost::python::str(((const char*)"[ "))) : boost::python::str()))), ((boost::python::str&&)(& boost::python::str::join(const T&) const [with T = boost::python::api::object_slice](((const boost::python::api::object_slice&)((const boost::python::api::object_slice*)(& boost::python::api::object_operators<U>::slice(const T&, const V&) [with T = size_t, V = unsigned int, U = boost::python::api::object](((const size_t&)((const size_t*)(&(((size_t)arity) - n_overloads)))), ((const unsigned int&)((const unsigned int*)(& arity)))))))))), ((std::string&&)(& std::basic_string<char, std::char_traits<char>, std::allocator<char> >(n_overloads, 93, ((const std::allocator<char>&)((const std::allocator<char>*)(& std::allocator<char>())))))))' ../boost/python/object_operators.hpp:104: note: candidates are: boost::python::api::object boost::python::api::operator%(const boost::python::api::object&, const boost::python::api::object&) ../libs/python/src/object/function_doc_signature.cpp:249: error: no match for 'operator%' in '"%s(%s%s%s%s) -> %s" % std::make_tuple(_Elements&& ...) [with _Elements = const boost::python::api::object&, boost::python::str, boost::python::str, boost::python::str, std::string, boost::python::str&](((boost::python::str&&)(& boost::python::str::join(const T&) const [with T = boost::python::api::object_slice](((const boost::python::api::object_slice&)((const boost::python::api::object_slice*)(& boost::python::api::object_operators<U>::slice(const T&, const V&) [with T = int, V = size_t, U = boost::python::api::object](((const int&)((const int*)(&0))), ((const size_t&)((const size_t*)(&(((size_t)arity) - n_overloads))))))))))), ((boost::python::str&&)(&((n_overloads != 0u) ? ((((size_t)arity) != n_overloads) ? boost::python::str(((const char*)" [,")) : boost::python::str(((const char*)"[ "))) : boost::python::str()))), ((boost::python::str&&)(& boost::python::str::join(const T&) const [with T = boost::python::api::object_slice](((const boost::python::api::object_slice&)((const boost::python::api::object_slice*)(& boost::python::api::object_operators<U>::slice(const T&, const V&) [with T = size_t, V = unsigned int, U = boost::python::api::object](((const size_t&)((const size_t*)(&(((size_t)arity) - n_overloads)))), ((const unsigned int&)((const unsigned int*)(& arity)))))))))), ((std::string&&)(& std::basic_string<char, std::char_traits<char>, std::allocator<char> >(n_overloads, 93, ((const std::allocator<char>&)((const std::allocator<char>*)(& std::allocator<char>())))))), ((boost::python::str&)(& ret_type)))' ../boost/python/object_operators.hpp:104: note: candidates are: boost::python::api::object boost::python::api::operator%(const boost::python::api::object&, const boost::python::api::object&) ../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&& ...) [with _Elements = boost::python::str, const boost::python::api::object&, boost::python::str, boost::python::str, boost::python::str, std::string, boost::python::str](((const boost::python::api::object&)(& f->boost::python::objects::function::m_name)), ((boost::python::str&&)(& boost::python::str::join(const T&) const [with T = boost::python::api::object_slice](((const boost::python::api::object_slice&)((const boost::python::api::object_slice*)(& boost::python::api::object_operators<U>::slice(const T&, const V&) [with T = int, V = size_t, U = boost::python::api::object](((const int&)((const int*)(&0))), ((const size_t&)((const size_t*)(&(((size_t)arity) - n_overloads))))))))))), ((boost::python::str&&)(&((n_overloads != 0u) ? ((((size_t)arity) != n_overloads) ? boost::python::str(((const char*)" [,")) : boost::python::str(((const char*)"[ "))) : boost::python::str()))), ((boost::python::str&&)(& boost::python::str::join(const T&) const [with T = boost::python::api::object_slice](((const boost::python::api::object_slice&)((const boost::python::api::object_slice*)(& boost::python::api::object_operators<U>::slice(const T&, const V&) [with T = size_t, V = unsigned int, U = boost::python::api::object](((const size_t&)((const size_t*)(&(((size_t)arity) - n_overloads)))), ((const unsigned int&)((const unsigned int*)(& arity)))))))))), ((std::string&&)(& std::basic_string<char, std::char_traits<char>, std::allocator<char> >(n_overloads, 93, ((const std::allocator<char>&)((const std::allocator<char>*)(& std::allocator<char>())))))), ((boost::python::str&&)(&(cpp_types ? boost::python::str(((const char*)"")) : boost::python::str(((const boost::python::str&)((const boost::python::str*)(& ret_type))))))))' ../boost/python/object_operators.hpp:104: note: candidates are: boost::python::api::object boost::python::api::operator%(const boost::python::api::object&, const boost::python::api::object&) ...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...
Attachments (2)
Change History (7)
comment:1 by , 13 years ago
by , 13 years ago
Attachment: | python.patch added |
---|
comment:2 by , 13 years ago
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. http://tinyurl.com/ycm2y3r).
Explicitly calling boost::python::make_tuple seems to avoid the problem on Mingw 4.4.0.
by , 13 years ago
Attachment: | python_test.patch added |
---|
comment:3 by , 13 years ago
Cc: | added; removed |
---|
Thanks for the ticket!
I've verified on recent 64 bit linux and fixed these on my branch:
http://gitorious.org/~straszheim/boost/straszheim/commit/ebb91573be359ec0a4dcff1a8a417c3de0c0c5e8
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.
comment:4 by , 13 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Summary: | Boost.Python fails to build using gcc 4.4 on linux → Boost.Python fails to build using gcc 4.4 on linux (-std=c++0x) |
Resolved on the trunk with svn rev. 57641.
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.
I'll wait for a test cycle before merging into the release.
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Merged into the release branch with svn rev. 57837.
Sorry it was too late for the 1.41.0 release. I didn't want to push it for this change.
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.
Explicitly calling python::make_tuple allows the lib to build for me on Mingw 4.4.0.