depends: `make build-linux64` fails on Ubuntu 21.10 and Ubuntu 22.04
It appears there is some bug in the Qt sources which we use (5.9.7 is ancient at this point). Thus, making depends for linux64 fails here on these newer systems. Here is sample output from Ubuntu 21.10:
In file included from /home/calin/tmp/bitcoin-cash-node/depends/work/build/x86_64-linux-gnu/qt/5.9.7-506fc0844d7/qtbase/src/corelib/tools/qbytearray.cpp:42:
/home/calin/tmp/bitcoin-cash-node/depends/work/build/x86_64-linux-gnu/qt/5.9.7-506fc0844d7/qtbase/src/corelib/tools/qbytearraymatcher.h: In static member function 'static QStaticByteArrayMatcherBase::Skiptable QStaticByteArrayMatcherBase::generate(const char*, uint)':
/home/calin/tmp/bitcoin-cash-node/depends/work/build/x86_64-linux-gnu/qt/5.9.7-506fc0844d7/qtbase/src/corelib/tools/qbytearraymatcher.h:103:38: error: 'numeric_limits' is not a member of 'std'
103 | const auto uchar_max = (std::numeric_limits<uchar>::max)();
| ^~~~~~~~~~~~~~
/home/calin/tmp/bitcoin-cash-node/depends/work/build/x86_64-linux-gnu/qt/5.9.7-506fc0844d7/qtbase/src/corelib/tools/qbytearraymatcher.h:103:58: error: expected primary-expression before '>' token
103 | const auto uchar_max = (std::numeric_limits<uchar>::max)();
| ^
/home/calin/tmp/bitcoin-cash-node/depends/work/build/x86_64-linux-gnu/qt/5.9.7-506fc0844d7/qtbase/src/corelib/tools/qbytearraymatcher.h:103:61: error: '::max' has not been declared; did you mean 'std::max'?
103 | const auto uchar_max = (std::numeric_limits<uchar>::max)();
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /home/calin/tmp/bitcoin-cash-node/depends/work/build/x86_64-linux-gnu/qt/5.9.7-506fc0844d7/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:109,
from /home/calin/tmp/bitcoin-cash-node/depends/work/build/x86_64-linux-gnu/qt/5.9.7-506fc0844d7/qtbase/include/QtCore/qglobal.h:1,
from /home/calin/tmp/bitcoin-cash-node/depends/work/build/x86_64-linux-gnu/qt/5.9.7-506fc0844d7/qtbase/include/QtCore/../../src/corelib/thread/qatomic.h:41,
from /home/calin/tmp/bitcoin-cash-node/depends/work/build/x86_64-linux-gnu/qt/5.9.7-506fc0844d7/qtbase/include/QtCore/qatomic.h:1,
from /home/calin/tmp/bitcoin-cash-node/depends/work/build/x86_64-linux-gnu/qt/5.9.7-506fc0844d7/qtbase/include/QtCore/../../src/corelib/tools/qrefcount.h:43,
from /home/calin/tmp/bitcoin-cash-node/depends/work/build/x86_64-linux-gnu/qt/5.9.7-506fc0844d7/qtbase/include/QtCore/qrefcount.h:1,
from /home/calin/tmp/bitcoin-cash-node/depends/work/build/x86_64-linux-gnu/qt/5.9.7-506fc0844d7/qtbase/src/corelib/tools/qbytearray.h:44,
from /home/calin/tmp/bitcoin-cash-node/depends/work/build/x86_64-linux-gnu/qt/5.9.7-506fc0844d7/qtbase/src/corelib/tools/qbytearray.cpp:41:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: 'std::max' declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
gmake[2]: *** [Makefile:304: qbytearray.o] Error 1
make[1]: *** [funcs.mk:254: /home/calin/tmp/bitcoin-cash-node/depends/work/build/x86_64-linux-gnu/qt/5.9.7-506fc0844d7/qtbase/.stamp_configured] Error 2
make: *** [Makefile:218: build-linux64] Error 2
This problem is fixed, though, with MR !1523 (merged) (both Ubuntu 21.10 and 22.04 work ok there).