[pkg-boost-devel] Bug#758892: boost/thread.hpp: compilation fails with clang for particular CPUs
Andrey Gursky
andrey.gursky at e-mail.ua
Fri Aug 22 14:37:55 UTC 2014
Package: boost1.55
Version: 1.55.0+dfsg-2
Severity: normal
Dear maintainer,
programs using boost thread fail to compile with clang for particular CPUs:
#include <boost/thread.hpp>
int main() { return 0; }
$ clang++-3.4 -march=corei7 -o test test.cpp -lboost_system
In file included from test.cpp:5:
In file included from /usr/include/boost/thread.hpp:17:
In file included from /usr/include/boost/thread/once.hpp:20:
In file included from /usr/include/boost/thread/pthread/once_atomic.hpp:20:
In file included from /usr/include/boost/atomic.hpp:12:
In file included from /usr/include/boost/atomic/atomic.hpp:17:
In file included from /usr/include/boost/atomic/detail/platform.hpp:22:
/usr/include/boost/atomic/detail/gcc-atomic.hpp:961:64: error: no
matching constructor for initialization of 'storage_type' (aka
'boost::atomics::detail::storage128_type')
explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0)
^ ~
/usr/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
candidate constructor (the implicit copy constructor) not viable: no
known conversion from 'int' to
'const boost::atomics::detail::storage128_type' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
^
/usr/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
candidate constructor (the implicit default constructor) not viable:
requires 0 arguments, but 1 was provided
/usr/include/boost/atomic/detail/gcc-atomic.hpp:968:22: error: no
viable conversion from 'int' to 'storage_type' (aka
'boost::atomics::detail::storage128_type')
storage_type tmp = 0;
^ ~
/usr/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
candidate constructor (the implicit copy constructor) not viable: no
known conversion from 'int' to
'const boost::atomics::detail::storage128_type &' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
^
/usr/include/boost/atomic/detail/gcc-atomic.hpp:983:22: error: no
viable conversion from 'int' to 'storage_type' (aka
'boost::atomics::detail::storage128_type')
storage_type tmp = 0;
^ ~
/usr/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
candidate constructor (the implicit copy constructor) not viable: no
known conversion from 'int' to
'const boost::atomics::detail::storage128_type &' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
^
/usr/include/boost/atomic/detail/gcc-atomic.hpp:997:22: error: no
viable conversion from 'int' to 'storage_type' (aka
'boost::atomics::detail::storage128_type')
storage_type expected_s = 0, desired_s = 0;
^ ~
/usr/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
candidate constructor (the implicit copy constructor) not viable: no
known conversion from 'int' to
'const boost::atomics::detail::storage128_type &' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
^
/usr/include/boost/atomic/detail/gcc-atomic.hpp:997:38: error: no
viable conversion from 'int' to 'storage_type' (aka
'boost::atomics::detail::storage128_type')
storage_type expected_s = 0, desired_s = 0;
^ ~
/usr/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
candidate constructor (the implicit copy constructor) not viable: no
known conversion from 'int' to
'const boost::atomics::detail::storage128_type &' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
^
/usr/include/boost/atomic/detail/gcc-atomic.hpp:1013:22: error: no
viable conversion from 'int' to 'storage_type' (aka
'boost::atomics::detail::storage128_type')
storage_type expected_s = 0, desired_s = 0;
^ ~
/usr/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
candidate constructor (the implicit copy constructor) not viable: no
known conversion from 'int' to
'const boost::atomics::detail::storage128_type &' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
^
/usr/include/boost/atomic/detail/gcc-atomic.hpp:1013:38: error: no
viable conversion from 'int' to 'storage_type' (aka
'boost::atomics::detail::storage128_type')
storage_type expected_s = 0, desired_s = 0;
^ ~
/usr/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
candidate constructor (the implicit copy constructor) not viable: no
known conversion from 'int' to
'const boost::atomics::detail::storage128_type &' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
^
7 errors generated.
$
This was reported in [1] and seems to be fixed 5 month ago by [2].
What do you think about adding this patch?
Thanks,
Andrey
[1] https://svn.boost.org/trac/boost/ticket/9610
[2] https://github.com/boostorg/atomic/commit/e04ffeb523edb6ac2c3f980878787a4112a4495c
More information about the pkg-boost-devel
mailing list