Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests do not compile with boost 1.6X under gcc 6.1.1 or gcc 5.3.0 #295

Closed
xyproto opened this issue Jun 2, 2016 · 5 comments
Closed

Tests do not compile with boost 1.6X under gcc 6.1.1 or gcc 5.3.0 #295

xyproto opened this issue Jun 2, 2016 · 5 comments

Comments

@xyproto
Copy link

xyproto commented Jun 2, 2016

Arch Linux (x86_64)
gcc (GCC) 6.1.1 20160501
boost 1.60.0

When building version 1.1.2 or the latest revision of Cereal, this is the output:

[13/87] Building CXX object unittests/CMakeFiles/test_map.dir/map.cpp.o
FAILED: unittests/CMakeFiles/test_map.dir/map.cpp.o 
/usr/bin/c++   -DBOOST_TEST_DYN_LINK -DBOOST_TEST_MODULE=test_map -I.././include -std=c++11 -Wall -Werror -g -Wextra -Wshadow -pedantic  -O3 -DNDEBUG -MMD -MT unittests/CMakeFiles/test_map.dir/map.cpp.o -MF unittests/CMakeFiles/test_map.dir/map.cpp.o.d -o unittests/CMakeFiles/test_map.dir/map.cpp.o -c ../unittests/map.cpp
In file included from /usr/include/boost/test/tools/old/impl.hpp:24:0,
                 from /usr/include/boost/test/test_tools.hpp:46,
                 from /usr/include/boost/test/unit_test.hpp:18,
                 from ../unittests/map.cpp:28:
/usr/include/boost/test/tools/detail/print_helper.hpp: In instantiation of ‘void boost::test_tools::tt_detail::print_log_value<T>::operator()(std::ostream&, const T&) [with T = std::pair<const std::__cxx11::basic_string<char>, int>; std::ostream = std::basic_ostream<char>]’:
/usr/include/boost/test/tools/detail/print_helper.hpp:172:25:   required from ‘std::ostream& boost::test_tools::tt_detail::operator<<(std::ostream&, const boost::test_tools::tt_detail::print_helper_t<T>&) [with T = std::pair<const std::__cxx11::basic_string<char>, int>; std::ostream = std::basic_ostream<char>]’
/usr/include/boost/test/utils/wrap_stringstream.hpp:66:19:   required from ‘boost::basic_wrap_stringstream<CharT>& boost::operator<<(boost::basic_wrap_stringstream<CharT>&, const T&) [with CharT = char; T = boost::test_tools::tt_detail::print_helper_t<std::pair<const std::__cxx11::basic_string<char>, int> >]’
/usr/include/boost/test/tools/old/impl.hpp:212:19:   required from ‘boost::test_tools::assertion_result boost::test_tools::tt_detail::equal_coll_impl::operator()(Left, Left, Right, Right) [with Left = std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >; Right = std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >]’
../unittests/map.cpp:106:5:   required from ‘void test_map() [with IArchive = cereal::BinaryInputArchive; OArchive = cereal::BinaryOutputArchive]’
../unittests/map.cpp:170:69:   required from here
/usr/include/boost/test/tools/detail/print_helper.hpp:50:14: error: no match for ‘operator<<’ (operand types are ‘std::ostream {aka std::basic_ostream<char>}’ and ‘const std::pair<const std::__cxx11::basic_string<char>, int>’)
         ostr << t;
         ~~~~~^~~~
In file included from /usr/include/c++/6.1.1/iostream:39:0,
                 from .././include/cereal/access.hpp:33,
                 from .././include/cereal/details/traits.hpp:43,
                 from .././include/cereal/cereal.hpp:43,
                 from .././include/cereal/types/memory.hpp:33,
                 from ../unittests/common.hpp:30,
                 from ../unittests/map.cpp:27:
/usr/include/c++/6.1.1/ostream:108:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(__ostream_type& (*__pf)(__ostream_type&))
       ^~~~~~~~
[...]
@xyproto
Copy link
Author

xyproto commented Jun 2, 2016

With GCC 5.3.0, the errors look similar:

