ukoethe / vigra

a generic C++ library for image analysis
http://ukoethe.github.io/vigra/
Other
407 stars 191 forks source link

Build failure in tests suite #504

Closed ArchangeGabriel closed 5 days ago

ArchangeGabriel commented 2 years ago

In addition to #491, I’m seeing new failures on latest master:

[ 40%] Building CXX object test/classifier/CMakeFiles/test_classifier.dir/test.cxx.o
In file included from /usr/include/c++/11.2.0/algorithm:62,
                 from /build/vigra/src/vigra/include/vigra/random_forest.hxx:41,
                 from /build/vigra/src/vigra/test/classifier/test.cxx:47:
/usr/include/c++/11.2.0/bits/stl_algo.h: In instantiation of ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = double*; _OIter = double*; _UnaryOperation = std::_Bind<std::divides<double>(double, std::_Placeholder<2>)>]’:
/build/vigra/src/vigra/test/classifier/test.cxx:535:27:   required from here
/usr/include/c++/11.2.0/bits/stl_algo.h:4296:31: error: no match for call to ‘(std::_Bind<std::divides<double>(double, std::_Placeholder<2>)>) (double&)’
 4296 |         *__result = __unary_op(*__first);
      |                     ~~~~~~~~~~^~~~~~~~~~
In file included from /build/vigra/src/vigra/test/classifier/test.cxx:45:
/usr/include/c++/11.2.0/functional:501:9: note: candidate: ‘template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) [with _Args = {_Args ...}; _Result = _Result; _Functor = std::divides<double>; _Bound_args = {double, std::_Placeholder<2>}]’
  501 |         operator()(_Args&&... __args)
      |         ^~~~~~~~
/usr/include/c++/11.2.0/functional:501:9: note:   template argument deduction/substitution failed:
/usr/include/c++/11.2.0/functional: In substitution of ‘template<class _Functor, class ... _Bound_args> template<class _Fn, class _CallArgs, class ... _BArgs> using _Res_type_impl = typename std::result_of<_Fn&(decltype (std::_Mu<typename std::remove_cv<_BArgs>::type, std::is_bind_expression<typename std::remove_cv<_BArgs>::type>::value, (std::is_placeholder<typename std::remove_cv<_BArgs>::type>::value > 0)>()(declval<_BArgs&>(), declval<_CallArgs&>()))&& ...)>::type [with _Fn = std::divides<double>; _CallArgs = std::tuple<double&>; _BArgs = {double, std::_Placeholder<2>}; _Functor = std::divides<double>; _Bound_args = {double, std::_Placeholder<2>}]’:
/usr/include/c++/11.2.0/functional:468:8:   required by substitution of ‘template<class _Functor, class ... _Bound_args> template<class _CallArgs> using _Res_type = std::_Bind<_Functor(_Bound_args ...)>::_Res_type_impl<_Functor, _CallArgs, _Bound_args ...> [with _CallArgs = std::tuple<double&>; _Functor = std::divides<double>; _Bound_args = {double, std::_Placeholder<2>}]’
/usr/include/c++/11.2.0/functional:498:9:   required from ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = double*; _OIter = double*; _UnaryOperation = std::_Bind<std::divides<double>(double, std::_Placeholder<2>)>]’
/build/vigra/src/vigra/test/classifier/test.cxx:535:27:   required from here
/usr/include/c++/11.2.0/functional:460:13: error: no match for call to ‘(std::_Mu<std::_Placeholder<2>, false, true>) (std::_Placeholder<2>&, std::tuple<double&>&)’
  460 |             _Mu<typename remove_cv<_BoundArg>::type>()(
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11.2.0/functional:363:9: note: candidate: ‘template<class _Tuple> std::_Safe_tuple_element_t<(std::is_placeholder<_Tp>::value - 1), _Tuple>&& std::_Mu<_Arg, false, true>::operator()(const volatile _Arg&, _Tuple&) const volatile [with _Tuple = _Tuple; _Arg = std::_Placeholder<2>]’
  363 |         operator()(const volatile _Arg&, _Tuple& __tuple) const volatile
      |         ^~~~~~~~
/usr/include/c++/11.2.0/functional:363:9: note:   template argument deduction/substitution failed:
/usr/include/c++/11.2.0/functional: In substitution of ‘template<long unsigned int __i, class _Tuple> using _Safe_tuple_element_t = typename std::enable_if<(__i < std::tuple_size<_Tuple>::value), std::tuple_element<__i, _Tuple> >::type::type [with long unsigned int __i = 1; _Tuple = std::tuple<double&>]’:
/usr/include/c++/11.2.0/functional:363:2:   required by substitution of ‘template<class _Tuple> std::_Safe_tuple_element_t<1, _Tuple>&& std::_Mu<std::_Placeholder<2>, false, true>::operator()<_Tuple>(const volatile std::_Placeholder<2>&, _Tuple&) const volatile [with _Tuple = std::tuple<double&>]’
/usr/include/c++/11.2.0/functional:460:6:   required by substitution of ‘template<class _Functor, class ... _Bound_args> template<class _Fn, class _CallArgs, class ... _BArgs> using _Res_type_impl = typename std::result_of<_Fn&(decltype (std::_Mu<typename std::remove_cv<_BArgs>::type, std::is_bind_expression<typename std::remove_cv<_BArgs>::type>::value, (std::is_placeholder<typename std::remove_cv<_BArgs>::type>::value > 0)>()(declval<_BArgs&>(), declval<_CallArgs&>()))&& ...)>::type [with _Fn = std::divides<double>; _CallArgs = std::tuple<double&>; _BArgs = {double, std::_Placeholder<2>}; _Functor = std::divides<double>; _Bound_args = {double, std::_Placeholder<2>}]’
/usr/include/c++/11.2.0/functional:468:8:   required by substitution of ‘template<class _Functor, class ... _Bound_args> template<class _CallArgs> using _Res_type = std::_Bind<_Functor(_Bound_args ...)>::_Res_type_impl<_Functor, _CallArgs, _Bound_args ...> [with _CallArgs = std::tuple<double&>; _Functor = std::divides<double>; _Bound_args = {double, std::_Placeholder<2>}]’
/usr/include/c++/11.2.0/functional:498:9:   required from ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = double*; _OIter = double*; _UnaryOperation = std::_Bind<std::divides<double>(double, std::_Placeholder<2>)>]’
/build/vigra/src/vigra/test/classifier/test.cxx:535:27:   required from here
/usr/include/c++/11.2.0/functional:274:11: error: no type named ‘type’ in ‘struct std::enable_if<false, std::tuple_element<1, std::tuple<double&> > >’
  274 |     using _Safe_tuple_element_t
      |           ^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11.2.0/bits/stl_algo.h: In instantiation of ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = double*; _OIter = double*; _UnaryOperation = std::_Bind<std::divides<double>(double, std::_Placeholder<2>)>]’:
