libsemigroups / HPCombi

Fast combinatorics in C++ using SSE/AVX instruction sets
https://libsemigroups.github.io/HPCombi/
GNU General Public License v3.0
15 stars 7 forks source link

compilation error with gcc-13, boost 1.82.0 #14

Closed dimpase closed 1 year ago

dimpase commented 1 year ago

running make after cmake -DCMAKE_INSTALL_PREFIX=/tmp/hpco -DBUILD_TESTING=1 .. leads to the following error. Compiler: gcc version 13.1.1 20230527 (Gentoo 13.1.1_p20230527 p3), benchmark version 1.8.2, boost version 1.82.0.

...
[ 76%] Building CXX object tests/CMakeFiles/test_bmat8.dir/test_bmat8.cpp.o
In file included from /usr/include/boost/config/header_deprecated.hpp:18,
                 from /usr/include/boost/test/test_case_template.hpp:13,
                 from /mnt/opt/HPCombi/tests/test_perm_all.cpp:23:
/usr/include/boost/test/test_case_template.hpp:14:1: note: ‘#pragma message: This header is deprecated. Use <boost/test/unit_test.hpp> instead.’
   14 | BOOST_HEADER_DEPRECATED( "<boost/test/unit_test.hpp>" )
      | ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/boost/test/tools/collection_comparison_op.hpp:18,
                 from /usr/include/boost/test/test_tools.hpp:55,
                 from /usr/include/boost/test/unit_test.hpp:18,
                 from /mnt/opt/HPCombi/tests/test_perm16.cpp:19:
/usr/include/boost/test/utils/is_forward_iterable.hpp: In instantiation of ‘struct boost::unit_test::bt_iterator_traits<HPCombi::PTransf16, true>’:
/usr/include/boost/test/tools/collection_comparison_op.hpp:446:1:   required from ‘struct boost::test_tools::assertion::op::EQ<HPCombi::PTransf16, HPCombi::PTransf16, void>’
/usr/include/boost/test/tools/assertion.hpp:340:7:   required from ‘class boost::test_tools::assertion::binary_expr<boost::test_tools::assertion::value_expr<HPCombi::PTransf16>, HPCombi::PTransf16, boost::test_tools::assertion::op::EQ<HPCombi::PTransf16, HPCombi::PTransf16, void> >’
/mnt/opt/HPCombi/tests/test_perm16.cpp:107:5:   required from here
/usr/include/boost/test/utils/is_forward_iterable.hpp:214:25: error: passing ‘const HPCombi::PTransf16’ as ‘this’ argument discards qualifiers [-fpermissive]
  211 |     typedef decltype(boost::declval<
      |                      ~~~~~~~~~~~~~~~
  212 |         typename boost::add_const<
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~
  213 |           typename boost::remove_reference<T>::type
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  214 |         >::type>().begin()) const_iterator;
      |         ~~~~~~~~~~~~~~~~^~
...

(and many more similar errors error: passing ‘const HPCombi::PTransf16’ as ‘this’ argument discards qualifiers)

dimpase commented 1 year ago

same error with gcc-12

hivert commented 1 year ago

This one should be fixed by the last merge. Can you confirm ?

dimpase commented 1 year ago

What branch should I test?

hivert commented 1 year ago

The master branch. Sorry I should have mentioned, my guess is that this issue is a duplicate of https://github.com/hivert/HPCombi/issues/12 whose I just merged the fix.

dimpase commented 1 year ago

yes, it's good now.