depends: rapidcheck fails to compile with GCC 9.1 #16062

issue fanquake opened this issue on May 21, 2019
  1. fanquake commented at 9:28 AM on May 21, 2019: member

    When building depends with GCC 9.1 (Fedora 30), rapidcheck fails to build with:

    [  2%] Building CXX object CMakeFiles/rapidcheck.dir/src/gen/Numeric.cpp.o
    In file included from /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.h:52,
                     from /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/gen/Numeric.hpp:3,
                     from /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/gen/Numeric.h:18,
                     from /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/src/gen/Numeric.cpp:1:
    /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.hpp: In instantiation of ‘T rc::detail::BitStream<Source>::next(int, std::false_type) [with T = long int; Source = rc::Random; std::false_type = std::integral_constant<bool, false>]’:
    /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.hpp:30:48:   required from ‘T rc::detail::BitStream<Source>::next(int) [with T = long int; Source = rc::Random]’
    /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.hpp:86:75:   required from ‘T rc::detail::BitStream<Source>::nextWithSize(int) [with T = long int; Source = rc::Random]’
    /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/gen/Numeric.hpp:44:68:   required from ‘rc::Shrinkable<T> rc::gen::detail::real(const rc::Random&, int) [with T = long double]’
    /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/gen/Numeric.hpp:80:48:   required from here
    /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.hpp:63:36: error: comparison of integer expressions of different signedness: ‘SourceType’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
       63 |     if (static_cast<SourceType>(n) < numBits<SourceType>()) {
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
    /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.hpp: In instantiation of ‘T rc::detail::BitStream<Source>::next(int, std::false_type) [with T = long unsigned int; Source = rc::Random; std::false_type = std::integral_constant<bool, false>]’:
    /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.hpp:30:48:   required from ‘T rc::detail::BitStream<Source>::next(int) [with T = long unsigned int; Source = rc::Random]’
    /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.hpp:24:30:   required from ‘T rc::detail::BitStream<Source>::next() [with T = long unsigned int; Source = rc::Random]’
    /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/gen/Numeric.hpp:46:29:   required from ‘rc::Shrinkable<T> rc::gen::detail::real(const rc::Random&, int) [with T = long double]’
    /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/gen/Numeric.hpp:80:48:   required from here
    <... snip a bunch of similar output ...>
    cc1plus: error: unrecognized command line option ‘-Wno-unused-command-line-argument’ [-Werror]
    cc1plus: all warnings being treated as errors
    

    rapidcheck is compiled with Wall:

    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wno-missing-braces -Wno-unused-command-line-argument")
    

    Upstream issue is https://github.com/emil-e/rapidcheck/issues/232.

  2. fanquake added the label Build system on May 21, 2019
  3. fanquake added the label Upstream on May 21, 2019
  4. fanquake cross-referenced this on Jun 23, 2019 from issue build: remove -Wall from rapidcheck build flags by fanquake
  5. pull[bot] referenced this in commit 6e9eda5567 on Jun 30, 2019
  6. MarcoFalke closed this on Jun 30, 2019

  7. sidhujag referenced this in commit afcbf8a541 on Jul 3, 2019
  8. bitcoin locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:54 UTC