Bug 2172252

Summary: Application which depends on capnproto fails to build with gcc 13
Product: [Fedora] Fedora Reporter: Pavel Odintsov <pavel.odintsov>
Component: capnprotoAssignee: Neal Gompa <ngompa13>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 38CC: mtasaka, ngompa13
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: capnproto-0.10.3-3.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-17 13:06:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2171458    
Bug Blocks: 2171487    
Attachments:
Description Flags
Proposed patch from upstream none

Description Pavel Odintsov 2023-02-21 18:08:42 UTC
Created attachment 1945583 [details]
Proposed patch from upstream

Description of problem:

Our package fastnetmon depends on capnproto package and we cannot build it due to following issues: https://bugzilla.redhat.com/show_bug.cgi?id=2171487

I can confirm that this issue is covered in upstream: https://github.com/capnproto/capnproto/issues/1622

Version-Release number of selected component (if applicable):

capnproto-0.10.3-1.fc38.x86_64

How reproducible:

Try to build any app which depends on canproto with gcc 13.

Actual results:

In file included from /usr/include/capnp/layout.h:34,
                 from /usr/include/capnp/generated-header-support.h:27,
                 from /home/odintsov/rpmbuild/BUILD/fastnetmon-master/src/simple_packet_capnp/simple_packet.capnp.h:6,
                 from /home/odintsov/rpmbuild/BUILD/fastnetmon-master/src/simple_packet_capnp/simple_packet.capnp.c++:4:
/usr/include/capnp/blob.h: In function 'bool capnp::operator==(const char*, const Text::Builder&)':
/usr/include/capnp/blob.h:176:74: error: no match for 'operator==' (operand types are 'const char*' and 'kj::StringPtr')
  176 | inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
      |                                                                        ~ ^~ ~~~~~~~~~~~~
      |                                                                        |              |
      |                                                                        const char*    kj::StringPtr
In file included from /usr/include/kj/memory.h:24,
                 from /usr/include/kj/array.h:24,
                 from /usr/include/kj/string.h:25,
                 from /usr/include/capnp/common.h:29,
                 from /usr/include/capnp/raw-schema.h:24,
                 from /usr/include/capnp/generated-header-support.h:26:
/usr/include/kj/common.h:756:13: note: candidate: 'template<class T> bool kj::operator==(T, MaxValue_)' (reversed)
  756 | inline bool operator==(T t, MaxValue_) { return t == Decay<T>(maxValue); }
      |             ^~~~~~~~
/usr/include/kj/common.h:756:13: note:   template argument deduction/substitution failed:
/usr/include/capnp/blob.h:176:72: note:   cannot convert 'a' (type 'const char*') to type 'kj::MaxValue_'
  176 | inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
      |                                                                        ^
/usr/include/kj/common.h:758:13: note: candidate: 'template<class T> bool kj::operator==(T, MinValue_)' (reversed)
  758 | inline bool operator==(T t, MinValue_) { return t == Decay<T>(minValue); }
      |             ^~~~~~~~
/usr/include/kj/common.h:758:13: note:   template argument deduction/substitution failed:
/usr/include/capnp/blob.h:176:72: note:   cannot convert 'a' (type 'const char*') to type 'kj::MinValue_'
  176 | inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
      |                                                                        ^
/usr/include/capnp/blob.h:176:13: note: candidate: 'bool capnp::operator==(const char*, const Text::Builder&)' (reversed)
  176 | inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
      |             ^~~~~~~~
/usr/include/capnp/blob.h:176:36: note:   no known conversion for argument 1 from 'kj::StringPtr' to 'const char*'
  176 | inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
      |                        ~~~~~~~~~~~~^
/usr/include/capnp/blob.h: In function 'bool capnp::operator!=(const char*, const Text::Builder&)':
/usr/include/capnp/blob.h:177:74: error: no match for 'operator!=' (operand types are 'const char*' and 'kj::StringPtr')
  177 | inline bool operator!=(const char* a, const Text::Builder& b) { return a != b.asString(); }
      |                                                                        ~ ^~ ~~~~~~~~~~~~
      |                                                                        |              |
      |                                                                        const char*    kj::StringPtr
/usr/include/kj/common.h:756:13: note: candidate: 'template<class T> bool kj::operator==(T, MaxValue_)' (reversed)
  756 | inline bool operator==(T t, MaxValue_) { return t == Decay<T>(maxValue); }
      |             ^~~~~~~~
/usr/include/kj/common.h:756:13: note:   template argument deduction/substitution failed:
/usr/include/capnp/blob.h:177:72: note:   cannot convert 'a' (type 'const char*') to type 'kj::MaxValue_'
  177 | inline bool operator!=(const char* a, const Text::Builder& b) { return a != b.asString(); }
      |                                                                        ^
/usr/include/kj/common.h:758:13: note: candidate: 'template<class T> bool kj::operator==(T, MinValue_)' (reversed)
  758 | inline bool operator==(T t, MinValue_) { return t == Decay<T>(minValue); }
      |             ^~~~~~~~
/usr/include/kj/common.h:758:13: note:   template argument deduction/substitution failed:
/usr/include/capnp/blob.h:177:72: note:   cannot convert 'a' (type 'const char*') to type 'kj::MinValue_'
  177 | inline bool operator!=(const char* a, const Text::Builder& b) { return a != b.asString(); }
      |                                                                        ^
/usr/include/capnp/blob.h:176:13: note: candidate: 'bool capnp::operator==(const char*, const Text::Builder&)' (reversed)
  176 | inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
      |             ^~~~~~~~
/usr/include/capnp/blob.h:176:36: note:   no known conversion for argument 1 from 'kj::StringPtr' to 'const char*'
  176 | inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
      |                        ~~~~~~~~~~~~^
/usr/include/capnp/blob.h:177:13: note: candidate: 'bool capnp::operator!=(const char*, const Text::Builder&)'
  177 | inline bool operator!=(const char* a, const Text::Builder& b) { return a != b.asString(); }
      |             ^~~~~~~~
/usr/include/capnp/blob.h:177:60: note:   no known conversion for argument 2 from 'kj::StringPtr' to 'const capnp::Text::Builder&'
  177 | inline bool operator!=(const char* a, const Text::Builder& b) { return a != b.asString(); }
      |                                       ~~~~~~~~~~~~~~~~~~~~~^


Expected results:

Successful build

Additional info:

I attached patch which fixed issue completely. I manually checked it with Fedora 38 and it works just fine.

Comment 1 Mamoru TASAKA 2023-02-28 08:54:54 UTC
Fixing this...

Comment 2 Fedora Update System 2023-02-28 12:07:07 UTC
FEDORA-2023-0a2f5eea88 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-0a2f5eea88

Comment 3 Fedora Update System 2023-03-01 01:50:35 UTC
FEDORA-2023-0a2f5eea88 has been pushed to the Fedora 38 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-0a2f5eea88

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2023-03-11 03:11:45 UTC
FEDORA-2023-0a2f5eea88 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Mamoru TASAKA 2023-03-17 13:07:13 UTC
Fixed.