/build/vigra/src/vigra/test/classifier/test.cxx:535:27:   required from here
/usr/include/c++/11.2.0/functional:513:9: note: candidate: ‘template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const [with _Args = {_Args ...}; _Result = _Result; _Functor = std::divides<double>; _Bound_args = {double, std::_Placeholder<2>}]’
  513 |         operator()(_Args&&... __args) const
      |         ^~~~~~~~
/usr/include/c++/11.2.0/functional:513:9: note:   template argument deduction/substitution failed:
/usr/include/c++/11.2.0/functional: In substitution of ‘template<class _Functor, class ... _Bound_args> template<class _Fn, class _CallArgs, class ... _BArgs> using _Res_type_impl = typename std::result_of<_Fn&(decltype (std::_Mu<typename std::remove_cv<_BArgs>::type, std::is_bind_expression<typename std::remove_cv<_BArgs>::type>::value, (std::is_placeholder<typename std::remove_cv<_BArgs>::type>::value > 0)>()(declval<_BArgs&>(), declval<_CallArgs&>()))&& ...)>::type [with _Fn = const std::divides<double>; _CallArgs = std::tuple<double&>; _BArgs = {const double, const std::_Placeholder<2>}; _Functor = std::divides<double>; _Bound_args = {double, std::_Placeholder<2>}]’:
/usr/include/c++/11.2.0/functional:475:8:   required by substitution of ‘template<class _Functor, class ... _Bound_args> template<class _CallArgs, template<class _CallArgs, template<class> class __cv_quals> template<class _Functor, class ... _Bound_args> template<class> class __cv_quals> using _Res_type_cv = std::_Bind<_Functor(_Bound_args ...)>::_Res_type_impl<typename __cv_quals<typename std::enable_if<(bool)((std::tuple_size<_Tuple>::value + 1)), _Functor>::type>::type, _CallArgs, typename __cv_quals<_Bound_args>::type ...> [with _CallArgs = std::tuple<double&>; __cv_quals = std::add_const; _Functor = std::divides<double>; _Bound_args = {double, std::_Placeholder<2>}]’
/usr/include/c++/11.2.0/functional:510:9:   required from ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = double*; _OIter = double*; _UnaryOperation = std::_Bind<std::divides<double>(double, std::_Placeholder<2>)>]’
/build/vigra/src/vigra/test/classifier/test.cxx:535:27:   required from here
/usr/include/c++/11.2.0/functional:460:13: error: no match for call to ‘(std::_Mu<std::_Placeholder<2>, false, true>) (const std::_Placeholder<2>&, std::tuple<double&>&)’
  460 |             _Mu<typename remove_cv<_BoundArg>::type>()(
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11.2.0/functional:363:9: note: candidate: ‘template<class _Tuple> std::_Safe_tuple_element_t<(std::is_placeholder<_Tp>::value - 1), _Tuple>&& std::_Mu<_Arg, false, true>::operator()(const volatile _Arg&, _Tuple&) const volatile [with _Tuple = _Tuple; _Arg = std::_Placeholder<2>]’
  363 |         operator()(const volatile _Arg&, _Tuple& __tuple) const volatile
      |         ^~~~~~~~
/usr/include/c++/11.2.0/functional:363:9: note:   template argument deduction/substitution failed:
/usr/include/c++/11.2.0/bits/stl_algo.h: In instantiation of ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = double*; _OIter = double*; _UnaryOperation = std::_Bind<std::divides<double>(double, std::_Placeholder<2>)>]’:
/build/vigra/src/vigra/test/classifier/test.cxx:535:27:   required from here
/usr/include/c++/11.2.0/functional:531:9: note: candidate: ‘template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = std::divides<double>; _Bound_args = {double, std::_Placeholder<2>}]’
  531 |         operator()(_Args&&... __args) volatile
      |         ^~~~~~~~
