Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Boost clang-3.4 #27396

Closed
ahojnnes opened this issue Mar 11, 2014 · 9 comments
Closed

Boost clang-3.4 #27396

ahojnnes opened this issue Mar 11, 2014 · 9 comments

Comments

@ahojnnes
Copy link
Contributor

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

@ahojnnes
Copy link
Contributor Author

Applying these two patches to the respective header files fixes the problem:

boostorg/atomic@6bb71fd
boostorg/atomic@e4bde20

@adamv adamv added the clang label Mar 11, 2014
@ghost
Copy link

ghost commented Mar 11, 2014

Same here.

@quiqua
Copy link

quiqua commented Mar 11, 2014

brew install boost --build-from-source --HEAD
should also work

@iShift
Copy link

iShift commented Mar 11, 2014

same problem

@adamv
Copy link
Contributor

adamv commented Mar 14, 2014

The atomic patches were pulled.

@adamv adamv closed this as completed Mar 14, 2014
@NikolausDemmel
Copy link
Contributor

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.

@ahojnnes
Copy link
Contributor Author

@NikolausDemmel I agree.

@jonathantopf
Copy link

hi there, sorry to ask such a simple question but how can i install boost with this patch, brew upgrade doesn't find anything.

@jonathantopf
Copy link

I found that doing brew update then brew reinstall boost fixed it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants