dogecoin / dogecoin

very currency
MIT License
14.41k stars 2.82k forks source link

[bug] 1.14.7: build fails with gcc 14.x #3454

Open kloczek opened 3 months ago

kloczek commented 3 months ago

Looks like build fails when gcc 15.x (available now in fedora rawhide) is used

Build fails with ```console [tkloczko@pers-jacek dogecoin-1.14.7]$ make -k Making all in src make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/dogecoin-1.14.7/src' make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/dogecoin-1.14.7/src' /usr/bin/g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./obj -I/usr/include/libdb/ -pthread -I/usr/include -I./leveldb/include -I./leveldb/helpers/memenv -I./secp256k1/include -I./univalue/include -I./bench/ -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/db53 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all -fPIE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -std=c++14 -c -o bench/bench_dogecoin-bench_bitcoin.o `test -f 'bench/bench_bitcoin.cpp' || echo './'`bench/bench_bitcoin.cpp In file included from bench/bench_bitcoin.cpp:5: bench/bench.h: In constructor ‘benchmark::State::State(std::string, double)’: bench/bench.h:52:28: error: ‘numeric_limits’ is not a member of ‘std’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:52:43: error: expected primary-expression before ‘double’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~ bench/bench.h:53:28: error: ‘numeric_limits’ is not a member of ‘std’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:53:43: error: expected primary-expression before ‘double’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~ bench/bench.h:54:30: error: ‘numeric_limits’ is not a member of ‘std’ 54 | minCycles = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:54:53: error: expected primary-expression before ‘>’ token 54 | minCycles = std::numeric_limits::max(); | ^ bench/bench.h:54:56: error: ‘::max’ has not been declared; did you mean ‘std::max’? 54 | minCycles = std::numeric_limits::max(); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/boost/function/detail/prologue.hpp:14, from /usr/include/boost/function.hpp:30, from bench/bench.h:11: /usr/include/c++/14/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here 5715 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ bench/bench.h:55:30: error: ‘numeric_limits’ is not a member of ‘std’ 55 | maxCycles = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:55:53: error: expected primary-expression before ‘>’ token 55 | maxCycles = std::numeric_limits::min(); | ^ bench/bench.h:55:56: error: ‘::min’ has not been declared; did you mean ‘std::min’? 55 | maxCycles = std::numeric_limits::min(); | ^~~ | std::min /usr/include/c++/14/bits/stl_algo.h:5695:5: note: ‘std::min’ declared here 5695 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ make[2]: *** [Makefile:8470: bench/bench_dogecoin-bench_bitcoin.o] Error 1 /usr/bin/g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./obj -I/usr/include/libdb/ -pthread -I/usr/include -I./leveldb/include -I./leveldb/helpers/memenv -I./secp256k1/include -I./univalue/include -I./bench/ -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/db53 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all -fPIE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -std=c++14 -c -o bench/bench_dogecoin-bench.o `test -f 'bench/bench.cpp' || echo './'`bench/bench.cpp In file included from bench/bench.cpp:5: bench/bench.h: In constructor ‘benchmark::State::State(std::string, double)’: bench/bench.h:52:28: error: ‘numeric_limits’ is not a member of ‘std’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:52:43: error: expected primary-expression before ‘double’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~ bench/bench.h:53:28: error: ‘numeric_limits’ is not a member of ‘std’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:53:43: error: expected primary-expression before ‘double’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~ bench/bench.h:54:30: error: ‘numeric_limits’ is not a member of ‘std’ 54 | minCycles = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:54:53: error: expected primary-expression before ‘>’ token 54 | minCycles = std::numeric_limits::max(); | ^ bench/bench.h:54:56: error: ‘::max’ has not been declared; did you mean ‘std::max’? 54 | minCycles = std::numeric_limits::max(); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/boost/function/detail/prologue.hpp:14, from /usr/include/boost/function.hpp:30, from bench/bench.h:11: /usr/include/c++/14/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here 5715 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ bench/bench.h:55:30: error: ‘numeric_limits’ is not a member of ‘std’ 55 | maxCycles = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:55:53: error: expected primary-expression before ‘>’ token 55 | maxCycles = std::numeric_limits::min(); | ^ bench/bench.h:55:56: error: ‘::min’ has not been declared; did you mean ‘std::min’? 55 | maxCycles = std::numeric_limits::min(); | ^~~ | std::min /usr/include/c++/14/bits/stl_algo.h:5695:5: note: ‘std::min’ declared here 5695 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ bench/bench.cpp: In member function ‘bool benchmark::State::KeepRunning()’: bench/bench.cpp:73:26: error: ‘numeric_limits’ is not a member of ‘std’ 73 | minTime = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.cpp:73:41: error: expected primary-expression before ‘double’ 73 | minTime = std::numeric_limits::max(); | ^~~~~~ bench/bench.cpp:74:26: error: ‘numeric_limits’ is not a member of ‘std’ 74 | maxTime = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.cpp:74:41: error: expected primary-expression before ‘double’ 74 | maxTime = std::numeric_limits::min(); | ^~~~~~ bench/bench.cpp:75:28: error: ‘numeric_limits’ is not a member of ‘std’ 75 | minCycles = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.cpp:75:51: error: expected primary-expression before ‘>’ token 75 | minCycles = std::numeric_limits::max(); | ^ bench/bench.cpp:75:54: error: ‘::max’ has not been declared; did you mean ‘std::max’? 75 | minCycles = std::numeric_limits::max(); | ^~~ | std::max /usr/include/c++/14/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here 5715 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ bench/bench.cpp:76:28: error: ‘numeric_limits’ is not a member of ‘std’ 76 | maxCycles = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.cpp:76:51: error: expected primary-expression before ‘>’ token 76 | maxCycles = std::numeric_limits::min(); | ^ bench/bench.cpp:76:54: error: ‘::min’ has not been declared; did you mean ‘std::min’? 76 | maxCycles = std::numeric_limits::min(); | ^~~ | std::min /usr/include/c++/14/bits/stl_algo.h:5695:5: note: ‘std::min’ declared here 5695 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ make[2]: *** [Makefile:8484: bench/bench_dogecoin-bench.o] Error 1 /usr/bin/g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./obj -I/usr/include/libdb/ -pthread -I/usr/include -I./leveldb/include -I./leveldb/helpers/memenv -I./secp256k1/include -I./univalue/include -I./bench/ -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/db53 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all -fPIE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -std=c++14 -c -o bench/bench_dogecoin-checkqueue.o `test -f 'bench/checkqueue.cpp' || echo './'`bench/checkqueue.cpp In file included from bench/checkqueue.cpp:5: bench/bench.h: In constructor ‘benchmark::State::State(std::string, double)’: bench/bench.h:52:28: error: ‘numeric_limits’ is not a member of ‘std’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:52:43: error: expected primary-expression before ‘double’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~ bench/bench.h:53:28: error: ‘numeric_limits’ is not a member of ‘std’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:53:43: error: expected primary-expression before ‘double’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~ bench/bench.h:54:30: error: ‘numeric_limits’ is not a member of ‘std’ 54 | minCycles = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:54:53: error: expected primary-expression before ‘>’ token 54 | minCycles = std::numeric_limits::max(); | ^ bench/bench.h:54:56: error: ‘::max’ has not been declared; did you mean ‘std::max’? 54 | minCycles = std::numeric_limits::max(); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/boost/function/detail/prologue.hpp:14, from /usr/include/boost/function.hpp:30, from bench/bench.h:11: /usr/include/c++/14/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here 5715 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ bench/bench.h:55:30: error: ‘numeric_limits’ is not a member of ‘std’ 55 | maxCycles = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:55:53: error: expected primary-expression before ‘>’ token 55 | maxCycles = std::numeric_limits::min(); | ^ bench/bench.h:55:56: error: ‘::min’ has not been declared; did you mean ‘std::min’? 55 | maxCycles = std::numeric_limits::min(); | ^~~ | std::min /usr/include/c++/14/bits/stl_algo.h:5695:5: note: ‘std::min’ declared here 5695 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ make[2]: *** [Makefile:8498: bench/bench_dogecoin-checkqueue.o] Error 1 /usr/bin/g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./obj -I/usr/include/libdb/ -pthread -I/usr/include -I./leveldb/include -I./leveldb/helpers/memenv -I./secp256k1/include -I./univalue/include -I./bench/ -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/db53 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all -fPIE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -std=c++14 -c -o bench/bench_dogecoin-Examples.o `test -f 'bench/Examples.cpp' || echo './'`bench/Examples.cpp In file included from bench/Examples.cpp:5: bench/bench.h: In constructor ‘benchmark::State::State(std::string, double)’: bench/bench.h:52:28: error: ‘numeric_limits’ is not a member of ‘std’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:52:43: error: expected primary-expression before ‘double’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~ bench/bench.h:53:28: error: ‘numeric_limits’ is not a member of ‘std’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:53:43: error: expected primary-expression before ‘double’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~ bench/bench.h:54:30: error: ‘numeric_limits’ is not a member of ‘std’ 54 | minCycles = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:54:53: error: expected primary-expression before ‘>’ token 54 | minCycles = std::numeric_limits::max(); | ^ bench/bench.h:54:56: error: ‘::max’ has not been declared; did you mean ‘std::max’? 54 | minCycles = std::numeric_limits::max(); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/boost/function/detail/prologue.hpp:14, from /usr/include/boost/function.hpp:30, from bench/bench.h:11: /usr/include/c++/14/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here 5715 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ bench/bench.h:55:30: error: ‘numeric_limits’ is not a member of ‘std’ 55 | maxCycles = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:55:53: error: expected primary-expression before ‘>’ token 55 | maxCycles = std::numeric_limits::min(); | ^ bench/bench.h:55:56: error: ‘::min’ has not been declared; did you mean ‘std::min’? 55 | maxCycles = std::numeric_limits::min(); | ^~~ | std::min /usr/include/c++/14/bits/stl_algo.h:5695:5: note: ‘std::min’ declared here 5695 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ make[2]: *** [Makefile:8512: bench/bench_dogecoin-Examples.o] Error 1 /usr/bin/g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./obj -I/usr/include/libdb/ -pthread -I/usr/include -I./leveldb/include -I./leveldb/helpers/memenv -I./secp256k1/include -I./univalue/include -I./bench/ -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/db53 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all -fPIE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -std=c++14 -c -o bench/bench_dogecoin-rollingbloom.o `test -f 'bench/rollingbloom.cpp' || echo './'`bench/rollingbloom.cpp In file included from bench/rollingbloom.cpp:7: bench/bench.h: In constructor ‘benchmark::State::State(std::string, double)’: bench/bench.h:52:28: error: ‘numeric_limits’ is not a member of ‘std’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:52:43: error: expected primary-expression before ‘double’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~ bench/bench.h:53:28: error: ‘numeric_limits’ is not a member of ‘std’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:53:43: error: expected primary-expression before ‘double’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~ bench/bench.h:54:30: error: ‘numeric_limits’ is not a member of ‘std’ 54 | minCycles = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:54:53: error: expected primary-expression before ‘>’ token 54 | minCycles = std::numeric_limits::max(); | ^ bench/bench.h:54:56: error: ‘::max’ has not been declared; did you mean ‘std::max’? 54 | minCycles = std::numeric_limits::max(); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/boost/function/detail/prologue.hpp:14, from /usr/include/boost/function.hpp:30, from bench/bench.h:11: /usr/include/c++/14/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here 5715 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ bench/bench.h:55:30: error: ‘numeric_limits’ is not a member of ‘std’ 55 | maxCycles = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:55:53: error: expected primary-expression before ‘>’ token 55 | maxCycles = std::numeric_limits::min(); | ^ bench/bench.h:55:56: error: ‘::min’ has not been declared; did you mean ‘std::min’? 55 | maxCycles = std::numeric_limits::min(); | ^~~ | std::min /usr/include/c++/14/bits/stl_algo.h:5695:5: note: ‘std::min’ declared here 5695 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ make[2]: *** [Makefile:8526: bench/bench_dogecoin-rollingbloom.o] Error 1 /usr/bin/g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./obj -I/usr/include/libdb/ -pthread -I/usr/include -I./leveldb/include -I./leveldb/helpers/memenv -I./secp256k1/include -I./univalue/include -I./bench/ -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/db53 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all -fPIE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -std=c++14 -c -o bench/bench_dogecoin-crypto_hash.o `test -f 'bench/crypto_hash.cpp' || echo './'`bench/crypto_hash.cpp In file included from bench/crypto_hash.cpp:7: bench/bench.h: In constructor ‘benchmark::State::State(std::string, double)’: bench/bench.h:52:28: error: ‘numeric_limits’ is not a member of ‘std’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:52:43: error: expected primary-expression before ‘double’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~ bench/bench.h:53:28: error: ‘numeric_limits’ is not a member of ‘std’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:53:43: error: expected primary-expression before ‘double’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~ bench/bench.h:54:30: error: ‘numeric_limits’ is not a member of ‘std’ 54 | minCycles = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:54:53: error: expected primary-expression before ‘>’ token 54 | minCycles = std::numeric_limits::max(); | ^ bench/bench.h:54:56: error: ‘::max’ has not been declared; did you mean ‘std::max’? 54 | minCycles = std::numeric_limits::max(); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/boost/function/detail/prologue.hpp:14, from /usr/include/boost/function.hpp:30, from bench/bench.h:11: /usr/include/c++/14/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here 5715 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ bench/bench.h:55:30: error: ‘numeric_limits’ is not a member of ‘std’ 55 | maxCycles = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:55:53: error: expected primary-expression before ‘>’ token 55 | maxCycles = std::numeric_limits::min(); | ^ bench/bench.h:55:56: error: ‘::min’ has not been declared; did you mean ‘std::min’? 55 | maxCycles = std::numeric_limits::min(); | ^~~ | std::min /usr/include/c++/14/bits/stl_algo.h:5695:5: note: ‘std::min’ declared here 5695 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ make[2]: *** [Makefile:8540: bench/bench_dogecoin-crypto_hash.o] Error 1 /usr/bin/g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./obj -I/usr/include/libdb/ -pthread -I/usr/include -I./leveldb/include -I./leveldb/helpers/memenv -I./secp256k1/include -I./univalue/include -I./bench/ -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/db53 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all -fPIE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -std=c++14 -c -o bench/bench_dogecoin-ccoins_caching.o `test -f 'bench/ccoins_caching.cpp' || echo './'`bench/ccoins_caching.cpp In file included from bench/ccoins_caching.cpp:5: bench/bench.h: In constructor ‘benchmark::State::State(std::string, double)’: bench/bench.h:52:28: error: ‘numeric_limits’ is not a member of ‘std’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:52:43: error: expected primary-expression before ‘double’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~ bench/bench.h:53:28: error: ‘numeric_limits’ is not a member of ‘std’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:53:43: error: expected primary-expression before ‘double’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~ bench/bench.h:54:30: error: ‘numeric_limits’ is not a member of ‘std’ 54 | minCycles = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:54:53: error: expected primary-expression before ‘>’ token 54 | minCycles = std::numeric_limits::max(); | ^ bench/bench.h:54:56: error: ‘::max’ has not been declared; did you mean ‘std::max’? 54 | minCycles = std::numeric_limits::max(); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/boost/function/detail/prologue.hpp:14, from /usr/include/boost/function.hpp:30, from bench/bench.h:11: /usr/include/c++/14/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here 5715 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ bench/bench.h:55:30: error: ‘numeric_limits’ is not a member of ‘std’ 55 | maxCycles = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:55:53: error: expected primary-expression before ‘>’ token 55 | maxCycles = std::numeric_limits::min(); | ^ bench/bench.h:55:56: error: ‘::min’ has not been declared; did you mean ‘std::min’? 55 | maxCycles = std::numeric_limits::min(); | ^~~ | std::min /usr/include/c++/14/bits/stl_algo.h:5695:5: note: ‘std::min’ declared here 5695 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ make[2]: *** [Makefile:8554: bench/bench_dogecoin-ccoins_caching.o] Error 1 /usr/bin/g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./obj -I/usr/include/libdb/ -pthread -I/usr/include -I./leveldb/include -I./leveldb/helpers/memenv -I./secp256k1/include -I./univalue/include -I./bench/ -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/db53 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all -fPIE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -std=c++14 -c -o bench/bench_dogecoin-mempool_eviction.o `test -f 'bench/mempool_eviction.cpp' || echo './'`bench/mempool_eviction.cpp In file included from bench/mempool_eviction.cpp:5: bench/bench.h: In constructor ‘benchmark::State::State(std::string, double)’: bench/bench.h:52:28: error: ‘numeric_limits’ is not a member of ‘std’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:52:43: error: expected primary-expression before ‘double’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~ bench/bench.h:53:28: error: ‘numeric_limits’ is not a member of ‘std’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:53:43: error: expected primary-expression before ‘double’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~ bench/bench.h:54:30: error: ‘numeric_limits’ is not a member of ‘std’ 54 | minCycles = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:54:53: error: expected primary-expression before ‘>’ token 54 | minCycles = std::numeric_limits::max(); | ^ bench/bench.h:54:56: error: ‘::max’ has not been declared; did you mean ‘std::max’? 54 | minCycles = std::numeric_limits::max(); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/boost/function/detail/prologue.hpp:14, from /usr/include/boost/function.hpp:30, from bench/bench.h:11: /usr/include/c++/14/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here 5715 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ bench/bench.h:55:30: error: ‘numeric_limits’ is not a member of ‘std’ 55 | maxCycles = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:55:53: error: expected primary-expression before ‘>’ token 55 | maxCycles = std::numeric_limits::min(); | ^ bench/bench.h:55:56: error: ‘::min’ has not been declared; did you mean ‘std::min’? 55 | maxCycles = std::numeric_limits::min(); | ^~~ | std::min /usr/include/c++/14/bits/stl_algo.h:5695:5: note: ‘std::min’ declared here 5695 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ make[2]: *** [Makefile:8568: bench/bench_dogecoin-mempool_eviction.o] Error 1 /usr/bin/g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./obj -I/usr/include/libdb/ -pthread -I/usr/include -I./leveldb/include -I./leveldb/helpers/memenv -I./secp256k1/include -I./univalue/include -I./bench/ -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/db53 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all -fPIE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -std=c++14 -c -o bench/bench_dogecoin-base58.o `test -f 'bench/base58.cpp' || echo './'`bench/base58.cpp In file included from bench/base58.cpp:5: bench/bench.h: In constructor ‘benchmark::State::State(std::string, double)’: bench/bench.h:52:28: error: ‘numeric_limits’ is not a member of ‘std’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:52:43: error: expected primary-expression before ‘double’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~ bench/bench.h:53:28: error: ‘numeric_limits’ is not a member of ‘std’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:53:43: error: expected primary-expression before ‘double’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~ bench/bench.h:54:30: error: ‘numeric_limits’ is not a member of ‘std’ 54 | minCycles = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:54:53: error: expected primary-expression before ‘>’ token 54 | minCycles = std::numeric_limits::max(); | ^ bench/bench.h:54:56: error: ‘::max’ has not been declared; did you mean ‘std::max’? 54 | minCycles = std::numeric_limits::max(); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/boost/function/detail/prologue.hpp:14, from /usr/include/boost/function.hpp:30, from bench/bench.h:11: /usr/include/c++/14/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here 5715 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ bench/bench.h:55:30: error: ‘numeric_limits’ is not a member of ‘std’ 55 | maxCycles = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:55:53: error: expected primary-expression before ‘>’ token 55 | maxCycles = std::numeric_limits::min(); | ^ bench/bench.h:55:56: error: ‘::min’ has not been declared; did you mean ‘std::min’? 55 | maxCycles = std::numeric_limits::min(); | ^~~ | std::min /usr/include/c++/14/bits/stl_algo.h:5695:5: note: ‘std::min’ declared here 5695 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ make[2]: *** [Makefile:8582: bench/bench_dogecoin-base58.o] Error 1 /usr/bin/g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./obj -I/usr/include/libdb/ -pthread -I/usr/include -I./leveldb/include -I./leveldb/helpers/memenv -I./secp256k1/include -I./univalue/include -I./bench/ -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/db53 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all -fPIE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -std=c++14 -c -o bench/bench_dogecoin-lockedpool.o `test -f 'bench/lockedpool.cpp' || echo './'`bench/lockedpool.cpp In file included from bench/lockedpool.cpp:5: bench/bench.h: In constructor ‘benchmark::State::State(std::string, double)’: bench/bench.h:52:28: error: ‘numeric_limits’ is not a member of ‘std’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:52:43: error: expected primary-expression before ‘double’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~ bench/bench.h:53:28: error: ‘numeric_limits’ is not a member of ‘std’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:53:43: error: expected primary-expression before ‘double’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~ bench/bench.h:54:30: error: ‘numeric_limits’ is not a member of ‘std’ 54 | minCycles = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:54:53: error: expected primary-expression before ‘>’ token 54 | minCycles = std::numeric_limits::max(); | ^ bench/bench.h:54:56: error: ‘::max’ has not been declared; did you mean ‘std::max’? 54 | minCycles = std::numeric_limits::max(); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/boost/function/detail/prologue.hpp:14, from /usr/include/boost/function.hpp:30, from bench/bench.h:11: /usr/include/c++/14/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here 5715 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ bench/bench.h:55:30: error: ‘numeric_limits’ is not a member of ‘std’ 55 | maxCycles = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:55:53: error: expected primary-expression before ‘>’ token 55 | maxCycles = std::numeric_limits::min(); | ^ bench/bench.h:55:56: error: ‘::min’ has not been declared; did you mean ‘std::min’? 55 | maxCycles = std::numeric_limits::min(); | ^~~ | std::min /usr/include/c++/14/bits/stl_algo.h:5695:5: note: ‘std::min’ declared here 5695 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ make[2]: *** [Makefile:8596: bench/bench_dogecoin-lockedpool.o] Error 1 /usr/bin/g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./obj -I/usr/include/libdb/ -pthread -I/usr/include -I./leveldb/include -I./leveldb/helpers/memenv -I./secp256k1/include -I./univalue/include -I./bench/ -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/db53 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all -fPIE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -std=c++14 -c -o bench/bench_dogecoin-scrypt.o `test -f 'bench/scrypt.cpp' || echo './'`bench/scrypt.cpp In file included from bench/scrypt.cpp:4: bench/bench.h: In constructor ‘benchmark::State::State(std::string, double)’: bench/bench.h:52:28: error: ‘numeric_limits’ is not a member of ‘std’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:52:43: error: expected primary-expression before ‘double’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~ bench/bench.h:53:28: error: ‘numeric_limits’ is not a member of ‘std’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:53:43: error: expected primary-expression before ‘double’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~ bench/bench.h:54:30: error: ‘numeric_limits’ is not a member of ‘std’ 54 | minCycles = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:54:53: error: expected primary-expression before ‘>’ token 54 | minCycles = std::numeric_limits::max(); | ^ bench/bench.h:54:56: error: ‘::max’ has not been declared; did you mean ‘std::max’? 54 | minCycles = std::numeric_limits::max(); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/boost/function/detail/prologue.hpp:14, from /usr/include/boost/function.hpp:30, from bench/bench.h:11: /usr/include/c++/14/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here 5715 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ bench/bench.h:55:30: error: ‘numeric_limits’ is not a member of ‘std’ 55 | maxCycles = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:55:53: error: expected primary-expression before ‘>’ token 55 | maxCycles = std::numeric_limits::min(); | ^ bench/bench.h:55:56: error: ‘::min’ has not been declared; did you mean ‘std::min’? 55 | maxCycles = std::numeric_limits::min(); | ^~~ | std::min /usr/include/c++/14/bits/stl_algo.h:5695:5: note: ‘std::min’ declared here 5695 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ make[2]: *** [Makefile:8624: bench/bench_dogecoin-scrypt.o] Error 1 /usr/bin/g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./obj -I/usr/include/libdb/ -pthread -I/usr/include -I./leveldb/include -I./leveldb/helpers/memenv -I./secp256k1/include -I./univalue/include -I./bench/ -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/db53 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all -fPIE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -std=c++14 -c -o bench/bench_dogecoin-coin_selection.o `test -f 'bench/coin_selection.cpp' || echo './'`bench/coin_selection.cpp In file included from bench/coin_selection.cpp:5: bench/bench.h: In constructor ‘benchmark::State::State(std::string, double)’: bench/bench.h:52:28: error: ‘numeric_limits’ is not a member of ‘std’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:52:43: error: expected primary-expression before ‘double’ 52 | minTime = std::numeric_limits::max(); | ^~~~~~ bench/bench.h:53:28: error: ‘numeric_limits’ is not a member of ‘std’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:53:43: error: expected primary-expression before ‘double’ 53 | maxTime = std::numeric_limits::min(); | ^~~~~~ bench/bench.h:54:30: error: ‘numeric_limits’ is not a member of ‘std’ 54 | minCycles = std::numeric_limits::max(); | ^~~~~~~~~~~~~~ bench/bench.h:54:53: error: expected primary-expression before ‘>’ token 54 | minCycles = std::numeric_limits::max(); | ^ bench/bench.h:54:56: error: ‘::max’ has not been declared; did you mean ‘std::max’? 54 | minCycles = std::numeric_limits::max(); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from /usr/include/boost/function/detail/prologue.hpp:14, from /usr/include/boost/function.hpp:30, from bench/bench.h:11: /usr/include/c++/14/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here 5715 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ bench/bench.h:55:30: error: ‘numeric_limits’ is not a member of ‘std’ 55 | maxCycles = std::numeric_limits::min(); | ^~~~~~~~~~~~~~ bench/bench.h:55:53: error: expected primary-expression before ‘>’ token 55 | maxCycles = std::numeric_limits::min(); | ^ bench/bench.h:55:56: error: ‘::min’ has not been declared; did you mean ‘std::min’? 55 | maxCycles = std::numeric_limits::min(); | ^~~ | std::min /usr/include/c++/14/bits/stl_algo.h:5695:5: note: ‘std::min’ declared here 5695 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ make[2]: *** [Makefile:8638: bench/bench_dogecoin-coin_selection.o] Error 1 make[2]: Target 'all-am' not remade because of errors. make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/dogecoin-1.14.7/src' make[1]: *** [Makefile:9830: all-recursive] Error 1 make[1]: Target 'all' not remade because of errors. make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/dogecoin-1.14.7/src' Making all in doc/man make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/dogecoin-1.14.7/doc/man' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/dogecoin-1.14.7/doc/man' make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/dogecoin-1.14.7' make[1]: Nothing to be done for 'all-am'. make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/dogecoin-1.14.7' make: *** [Makefile:694: all-recursive] Error 1 make: Target 'all' not remade because of errors. ```
patricklodder commented 3 months ago

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

Which version of boost are you using?

kloczek commented 3 months ago

boost 1.84.0.

patricklodder commented 3 months ago

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.

kloczek commented 3 months ago

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

patricklodder commented 3 months ago

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?

kloczek commented 3 months ago

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

patricklodder commented 3 months ago

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.

kloczek commented 3 months ago

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.

patricklodder commented 3 months ago

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 ```console 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::max(); 333.8 | ^~~~~~~~~~~~~~ 333.8 bench/bench.h:52:43: error: expected primary-expression before ‘double’ 333.8 52 | minTime = std::numeric_limits::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::min(); 333.8 | ^~~~~~~~~~~~~~ 333.8 bench/bench.h:53:43: error: expected primary-expression before ‘double’ 333.8 53 | maxTime = std::numeric_limits::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::max(); 333.8 | ^~~~~~~~~~~~~~ 333.8 bench/bench.h:54:53: error: expected primary-expression before ‘>’ token 333.8 54 | minCycles = std::numeric_limits::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::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::min(); 333.8 | ^~~~~~~~~~~~~~ 333.8 bench/bench.h:55:53: error: expected primary-expression before ‘>’ token 333.8 55 | maxCycles = std::numeric_limits::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::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)