/usr/include/c++/11.2.0/functional:531:9: note:   template argument deduction/substitution failed:
/usr/include/c++/11.2.0/functional: In substitution of ‘template<class _Functor, class ... _Bound_args> template<class _Fn, class _CallArgs, class ... _BArgs> using _Res_type_impl = typename std::result_of<_Fn&(decltype (std::_Mu<typename std::remove_cv<_BArgs>::type, std::is_bind_expression<typename std::remove_cv<_BArgs>::type>::value, (std::is_placeholder<typename std::remove_cv<_BArgs>::type>::value > 0)>()(declval<_BArgs&>(), declval<_CallArgs&>()))&& ...)>::type [with _Fn = volatile std::divides<double>; _CallArgs = std::tuple<double&>; _BArgs = {volatile double, volatile std::_Placeholder<2>}; _Functor = std::divides<double>; _Bound_args = {double, std::_Placeholder<2>}]’:
/usr/include/c++/11.2.0/functional:475:8:   required by substitution of ‘template<class _Functor, class ... _Bound_args> template<class _CallArgs, template<class _CallArgs, template<class> class __cv_quals> template<class _Functor, class ... _Bound_args> template<class> class __cv_quals> using _Res_type_cv = std::_Bind<_Functor(_Bound_args ...)>::_Res_type_impl<typename __cv_quals<typename std::enable_if<(bool)((std::tuple_size<_Tuple>::value + 1)), _Functor>::type>::type, _CallArgs, typename __cv_quals<_Bound_args>::type ...> [with _CallArgs = std::tuple<double&>; __cv_quals = std::add_volatile; _Functor = std::divides<double>; _Bound_args = {double, std::_Placeholder<2>}]’
/usr/include/c++/11.2.0/functional:528:9:   required from ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = double*; _OIter = double*; _UnaryOperation = std::_Bind<std::divides<double>(double, std::_Placeholder<2>)>]’
/build/vigra/src/vigra/test/classifier/test.cxx:535:27:   required from here
/usr/include/c++/11.2.0/functional:460:13: error: no match for call to ‘(std::_Mu<std::_Placeholder<2>, false, true>) (volatile std::_Placeholder<2>&, std::tuple<double&>&)’
  460 |             _Mu<typename remove_cv<_BoundArg>::type>()(
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11.2.0/functional:363:9: note: candidate: ‘template<class _Tuple> std::_Safe_tuple_element_t<(std::is_placeholder<_Tp>::value - 1), _Tuple>&& std::_Mu<_Arg, false, true>::operator()(const volatile _Arg&, _Tuple&) const volatile [with _Tuple = _Tuple; _Arg = std::_Placeholder<2>]’
  363 |         operator()(const volatile _Arg&, _Tuple& __tuple) const volatile
      |         ^~~~~~~~
/usr/include/c++/11.2.0/functional:363:9: note:   template argument deduction/substitution failed:
/usr/include/c++/11.2.0/bits/stl_algo.h: In instantiation of ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = double*; _OIter = double*; _UnaryOperation = std::_Bind<std::divides<double>(double, std::_Placeholder<2>)>]’:
/build/vigra/src/vigra/test/classifier/test.cxx:535:27:   required from here
/usr/include/c++/11.2.0/functional:543:9: note: candidate: ‘template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = std::divides<double>; _Bound_args = {double, std::_Placeholder<2>}]’
  543 |         operator()(_Args&&... __args) const volatile
      |         ^~~~~~~~
