Opened 11 years ago
Closed 11 years ago
#42282 closed defect (fixed)
clang-3.4 and later fail to compile boost 1.55.0
Reported by: | jeremyhu (Jeremy Huddleston Sequoia) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.1 |
Keywords: | Cc: | larryv (Lawrence Velázquez), mamoll (Mark Moll), mark@…, cooljeanius (Eric Gallager), arto@… | |
Port: | boost |
Description
boost-1.55.0 fails to build with current versions of clang (3.4 and 3.5). It builds fine with clang-3.3. The error is here:
/opt/local/bin/clang++-mp-3.4 -ftemplate-depth-128 -Os -stdlib=libc++ -O3 -finline-functions -Wno-inline -Wall -pedantic -gdwarf-2 -fexceptions -arch i386 -arch x86_64 -Wextra -Wno-long-long -Wno-variadic-macros -Wunused-function -fpermissive -pedantic -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_THREAD_POSIX -DNDEBUG -I"." -c -o "bin.v2/libs/thread/build/darwin-4.2.1/release/address-model-32_64/architecture-x86/link-static/pch-off/threading-multi/pthread/once.o" "libs/thread/src/pthread/once.cpp" In file included from libs/thread/src/pthread/once.cpp:8: In file included from libs/thread/src/pthread/./once_atomic.cpp:9: In file included from ./boost/thread/once.hpp:20: In file included from ./boost/thread/pthread/once_atomic.hpp:20: In file included from ./boost/atomic.hpp:12: In file included from ./boost/atomic/atomic.hpp:17: In file included from ./boost/atomic/detail/platform.hpp:22: ./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) ^ ~ ./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 ^ ./boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided ./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; ^ ~ ./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 ^ ./boost/atomic/detail/gcc-atomic.hpp:966:34: warning: unused parameter 'v' [-Wunused-parameter] void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT ^ ./boost/atomic/detail/gcc-atomic.hpp:966:50: warning: unused parameter 'order' [-Wunused-parameter] void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT ^ ./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; ^ ~ ./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 ^ ./boost/atomic/detail/gcc-atomic.hpp:981:43: warning: unused parameter 'v' [-Wunused-parameter] value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT ^ ./boost/atomic/detail/gcc-atomic.hpp:981:59: warning: unused parameter 'order' [-Wunused-parameter] value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT ^ ./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; ^ ~ ./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 ^ ./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; ^ ~ ./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 ^ ./boost/atomic/detail/gcc-atomic.hpp:993:27: warning: unused parameter 'desired' [-Wunused-parameter] value_type const& desired, ^ ./boost/atomic/detail/gcc-atomic.hpp:994:22: warning: unused parameter 'success_order' [-Wunused-parameter] memory_order success_order, ^ ./boost/atomic/detail/gcc-atomic.hpp:995:22: warning: unused parameter 'failure_order' [-Wunused-parameter] memory_order failure_order) volatile BOOST_NOEXCEPT ^ ./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; ^ ~ ./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 ^ ./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; ^ ~ ./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 ^ ./boost/atomic/detail/gcc-atomic.hpp:1009:27: warning: unused parameter 'desired' [-Wunused-parameter] value_type const& desired, ^ ./boost/atomic/detail/gcc-atomic.hpp:1010:22: warning: unused parameter 'success_order' [-Wunused-parameter] memory_order success_order, ^ ./boost/atomic/detail/gcc-atomic.hpp:1011:22: warning: unused parameter 'failure_order' [-Wunused-parameter] memory_order failure_order) volatile BOOST_NOEXCEPT ^ 10 warnings and 7 errors generated.
Change History (11)
comment:1 follow-up: 5 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)
comment:5 Changed 11 years ago by cooljeanius (Eric Gallager)
Replying to jeremyhu@…:
They say it should be fixed there now: https://svn.boost.org/trac/boost/ticket/9610#comment:3
comment:7 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Thanks. This is the referenced patch. I'll give it a whirl:
https://github.com/boostorg/atomic/commit/6bb71fdd8f7cc346d90fb14beb38b7297fc1ffd9
comment:9 Changed 11 years ago by arto@…
The Boost 1.55.0 build with Clang 3.4 successfully completed for me after manually applying the following two patches to the staging directory:
comment:10 Changed 11 years ago by mamoll (Mark Moll)
The just-released Xcode 5.1 uses clang 3.4, so the upstream patches are now necessary with the default setup. Committed in r117769.
comment:11 Changed 11 years ago by mamoll (Mark Moll)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
https://svn.boost.org/trac/boost/ticket/9610