Bug 2171487 - fastnetmon: FTBFS in Fedora rawhide/f38
Summary: fastnetmon: FTBFS in Fedora rawhide/f38
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fastnetmon
Version: 39
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pavel Odintsov
QA Contact:
URL:
Whiteboard:
Depends On: 2172252
Blocks: F38FTBFS 2172690
TreeView+ depends on / blocked
 
Reported: 2023-02-20 11:47 UTC by Fedora Release Engineering
Modified: 2023-09-15 18:55 UTC (History)
2 users (show)

Fixed In Version: fastnetmon-1.2.1-11.20220528git420e7b8.fc39
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-15 18:55:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patched string.h (30.89 KB, text/x-csrc)
2023-02-21 17:57 UTC, Pavel Odintsov
no flags Details
Original string.h (30.81 KB, text/x-csrc)
2023-02-21 17:58 UTC, Pavel Odintsov
no flags Details
Proposed patch (852 bytes, patch)
2023-02-21 17:59 UTC, Pavel Odintsov
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github pavel-odintsov fastnetmon issues 965 0 None open capnp fails to compile on Fedora 38 2023-02-20 14:38:42 UTC

Description Fedora Release Engineering 2023-02-20 11:47:42 UTC
fastnetmon failed to build from source in Fedora rawhide/f38

https://koji.fedoraproject.org/koji/taskinfo?taskID=96325721


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Please fix fastnetmon at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
fastnetmon will be orphaned. Before branching of Fedora 39,
fastnetmon will be retired, if it still fails to build.

For more details on the FTBFS policy, please visit:
https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/

Comment 1 Ben Beasley 2023-02-20 14:38:42 UTC
In file included from /usr/include/capnp/layout.h:34,
                 from /usr/include/capnp/generated-header-support.h:27,
                 from /builddir/build/BUILD/fastnetmon-420e7b873253fdc1b52b517d9c28db39bf384427/src/simple_packet_capnp/simple_packet.capnp.h:6,
                 from /builddir/build/BUILD/fastnetmon-420e7b873253fdc1b52b517d9c28db39bf384427/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
/usr/bin/cmake -P CMakeFiles/fastnetmon_pcap_format.dir/cmake_clean_target.cmake
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(); }
      |                                       ~~~~~~~~~~~~~~~~~~~~~^

Comment 2 Ben Beasley 2023-02-20 14:39:36 UTC
This was reported upstream 2023-01-22. There has so far been no response.

https://github.com/pavel-odintsov/fastnetmon/issues/965

Comment 3 Pavel Odintsov 2023-02-21 04:10:54 UTC
Hello!

Thank you for reporting it.

I think this issue is coming from upstream: https://github.com/capnproto/capnproto/issues/1622 it looks extremely similar to what we observe. Compilation fails in capnp's headers and not caused in any way by our own code. 

We can drop capnp support but I think it will be better to fix capnp package.

Comment 4 Pavel Odintsov 2023-02-21 17:57:24 UTC
Hello!

I confirmed that issue it coming from capnproto upstream and put all the details and my findings here: https://github.com/capnproto/capnproto/issues/1622 

It can be easily fixed with this patch for 0.10.3-1:
diff -u string.original string.h 
--- string.original	2023-02-21 17:35:30.424977256 +0000
+++ string.h	2023-02-21 17:38:17.000687845 +0000
@@ -122,10 +122,15 @@
   inline constexpr const char* end() const { return content.end() - 1; }
 
   inline constexpr bool operator==(decltype(nullptr)) const { return content.size() <= 1; }
+#if !__cpp_impl_three_way_comparison
   inline constexpr bool operator!=(decltype(nullptr)) const { return content.size() > 1; }
+#endif
 
   inline bool operator==(const StringPtr& other) const;
+#if !__cpp_impl_three_way_comparison
   inline bool operator!=(const StringPtr& other) const { return !(*this == other); }
+#endif 
+
   inline bool operator< (const StringPtr& other) const;
   inline bool operator> (const StringPtr& other) const { return other < *this; }
   inline bool operator<=(const StringPtr& other) const { return !(other < *this); }

Comment 5 Pavel Odintsov 2023-02-21 17:57:53 UTC
Created attachment 1945580 [details]
Patched string.h

Comment 6 Pavel Odintsov 2023-02-21 17:58:18 UTC
Created attachment 1945581 [details]
Original string.h

Comment 7 Pavel Odintsov 2023-02-21 17:59:22 UTC
Created attachment 1945582 [details]
Proposed patch

Comment 8 Pavel Odintsov 2023-02-21 17:59:50 UTC
I attached original and patches string.h for capproto library and patch itself.

Comment 9 Pavel Odintsov 2023-02-21 18:10:03 UTC
I created follow up bug report for capnproto project and attached patches to it: https://bugzilla.redhat.com/show_bug.cgi?id=2172252

After fix in upstream build of our package will be fixed automatically.

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

Comment 11 Fedora Update System 2023-03-01 01:50:32 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 12 Fedora Update System 2023-03-11 03:11:43 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 13 Fedora Release Engineering 2023-08-16 07:07:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 14 Fedora Update System 2023-09-09 03:29:11 UTC
FEDORA-2023-4543b659d6 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-4543b659d6

Comment 15 Fedora Update System 2023-09-10 16:05:02 UTC
FEDORA-2023-4543b659d6 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-4543b659d6

Comment 16 Fedora Update System 2023-09-15 18:55:14 UTC
FEDORA-2023-4543b659d6 has been pushed to the Fedora 39 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.