Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1919987 - krita: FTBFS in Fedora rawhide
Summary: krita: FTBFS in Fedora rawhide
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: krita
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On:
Blocks: F34FTBFS PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2021-01-25 14:11 UTC by Tomáš Hrnčiar
Modified: 2021-03-19 20:12 UTC (History)
13 users (show)

Fixed In Version: krita-4.4.3-0.1.beta1.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-19 20:12:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
KDE Software Compilation 434150 0 NOR UNCONFIRMED KisBezierTransformMesh.cpp : FTBFS (gcc11 issue?) 2021-03-08 17:33:30 UTC

Description Tomáš Hrnčiar 2021-01-25 14:11:38 UTC
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

Comment 1 Ben Cotton 2021-02-09 15:42:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 2 Fedora Release Engineering 2021-02-14 04:22:37 UTC
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

Comment 3 Fedora Release Engineering 2021-02-14 04:22:38 UTC
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

Comment 4 Zbigniew Jędrzejewski-Szmek 2021-02-17 20:13:38 UTC
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.

Comment 5 Fedora Release Engineering 2021-03-07 04:22:24 UTC
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

Comment 6 Rex Dieter 2021-03-08 17:33:32 UTC
Reported upstream,
https://bugs.kde.org/show_bug.cgi?id=434150

Comment 7 Rex Dieter 2021-03-08 19:02:35 UTC
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"

Comment 8 Marek Polacek 2021-03-08 19:46:09 UTC
Can anyone provide a preprocessed source file for the constexpr failure?

Comment 9 Jonathan Wakely 2021-03-09 17:28:45 UTC
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;

Comment 10 Jonathan Wakely 2021-03-09 17:30:39 UTC
(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.

Comment 12 Fedora Update System 2021-03-11 17:07:39 UTC
FEDORA-2021-e16275eb16 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-e16275eb16

Comment 13 Fedora Update System 2021-03-12 18:55:36 UTC
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.

Comment 14 Fedora Update System 2021-03-19 20:12:18 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.