/usr/include/c++/11.2.0/functional:543:9: note:   template argument deduction/substitution failed:
/usr/include/c++/11.2.0/functional: In substitution of ‘template<class _Functor, class ... _Bound_args> template<class _Fn, class _CallArgs, class ... _BArgs> using _Res_type_impl = typename std::result_of<_Fn&(decltype (std::_Mu<typename std::remove_cv<_BArgs>::type, std::is_bind_expression<typename std::remove_cv<_BArgs>::type>::value, (std::is_placeholder<typename std::remove_cv<_BArgs>::type>::value > 0)>()(declval<_BArgs&>(), declval<_CallArgs&>()))&& ...)>::type [with _Fn = const volatile std::divides<double>; _CallArgs = std::tuple<double&>; _BArgs = {const volatile double, const volatile std::_Placeholder<2>}; _Functor = std::divides<double>; _Bound_args = {double, std::_Placeholder<2>}]’:
/usr/include/c++/11.2.0/functional:475:8:   required by substitution of ‘template<class _Functor, class ... _Bound_args> template<class _CallArgs, template<class _CallArgs, template<class> class __cv_quals> template<class _Functor, class ... _Bound_args> template<class> class __cv_quals> using _Res_type_cv = std::_Bind<_Functor(_Bound_args ...)>::_Res_type_impl<typename __cv_quals<typename std::enable_if<(bool)((std::tuple_size<_Tuple>::value + 1)), _Functor>::type>::type, _CallArgs, typename __cv_quals<_Bound_args>::type ...> [with _CallArgs = std::tuple<double&>; __cv_quals = std::add_cv; _Functor = std::divides<double>; _Bound_args = {double, std::_Placeholder<2>}]’
/usr/include/c++/11.2.0/functional:540:9:   required from ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = double*; _OIter = double*; _UnaryOperation = std::_Bind<std::divides<double>(double, std::_Placeholder<2>)>]’
/build/vigra/src/vigra/test/classifier/test.cxx:535:27:   required from here
/usr/include/c++/11.2.0/functional:460:13: error: no match for call to ‘(std::_Mu<std::_Placeholder<2>, false, true>) (const volatile std::_Placeholder<2>&, std::tuple<double&>&)’
  460 |             _Mu<typename remove_cv<_BoundArg>::type>()(
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11.2.0/functional:363:9: note: candidate: ‘template<class _Tuple> std::_Safe_tuple_element_t<(std::is_placeholder<_Tp>::value - 1), _Tuple>&& std::_Mu<_Arg, false, true>::operator()(const volatile _Arg&, _Tuple&) const volatile [with _Tuple = _Tuple; _Arg = std::_Placeholder<2>]’
  363 |         operator()(const volatile _Arg&, _Tuple& __tuple) const volatile
      |         ^~~~~~~~
/usr/include/c++/11.2.0/functional:363:9: note:   template argument deduction/substitution failed:

As it seems related to #500, I tried reverting this PR and it indeed works, so they might have been some oversight there. Also pinging @constantinpape thus.

EDIT: Removed the failure when reverting #500, I had something mixed apparently (I realized I did not get deprecation warnings about binder1st and binder2nd), because running it again that worked (and I did get deprecation warnings).

hmaarrfk commented 1 year ago

So i can recreate now that i'm restarting bulidin the CIs. did you ever find a true solution for this?

hmaarrfk commented 5 days ago

i think i somewhat patched these things in the master branch.

Please reopen if thats not the case.