scylladb / seastar

High performance server-side application framework
http://seastar.io
Apache License 2.0
8.37k stars 1.55k forks source link

Building with boost-1.60 fails #95

Open npmadhu opened 8 years ago

npmadhu commented 8 years ago

Lots of errors - have not investigated - Ubuntu looks to carry 1.58 - it builds on Ubuntu. Any ideas/thoughts?

9/222] CXX build/debug/tests/alloc_test.o
FAILED: g++ -MMD -MT build/debug/tests/alloc_test.o -MF build/debug/tests/alloc_test.o.d -fsanitize=address -fsanitize=leak -fsanitize=undefined -fno-sanitize=vptr -O0 -DDEBUG -DDEBUG_SHARED_PTR -DDEFAULT_ALLOCATOR -I build/debug/gen -std=gnu++1y -g  -Wall -Werror -fvisibility=hidden -pthread -I. -U_FORTIFY_SOURCE   -DHAVE_HWLOC -DHAVE_NUMA -c -o build/debug/tests/alloc_test.o tests/alloc_test.cc
In file included from /usr/include/boost/smart_ptr/detail/shared_count.hpp:44:0,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:28,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/test/tools/assertion_result.hpp:21,
                 from /usr/include/boost/test/tools/old/impl.hpp:20,
                 from /usr/include/boost/test/test_tools.hpp:46,
                 from /usr/include/boost/test/unit_test.hpp:18,
                 from ./tests/test-utils.hh:27,
                 from tests/alloc_test.cc:22:
/usr/include/boost/core/addressof.hpp:25:26: error: redefinition of 'struct boost::detail::addr_impl_ref<T>'
 template<class T> struct addr_impl_ref
                          ^
In file included from /usr/include/boost/test/utils/class_properties.hpp:29:0,
                 from /usr/include/boost/test/tools/assertion_result.hpp:16,
                 from /usr/include/boost/test/tools/old/impl.hpp:20,
                 from /usr/include/boost/test/test_tools.hpp:46,
                 from /usr/include/boost/test/unit_test.hpp:18,
                 from ./tests/test-utils.hh:27,
                 from tests/alloc_test.cc:22:
/usr/include/boost/utility/addressof.hpp:24:26: error: previous definition of 'struct boost::detail::addr_impl_ref<T>'
 template<class T> struct addr_impl_ref
                          ^
In file included from /usr/include/boost/smart_ptr/detail/shared_count.hpp:44:0,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:28,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/test/tools/assertion_result.hpp:21,
                 from /usr/include/boost/test/tools/old/impl.hpp:20,
                 from /usr/include/boost/test/test_tools.hpp:46,
                 from /usr/include/boost/test/unit_test.hpp:18,
                 from ./tests/test-utils.hh:27,
                 from tests/alloc_test.cc:22:
/usr/include/boost/core/addressof.hpp:36:26: error: redefinition of 'struct boost::detail::addressof_impl<T>'
 template<class T> struct addressof_impl
                          ^
In file included from /usr/include/boost/test/utils/class_properties.hpp:29:0,
                 from /usr/include/boost/test/tools/assertion_result.hpp:16,
                 from /usr/include/boost/test/tools/old/impl.hpp:20,
                 from /usr/include/boost/test/test_tools.hpp:46,
                 from /usr/include/boost/test/unit_test.hpp:18,
                 from ./tests/test-utils.hh:27,
                 from tests/alloc_test.cc:22:
/usr/include/boost/utility/addressof.hpp:35:26: error: previous definition of 'struct boost::detail::addressof_impl<T>'
 template<class T> struct addressof_impl
                          ^
In file included from /usr/include/boost/smart_ptr/detail/shared_count.hpp:44:0,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:28,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/test/tools/assertion_result.hpp:21,
                 from /usr/include/boost/test/tools/old/impl.hpp:20,
                 from /usr/include/boost/test/test_tools.hpp:46,
                 from /usr/include/boost/test/unit_test.hpp:18,
                 from ./tests/test-utils.hh:27,
                 from tests/alloc_test.cc:22:
/usr/include/boost/core/addressof.hpp:108:5: error: redefinition of 'template<class T> T* boost::addressof(T&)'
 T * addressof( T & v )
     ^
In file included from /usr/include/boost/test/utils/class_properties.hpp:29:0,
                 from /usr/include/boost/test/tools/assertion_result.hpp:16,
                 from /usr/include/boost/test/tools/old/impl.hpp:20,
                 from /usr/include/boost/test/test_tools.hpp:46,
                 from /usr/include/boost/test/unit_test.hpp:18,
                 from ./tests/test-utils.hh:27,
                 from tests/alloc_test.cc:22:
/usr/include/boost/utility/addressof.hpp:51:23: note: 'template<class T> T* boost::addressof(T&)' previously declared here
 template<class T> T * addressof( T & v )
                       ^
In file included from /usr/include/boost/type_traits/ice.hpp:15:0,
                 from /usr/include/boost/function/function_base.hpp:28,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function/function_template.hpp:13,
                 from /usr/include/boost/function/detail/maybe_include.hpp:13,
                 from /usr/include/boost/function/function0.hpp:11,
                 from /usr/include/boost/test/tree/fixture.hpp:24,
                 from /usr/include/boost/test/tree/decorator.hpp:22,
                 from /usr/include/boost/test/tools/fpc_tolerance.hpp:19,
                 from /usr/include/boost/test/tools/fpc_op.hpp:19,
                 from /usr/include/boost/test/test_tools.hpp:54,
                 from /usr/include/boost/test/unit_test.hpp:18,
                 from ./tests/test-utils.hh:27,
                 from tests/alloc_test.cc:22:
/usr/include/boost/type_traits/detail/ice_or.hpp:17:71: note: #pragma message: NOTE: Use of this header (ice_or.hpp) is deprecated
 # pragma message("NOTE: Use of this header (ice_or.hpp) is deprecated")
npmadhu commented 8 years ago

Compilation succeeds with 1.58 - definitely needs more investigation - will try to see after full compilation.

avikivity commented 8 years ago

Use "```" to quote compiler output.

Looks like bugs in boost 1.60.

nyh commented 8 years ago

Boost has (not just in 1.60), two different header files: /usr/include/boost/core/addressof.hpp and /usr/include/boost/utility/addressof.hpp And both get used as your error message shows. On my machine (Boost 1.57), the second simply includes the first, as #include <boost/core/addressof.hpp>, so you cannot have such a redefinition error... What does the second file contain in your Boost 1.60?

npmadhu commented 8 years ago

the second file (/usr/include/boost/utility/addressof.hpp) just includes the first. The code I pulled is 1.60 from the Dec. 17th release. 1.58 also has the same structure and does not give this error - probably something else.