Description of problem: Package krita fails to build from source in Fedora rawhide. Version-Release number of selected component (if applicable): 4.4.1-2.fc34 Steps to Reproduce: koji build --scratch f34 krita-4.4.1-2.fc34.src.rpm Additional info: This package is tracked by Koschei. See: https://koschei.fedoraproject.org/package/krita
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34.
Dear Maintainer, your package has an open Fails To Build From Source bug for Fedora 34. Action is required from you. If you can fix your package to build, perform a build in koji, and either create an update in bodhi, or close this bug without creating an update, if updating is not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to acknowledge this. If you have already fixed this issue, please close this Bugzilla report. Following the policy for such packages [2], your package will be orphaned if this bug remains in NEW state more than 8 weeks (not sooner than 2021-03-22). A week before the mass branching of Fedora 35 according to the schedule [3], any packages not successfully rebuilt at least on Fedora 33 will be retired regardless of the status of this bug. [1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/ [2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/ [3] https://fedorapeople.org/groups/schedule/f-35/f-35-key-tasks.html
We need someone who understands c++ constexpr template magic: In file included from /builddir/build/BUILD/krita-4.4.2/libs/global/kis_dom_utils.h:35, from /builddir/build/BUILD/krita-4.4.2/libs/image/KisBezierTransformMesh.cpp:138: /builddir/build/BUILD/krita-4.4.2/libs/global/krita_container_utils.h: In instantiation of 'static constexpr bool KritaUtils::is_appenda ble_container<T>::test(A*) [with A = boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode>; T = boost::operator s_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode>]': /builddir/build/BUILD/krita-4.4.2/libs/global/krita_container_utils.h:114:46: required from 'const bool KritaUtils::is_appendable_cont ainer<boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode> >::value' /builddir/build/BUILD/krita-4.4.2/libs/global/kis_dom_utils.h:276:1: required by substitution of 'template<template<class ...> class C ontainer, class T, class E, class ... Args> typename std::enable_if<KritaUtils::is_appendable_container<Container<T, Args ...> >::value, bool>::type KisDomUtils::loadValue(const QDomElement&, Container<T, Args ...>*, const E&) [with Container = boost::operators_impl::equa lity_comparable; T = KisBezierMeshDetails::BaseMeshNode; E = std::tuple<>; Args = {KisBezierMeshDetails::BaseMeshNode, boost::operators_ impl::operators_detail::empty_base<KisBezierMeshDetails::BaseMeshNode>, boost::operators_impl::operators_detail::false_t}]' /builddir/build/BUILD/krita-4.4.2/libs/global/kis_dom_utils.h:283:23: required from 'typename std::enable_if<KritaUtils::is_appendable _container<Container<T, Args ...> >::value, bool>::type KisDomUtils::loadValue(const QDomElement&, Container<T, Args ...>*, const E&) [w ith Container = std::vector; T = KisBezierMeshDetails::BaseMeshNode; E = std::tuple<>; Args = {std::allocator<KisBezierMeshDetails::Base MeshNode>}; typename std::enable_if<KritaUtils::is_appendable_container<Container<T, Args ...> >::value, bool>::type = bool]' /builddir/build/BUILD/krita-4.4.2/libs/global/kis_dom_utils.h:312:21: required from 'bool KisDomUtils::loadValue(const QDomElement&, c onst QString&, T*, const E&) [with T = std::vector<KisBezierMeshDetails::BaseMeshNode, std::allocator<KisBezierMeshDetails::BaseMeshNode > >; E = std::tuple<>]' /builddir/build/BUILD/krita-4.4.2/libs/image/KisBezierTransformMesh.cpp:167:54: required from here /builddir/build/BUILD/krita-4.4.2/libs/global/krita_container_utils.h:105:48: error: 'struct boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode>' has no member named 'push_back' 105 | std::is_same<decltype(pointer->push_back(std::declval<typename T::value_type>())), void>::value ; | ~~~~~~~~~^~~~~~~~~ /builddir/build/BUILD/krita-4.4.2/libs/global/krita_container_utils.h:105:63: error: no type named 'value_type' in 'struct boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode>' 105 | std::is_same<decltype(pointer->push_back(std::declval<typename T::value_type>())), void>::value ; | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/krita-4.4.2/libs/global/krita_container_utils.h: In instantiation of 'const bool KritaUtils::is_appendable_container<boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode> >::value': /builddir/build/BUILD/krita-4.4.2/libs/global/kis_dom_utils.h:276:1: required by substitution of 'template<template<class ...> class Container, class T, class E, class ... Args> typename std::enable_if<KritaUtils::is_appendable_container<Container<T, Args ...> >::value, bool>::type KisDomUtils::loadValue(const QDomElement&, Container<T, Args ...>*, const E&) [with Container = boost::operators_impl::equality_comparable; T = KisBezierMeshDetails::BaseMeshNode; E = std::tuple<>; Args = {KisBezierMeshDetails::BaseMeshNode, boost::operators_impl::operators_detail::empty_base<KisBezierMeshDetails::BaseMeshNode>, boost::operators_impl::operators_detail::false_t}]' /builddir/build/BUILD/krita-4.4.2/libs/global/kis_dom_utils.h:283:23: required from 'typename std::enable_if<KritaUtils::is_appendable_container<Container<T, Args ...> >::value, bool>::type KisDomUtils::loadValue(const QDomElement&, Container<T, Args ...>*, const E&) [with Container = std::vector; T = KisBezierMeshDetails::BaseMeshNode; E = std::tuple<>; Args = {std::allocator<KisBezierMeshDetails::BaseMeshNode>}; typename std::enable_if<KritaUtils::is_appendable_container<Container<T, Args ...> >::value, bool>::type = bool]' /builddir/build/BUILD/krita-4.4.2/libs/global/kis_dom_utils.h:312:21: required from 'bool KisDomUtils::loadValue(const QDomElement&, const QString&, T*, const E&) [with T = std::vector<KisBezierMeshDetails::BaseMeshNode, std::allocator<KisBezierMeshDetails::BaseMeshNode> >; E = std::tuple<>]' /builddir/build/BUILD/krita-4.4.2/libs/image/KisBezierTransformMesh.cpp:167:54: required from here /builddir/build/BUILD/krita-4.4.2/libs/global/krita_container_utils.h:114:46: in 'constexpr' expansion of 'KritaUtils::is_appendable_container<boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode> >::test<boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode> >(0)' /builddir/build/BUILD/krita-4.4.2/libs/global/krita_container_utils.h:114:23: error: 'constexpr' call flows off the end of the function 114 | static const bool value = test<test_type>(nullptr); | ^~~~~ gmake[2]: *** [libs/image/CMakeFiles/kritaimage.dir/build.make:3790: libs/image/CMakeFiles/kritaimage.dir/KisBezierTransformMesh.cpp.o] Error 1 I looked upstream, but I don't see any obvious fixes for this.
Reported upstream, https://bugs.kde.org/show_bug.cgi?id=434150
KDE upstream thinks this may be a gcc regression? "This looks a bit like an old gcc bug has returned: https://gcc.gnu.org/legacy-ml/gcc-patches/2018-01/msg01866.html"
Can anyone provide a preprocessed source file for the constexpr failure?
It simply looks like invalid code to me: template<typename T> struct is_appendable_container { typedef typename std::remove_const<T>::type test_type; template<typename A> static constexpr bool test(A *pointer) { return is_container<A>::value && std::is_same<decltype(pointer->push_back(std::declval<typename T::value_type>())), void>::value ; } template<typename A> static constexpr bool test(...) { return false; } static const bool value = test<test_type>(nullptr); }; Inside the function test(A*) if the syntax pointer->push_back is not valid for the type, you get an error. The function needs to be constrained (e.g. using SFINAE tricks like enable_if) because otherwise you get hard errors for types that aren't appendable containers. The test(...) overload will never be selected, because test<test_type>(A*) is always a viable candidate for an argument of type nullptr. Reduced: #include <type_traits> template<typename T> struct is_container { static const bool value = false; }; template<typename T> struct is_appendable_container { typedef typename std::remove_const<T>::type test_type; template<typename A> static constexpr bool test(A *pointer) { return is_container<A>::value && std::is_same<decltype(pointer->push_back(std::declval<typename T::value_type>())), void>::value ; } template<typename A> static constexpr bool test(...) { return false; } static const bool value = test<test_type>(nullptr); }; struct X { }; bool b = is_appendable_container<X>::value;
(In reply to Rex Dieter from comment #7) > KDE upstream thinks this may be a gcc regression? > > "This looks a bit like an old gcc bug has returned: > https://gcc.gnu.org/legacy-ml/gcc-patches/2018-01/msg01866.html" Looks like somebody googled for "constexpr call flows off the end" and assumed that any bug mentioning it must be related. It's not.
Fixed upstream: https://invent.kde.org/graphics/krita/commit/10f61f0733a728dfa49dd2c3c70deb64be9cc7a4
FEDORA-2021-e16275eb16 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-e16275eb16
FEDORA-2021-e16275eb16 has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-e16275eb16` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-e16275eb16 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-e16275eb16 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.