Coder Social home page Coder Social logo

Comments (9)

patricklodder avatar patricklodder commented on June 2, 2024 2

Confirmed with iwyu:

bench/bench.h should add these lines:
#include <stdint.h>                              // for uint64_t
#include <boost/function/function_template.hpp>  // for function
#include <limits>                                // for numeric_limits

bench/bench.h should remove these lines:
- #include <boost/function.hpp>  // lines 11-11

I'll make us a cleanup patch on this.

from dogecoin.

kloczek avatar kloczek commented on June 2, 2024 1

boost 1.84.0.

from dogecoin.

kloczek avatar kloczek commented on June 2, 2024 1

Just tested that PR and I was able build and and pass test suite.
Thank you šŸ‘ šŸ˜„

I see some compile time warnings but I'll open for that separated ticket.

from dogecoin.

patricklodder avatar patricklodder commented on June 2, 2024 1

I ran into this same issue on archlinux with their patched boost-1.83.0-5 on 1.15.0-dev and all prior versions including 1.14.6:

build log
332.3   CXX      bench/bench_dogecoin-bench_bitcoin.o
333.8 In file included from bench/bench_bitcoin.cpp:5:
333.8 bench/bench.h: In constructor ā€˜benchmark::State::State(std::string, double)ā€™:
333.8 bench/bench.h:52:28: error: ā€˜numeric_limitsā€™ is not a member of ā€˜stdā€™
333.8    52 |             minTime = std::numeric_limits<double>::max();
333.8       |                            ^~~~~~~~~~~~~~
333.8 bench/bench.h:52:43: error: expected primary-expression before ā€˜doubleā€™
333.8    52 |             minTime = std::numeric_limits<double>::max();
333.8       |                                           ^~~~~~
333.8 bench/bench.h:53:28: error: ā€˜numeric_limitsā€™ is not a member of ā€˜stdā€™
333.8    53 |             maxTime = std::numeric_limits<double>::min();
333.8       |                            ^~~~~~~~~~~~~~
333.8 bench/bench.h:53:43: error: expected primary-expression before ā€˜doubleā€™
333.8    53 |             maxTime = std::numeric_limits<double>::min();
333.8       |                                           ^~~~~~
333.8 bench/bench.h:54:30: error: ā€˜numeric_limitsā€™ is not a member of ā€˜stdā€™
333.8    54 |             minCycles = std::numeric_limits<uint64_t>::max();
333.8       |                              ^~~~~~~~~~~~~~
333.8 bench/bench.h:54:53: error: expected primary-expression before ā€˜>ā€™ token
333.8    54 |             minCycles = std::numeric_limits<uint64_t>::max();
333.8       |                                                     ^
333.8 bench/bench.h:54:56: error: ā€˜::maxā€™ has not been declared; did you mean ā€˜std::maxā€™?
333.8    54 |             minCycles = std::numeric_limits<uint64_t>::max();
333.8       |                                                        ^~~
333.8       |                                                        std::max
333.8 In file included from /usr/include/c++/13.2.1/algorithm:61,
333.8                  from /usr/include/boost/function/detail/prologue.hpp:14,
333.8                  from /usr/include/boost/function.hpp:30,
333.8                  from bench/bench.h:11:
333.8 /usr/include/c++/13.2.1/bits/stl_algo.h:5805:5: note: ā€˜std::maxā€™ declared here
333.8  5805 |     max(initializer_list<_Tp> __l, _Compare __comp)
333.8       |     ^~~
333.8 bench/bench.h:55:30: error: ā€˜numeric_limitsā€™ is not a member of ā€˜stdā€™
333.8    55 |             maxCycles = std::numeric_limits<uint64_t>::min();
333.8       |                              ^~~~~~~~~~~~~~
333.8 bench/bench.h:55:53: error: expected primary-expression before ā€˜>ā€™ token
333.8    55 |             maxCycles = std::numeric_limits<uint64_t>::min();
333.8       |                                                     ^
333.8 bench/bench.h:55:56: error: ā€˜::minā€™ has not been declared; did you mean ā€˜std::minā€™?
333.8    55 |             maxCycles = std::numeric_limits<uint64_t>::min();
333.8       |                                                        ^~~
333.8       |                                                        std::min
333.8 /usr/include/c++/13.2.1/bits/stl_algo.h:5785:5: note: ā€˜std::minā€™ declared here
333.8  5785 |     min(initializer_list<_Tp> __l, _Compare __comp)
333.8       |     ^~~
336.0 make[2]: Leaving directory '/build/src'
336.0 make[2]: *** [Makefile:8467: bench/bench_dogecoin-bench_bitcoin.o] Error 1

To reproduce, Dockerfile from #3471 can be used (right now):

FROM archlinux
WORKDIR /build
RUN pacman -Sy \
 && pacman --noconfirm -S git base-devel boost libevent python db

ARG GITREF=1.15.0-dev
ARG MAKEOPTS=-j8

RUN git clone https://github.com/dogecoin/dogecoin.git \
 && cd dogecoin \
 && git checkout $GITREF \
 && ./autogen.sh \
 && ./configure --without-gui --without-miniupnpc \
 && make $MAKEOPTS \
 && make check

This makes the issue broader than just boost 1.84.0 (and therefore more urgent)

from dogecoin.

patricklodder avatar patricklodder commented on June 2, 2024

Thank you. This is probably due to a missing <limits.h> include.

Which version of boost are you using?

from dogecoin.

kloczek avatar kloczek commented on June 2, 2024

If you will have any patch to test please let me know.

from dogecoin.

patricklodder avatar patricklodder commented on June 2, 2024

If I run a docker container w/ fedora:rawhide, I get gcc 14 and boost 1.83. What do I do to get gcc 15 and boost 1.84?

from dogecoin.

kloczek avatar kloczek commented on June 2, 2024

I'm using my own distribution which is relatively close to fedora rawhide.

from dogecoin.

patricklodder avatar patricklodder commented on June 2, 2024

Based on the error above, #3456 should fix this.

I need to do a manual boost 1.84 build to verify it fully; please let me know if this fixes the above error in your setup.

from dogecoin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.