[1/87] Building CXX object unittests/CMakeFiles/test_map.dir/map.cpp.o
FAILED: unittests/CMakeFiles/test_map.dir/map.cpp.o
/usr/bin/g++-5   -DBOOST_TEST_DYN_LINK -DBOOST_TEST_MODULE=test_map -I.././include -std=c++11 -Wall -Werror -g -Wextra -Wshadow -pedantic  -O3 -DNDEBUG -MMD -MT unittests/CMakeFiles/test_map.dir/map.cpp.o -MF unittests/CMakeFiles/test_map.dir/map.cpp.o.d -o unittests/CMakeFiles/test_map.dir/map.cpp.o -c ../unittests/map.cpp
In file included from /usr/include/boost/test/tools/old/impl.hpp:24:0,
                 from /usr/include/boost/test/test_tools.hpp:46,
                 from /usr/include/boost/test/unit_test.hpp:18,
                 from ../unittests/map.cpp:28:
/usr/include/boost/test/tools/detail/print_helper.hpp: In instantiation of ‘void boost::test_tools::tt_detail::print_log_value<T>::operator()(std::ostream&, const T&) [with T = std::pair<const std::__cxx11::basic_string<char>, int>; std::ostream = std::basic_ostream<char>]’:
/usr/include/boost/test/tools/detail/print_helper.hpp:172:25:   required from ‘std::ostream& boost::test_tools::tt_detail::operator<<(std::ostream&, const boost::test_tools::tt_detail::print_helper_t<T>&) [with T = std::pair<const std::__cxx11::basic_string<char>, int>; std::ostream = std::basic_ostream<char>]’
/usr/include/boost/test/utils/wrap_stringstream.hpp:66:19:   required from ‘boost::basic_wrap_stringstream<CharT>& boost::operator<<(boost::basic_wrap_stringstream<CharT>&, const T&) [with CharT = char; T = boost::test_tools::tt_detail::print_helper_t<std::pair<const std::__cxx11::basic_string<char>, int> >]’
/usr/include/boost/test/tools/old/impl.hpp:212:19:   required from ‘boost::test_tools::assertion_result boost::test_tools::tt_detail::equal_coll_impl::operator()(Left, Left, Right, Right) [with Left = std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >; Right = std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >]’
../unittests/map.cpp:106:5:   required from ‘void test_map() [with IArchive = cereal::BinaryInputArchive; OArchive = cereal::BinaryOutputArchive]’
../unittests/map.cpp:170:69:   required from here
/usr/include/boost/test/tools/detail/print_helper.hpp:50:14: error: no match for ‘operator<<’ (operand types are ‘std::ostream {aka std::basic_ostream<char>}’ and ‘const std::pair<const std::__cxx11::basic_string<char>, int>’)
         ostr << t;
              ^
In file included from /usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include/c++/iostream:39:0,
                 from .././include/cereal/access.hpp:33,
                 from .././include/cereal/details/traits.hpp:43,
                 from .././include/cereal/cereal.hpp:43,
                 from .././include/cereal/types/memory.hpp:33,
                 from ../unittests/common.hpp:30,
                 from ../unittests/map.cpp:27:
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include/c++/ostream:108:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(__ostream_type& (*__pf)(__ostream_type&))
       ^
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include/c++/ostream:108:7: note:   no known conversion for argument 1 from ‘const std::pair<const std::__cxx11::basic_string<char>, int>’ to ‘std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&) {aka std::basic_ostream<char>& (*)(std::basic_ostream<char>&)}’
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include/c++/ostream:117:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (*)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]
       operator<<(__ios_type& (*__pf)(__ios_type&))
       ^
[...]

@xyproto xyproto changed the title Does not build with gcc 6.1.1 and boost 1.60.0 Does not build with gcc 6.1.1 or gcc 5.3.0 Jun 2, 2016
@AzothAmmo
Copy link
Contributor

Likely a dup of #280, this is related to boost 1.61.

@AzothAmmo AzothAmmo added this to the v1.2.0 milestone Jun 2, 2016
@AzothAmmo AzothAmmo changed the title Does not build with gcc 6.1.1 or gcc 5.3.0 Tests do not compile with boost 1.6X under gcc 6.1.1 or gcc 5.3.0 Jun 3, 2016
@AzothAmmo
Copy link
Contributor

I'm having trouble reproducing this on the develop branch. I think this was fixed by 1d50761 and 68f7508.

Can you checkout develop and let me know if this persists?

@xyproto
Copy link
Author

xyproto commented Jun 10, 2016

The issue is now gone when building the develop branch (gcc 6.1.1).

There are other errors, but they seem to be unrelated to this issue: full output

@AzothAmmo
Copy link
Contributor

Seems to be related to a new warning in GCC6 (-Wterminate, see here), probably worth its own issue.

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

No branches or pull requests

2 participants