Boost clang-3.4
ahojnnes opened this issue · 9 comments
Boost does not work with the newly released command-line tools 5.1 from Apple, which updates to clang 3.4.
Error when compiling a library which depends on boost:
In file included from /usr/local/include/boost/thread.hpp:17:
In file included from /usr/local/include/boost/thread/once.hpp:20:
In file included from /usr/local/include/boost/thread/pthread/once_atomic.hpp:20:
In file included from /usr/local/include/boost/atomic.hpp:12:
In file included from /usr/local/include/boost/atomic/atomic.hpp:17:
In file included from /usr/local/include/boost/atomic/detail/platform.hpp:22:
/usr/local/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/local/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/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to 'boost::atomics::detail::storage128_type' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
^
/usr/local/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/local/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/local/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/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to 'boost::atomics::detail::storage128_type &&' for 1st
argument
struct BOOST_ALIGNMENT(16) storage128_type
^
/usr/local/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/local/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/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to 'boost::atomics::detail::storage128_type &&' for 1st
argument
struct BOOST_ALIGNMENT(16) storage128_type
^
/usr/local/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/local/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/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to 'boost::atomics::detail::storage128_type &&' for 1st
argument
struct BOOST_ALIGNMENT(16) storage128_type
^
/usr/local/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/local/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/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to 'boost::atomics::detail::storage128_type &&' for 1st
argument
struct BOOST_ALIGNMENT(16) storage128_type
^
/usr/local/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/local/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/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to 'boost::atomics::detail::storage128_type &&' for 1st
argument
struct BOOST_ALIGNMENT(16) storage128_type
^
/usr/local/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/local/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/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to 'boost::atomics::detail::storage128_type &&' for 1st
argument
struct BOOST_ALIGNMENT(16) storage128_type
^
There seems to be a fix: http://boost.2283326.n4.nabble.com/config-clang-int128-support-td4653826.html or https://trac.macports.org/ticket/42282
Applying these two patches to the respective header files fixes the problem:
Same here.
brew install boost --build-from-source --HEAD
should also work
same problem
The atomic patches were pulled.
Has it ever been considered to increment the version for such 'patch releases' of formulae where the upstream version does not change (much like debian appending -0
, -1
etc)? Updates without this do not get noticed by brew upgrade
, which is a bit of a nuisance.
@NikolausDemmel I agree.
hi there, sorry to ask such a simple question but how can i install boost with this patch, brew upgrade
doesn't find anything.
I found that doing brew update
then brew reinstall boost
fixed it