Page MenuHomePhabricator

[Chronik Add empty HTTP server, take two
ClosedPublic

Authored by tobias_ruck on Dec 7 2022, 20:33.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC7f63e552b279: [Chronik Add empty HTTP server, take two
Summary

This has already been added in D12673, which however broke the windows build, and thus has been reverted in D12782.

  1. Add chronik-http crate to run an HTTP server using axum within bitcoind. It currently has no routes, so every request will result in a 404.
  2. Use tokio runtime; outstanding HTTP requests and ports are automatically dropped when Chronik is dropped.
  3. Add abort_node ffi function to gracefully shut down the node with an error message.
  4. Add "chronik_" prefix as allowed prefix for tests.
Test Plan

ninja check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Tail of the build log:

[709/735] Automatic MOC for target bitcoin-qt
[710/735] Creating version file for bitcoin-qt
[711/735] 
[712/735] Building RC object src/qt/CMakeFiles/bitcoin-qt.dir/bitcoin-qt.rc.res
/work/abc-ci-builds/build-win64/src/qt/bitcoin-qt.rc:27: use "" to put " in a string
/work/abc-ci-builds/build-win64/src/qt/bitcoin-qt.rc:27: use "" to put " in a string
[713/735] Building CXX object src/qt/CMakeFiles/bitcoin-qt.dir/bitcoin-qt_autogen/mocs_compilation.cpp.obj
[714/735] Automatic MOC for target test_bitcoin-qt
[715/735] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/util.cpp.obj
[716/735] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/compattests.cpp.obj
[717/735] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/bitcoinaddressvalidatortests.cpp.obj
[718/735] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_bitcoin-qt_autogen/mocs_compilation.cpp.obj
[719/735] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/guiutiltests.cpp.obj
[720/735] Building CXX object src/qt/CMakeFiles/bitcoin-qt.dir/main.cpp.obj
[721/735] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/uritests.cpp.obj
[722/735] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_main.cpp.obj
[723/735] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/apptests.cpp.obj
[724/735] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/paymentservertests.cpp.obj
[725/735] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/__/__/wallet/test/wallet_test_fixture.cpp.obj
[726/735] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/rpcnestedtests.cpp.obj
[727/735] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/wallettests.cpp.obj
[728/735] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/addressbooktests.cpp.obj
[729/735] Linking CXX executable src/qt/bitcoin-qt.exe
FAILED: src/qt/bitcoin-qt.exe 
: && /usr/bin/x86_64-w64-mingw32-g++ -g -O2 -mwindows  -static -Wl,--enable-reloc-section -Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va src/qt/CMakeFiles/bitcoin-qt.dir/bitcoin-qt_autogen/mocs_compilation.cpp.obj src/qt/CMakeFiles/bitcoin-qt.dir/main.cpp.obj src/qt/CMakeFiles/bitcoin-qt.dir/bitcoin-qt.rc.res -o src/qt/bitcoin-qt.exe -Wl,--out-implib,src/qt/libbitcoin-qt.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -L/work/depends/x86_64-w64-mingw32/lib -lssp  src/qt/libbitcoin-qt-base.a  ../../depends/x86_64-w64-mingw32/plugins/platforms/libqminimal.a  ../../depends/x86_64-w64-mingw32/plugins/platforms/libqwindows.a  -lwinspool  -lshlwapi  ../../depends/x86_64-w64-mingw32/lib/libQt5EventDispatcherSupport.a  ../../depends/x86_64-w64-mingw32/lib/libQt5FontDatabaseSupport.a  ../../depends/x86_64-w64-mingw32/lib/libQt5ThemeSupport.a  ../../depends/x86_64-w64-mingw32/lib/libQt5AccessibilitySupport.a  src/libserver.a  src/leveldb/libmemenv.a  ../../depends/x86_64-w64-mingw32/lib/libminiupnpc.a  ../../depends/x86_64-w64-mingw32/lib/libnatpmp.a  src/zmq/libzmq.a  ../../depends/x86_64-w64-mingw32/lib/libzmq.a  -lrpcrt4  -liphlpapi  chronik/libchronik.a  chronik/libchronik_lib.a  -luserenv  -lgcc_eh  -lpthread  -lbcrypt  chronik/libchronik-bridge.a  src/leveldb/libleveldb.a  src/leveldb/libleveldb-sse4.2.a  /usr/x86_64-w64-mingw32/lib/libshlwapi.a  src/librpcclient.a  ../../depends/x86_64-w64-mingw32/lib/libQt5Widgets.a  ../../depends/x86_64-w64-mingw32/lib/libQt5Gui.a  -lgdi32  -lcomdlg32  -loleaut32  -limm32  ../../depends/x86_64-w64-mingw32/lib/libqtlibpng.a  ../../depends/x86_64-w64-mingw32/lib/libqtharfbuzz.a  ../../depends/x86_64-w64-mingw32/lib/libQt5Gui.a  -luxtheme  -ldwmapi  ../../depends/x86_64-w64-mingw32/lib/libQt5Network.a  -L/work/depends/x86_64-w64-mingw32/lib  ../../depends/x86_64-w64-mingw32/lib/libQt5Core.a  ../../depends/x86_64-w64-mingw32/lib/libQt5Core.a  -lmpr  -lversion  -lws2_32  -lkernel32  -luser32  -lshell32  -luuid  -lole32  ../../depends/x86_64-w64-mingw32/lib/libqtmain.a  -ldnsapi  -liphlpapi  -ladvapi32  -lwinmm  -lcrypt32  -lz  ../../depends/x86_64-w64-mingw32/lib/libssl.a  ../../depends/x86_64-w64-mingw32/lib/libcrypto.a  ../../depends/x86_64-w64-mingw32/lib/libprotobuf.a  src/wallet/libwallet.a  src/libbitcoinconsensus.a  src/libscript.a  src/libcommon.a  src/libbitcoinconsensus.a  src/libscript.a  src/libcommon.a  src/libutil.a  ../../depends/x86_64-w64-mingw32/lib/libevent.a  -lws2_32  -lshell32  -ladvapi32  /usr/x86_64-w64-mingw32/lib/libshlwapi.a  /usr/x86_64-w64-mingw32/lib/libws2_32.a  src/crypto/libcrypto.a  src/crypto/libcrypto_sse4.1.a  src/crypto/libcrypto_avx2.a  src/crypto/libcrypto_shani.a  ../../depends/x86_64-w64-mingw32/lib/libboost_filesystem-mt-s-x64.a  ../../depends/x86_64-w64-mingw32/lib/libboost_thread-mt-s-x64.a  ../../depends/x86_64-w64-mingw32/lib/libboost_chrono-mt-s-x64.a  src/secp256k1/libsecp256k1.a  src/univalue/libunivalue.a  -lssp  ../../depends/x86_64-w64-mingw32/lib/libdb_cxx.a  ../../depends/x86_64-w64-mingw32/lib/libsqlite3.a  ../../depends/x86_64-w64-mingw32/lib/libqrencode.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && :
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x984): undefined reference to `NtCancelIoFileEx'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x9ab): undefined reference to `RtlNtStatusToDosError'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x15e1): undefined reference to `NtCancelIoFileEx'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x16d9): undefined reference to `NtDeviceIoControlFile'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x16eb): undefined reference to `RtlNtStatusToDosError'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x1786): undefined reference to `NtCancelIoFileEx'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x17c6): undefined reference to `RtlNtStatusToDosError'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x18b9): undefined reference to `RtlNtStatusToDosError'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.5.rcgu.o):mio.bea75a8e-cgu.5:(.text+0x674): undefined reference to `NtDeviceIoControlFile'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.5.rcgu.o):mio.bea75a8e-cgu.5:(.text+0x694): undefined reference to `RtlNtStatusToDosError'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.5.rcgu.o):mio.bea75a8e-cgu.5:(.text+0x6fa): undefined reference to `NtCancelIoFileEx'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.5.rcgu.o):mio.bea75a8e-cgu.5:(.text+0x714): undefined reference to `RtlNtStatusToDosError'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.5.rcgu.o):mio.bea75a8e-cgu.5:(.text+0x980): undefined reference to `NtCreateFile'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.5.rcgu.o):mio.bea75a8e-cgu.5:(.text+0x98f): undefined reference to `RtlNtStatusToDosError'
collect2: error: ld returned 1 exit status
[730/735] Linking CXX executable src/qt/test/test_bitcoin-qt.exe
FAILED: src/qt/test/test_bitcoin-qt.exe 
: && /usr/bin/x86_64-w64-mingw32-g++ -g -O2 -static -Wl,--enable-reloc-section -Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.obj src/test/CMakeFiles/testutil.dir/util/logging.cpp.obj src/test/CMakeFiles/testutil.dir/util/mining.cpp.obj src/test/CMakeFiles/testutil.dir/util/net.cpp.obj src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.obj src/test/CMakeFiles/testutil.dir/util/str.cpp.obj src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.obj src/test/CMakeFiles/testutil.dir/util/wallet.cpp.obj src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_bitcoin-qt_autogen/mocs_compilation.cpp.obj src/qt/test/CMakeFiles/test_bitcoin-qt.dir/apptests.cpp.obj src/qt/test/CMakeFiles/test_bitcoin-qt.dir/bitcoinaddressvalidatortests.cpp.obj src/qt/test/CMakeFiles/test_bitcoin-qt.dir/compattests.cpp.obj src/qt/test/CMakeFiles/test_bitcoin-qt.dir/guiutiltests.cpp.obj src/qt/test/CMakeFiles/test_bitcoin-qt.dir/rpcnestedtests.cpp.obj src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_main.cpp.obj src/qt/test/CMakeFiles/test_bitcoin-qt.dir/uritests.cpp.obj src/qt/test/CMakeFiles/test_bitcoin-qt.dir/util.cpp.obj src/qt/test/CMakeFiles/test_bitcoin-qt.dir/addressbooktests.cpp.obj src/qt/test/CMakeFiles/test_bitcoin-qt.dir/wallettests.cpp.obj src/qt/test/CMakeFiles/test_bitcoin-qt.dir/__/__/wallet/test/wallet_test_fixture.cpp.obj src/qt/test/CMakeFiles/test_bitcoin-qt.dir/paymentservertests.cpp.obj -o src/qt/test/test_bitcoin-qt.exe -Wl,--out-implib,src/qt/test/libtest_bitcoin-qt.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -L/work/depends/x86_64-w64-mingw32/lib -lssp  src/qt/libbitcoin-qt-base.a  ../../depends/x86_64-w64-mingw32/lib/libQt5Test.a  src/wallet/libwallet.a  src/libserver.a  src/wallet/libwallet.a  ../../depends/x86_64-w64-mingw32/lib/libdb_cxx.a  ../../depends/x86_64-w64-mingw32/lib/libsqlite3.a  src/libbitcoinconsensus.a  src/libscript.a  src/libcommon.a  src/libbitcoinconsensus.a  src/libscript.a  src/libcommon.a  src/secp256k1/libsecp256k1.a  src/leveldb/libmemenv.a  ../../depends/x86_64-w64-mingw32/lib/libminiupnpc.a  ../../depends/x86_64-w64-mingw32/lib/libnatpmp.a  src/zmq/libzmq.a  ../../depends/x86_64-w64-mingw32/lib/libzmq.a  -lrpcrt4  -liphlpapi  chronik/libchronik.a  chronik/libchronik_lib.a  -luserenv  -lgcc_eh  -lpthread  -lbcrypt  chronik/libchronik-bridge.a  src/leveldb/libleveldb.a  src/leveldb/libleveldb-sse4.2.a  /usr/x86_64-w64-mingw32/lib/libshlwapi.a  ../../depends/x86_64-w64-mingw32/plugins/platforms/libqminimal.a  ../../depends/x86_64-w64-mingw32/plugins/platforms/libqwindows.a  -lwinspool  -lshlwapi  ../../depends/x86_64-w64-mingw32/lib/libQt5EventDispatcherSupport.a  ../../depends/x86_64-w64-mingw32/lib/libQt5FontDatabaseSupport.a  ../../depends/x86_64-w64-mingw32/lib/libQt5ThemeSupport.a  ../../depends/x86_64-w64-mingw32/lib/libQt5AccessibilitySupport.a  src/librpcclient.a  src/libutil.a  src/univalue/libunivalue.a  ../../depends/x86_64-w64-mingw32/lib/libevent.a  -lws2_32  -lshell32  -ladvapi32  /usr/x86_64-w64-mingw32/lib/libshlwapi.a  /usr/x86_64-w64-mingw32/lib/libws2_32.a  src/crypto/libcrypto.a  src/crypto/libcrypto_sse4.1.a  src/crypto/libcrypto_avx2.a  src/crypto/libcrypto_shani.a  ../../depends/x86_64-w64-mingw32/lib/libboost_filesystem-mt-s-x64.a  ../../depends/x86_64-w64-mingw32/lib/libboost_thread-mt-s-x64.a  ../../depends/x86_64-w64-mingw32/lib/libboost_chrono-mt-s-x64.a  ../../depends/x86_64-w64-mingw32/lib/libQt5Widgets.a  ../../depends/x86_64-w64-mingw32/lib/libQt5Gui.a  -lgdi32  -lcomdlg32  -loleaut32  -limm32  ../../depends/x86_64-w64-mingw32/lib/libqtlibpng.a  ../../depends/x86_64-w64-mingw32/lib/libqtharfbuzz.a  ../../depends/x86_64-w64-mingw32/lib/libQt5Gui.a  -luxtheme  -ldwmapi  ../../depends/x86_64-w64-mingw32/lib/libQt5Network.a  -ldnsapi  -liphlpapi  -lcrypt32  ../../depends/x86_64-w64-mingw32/lib/libssl.a  ../../depends/x86_64-w64-mingw32/lib/libcrypto.a  -lssp  ../../depends/x86_64-w64-mingw32/lib/libprotobuf.a  ../../depends/x86_64-w64-mingw32/lib/libqrencode.a  ../../depends/x86_64-w64-mingw32/lib/libQt5Core.a  -L/work/depends/x86_64-w64-mingw32/lib  ../../depends/x86_64-w64-mingw32/lib/libQt5Core.a  -lmpr  -lversion  -lws2_32  -lkernel32  -luser32  -lshell32  -luuid  -lole32  -ladvapi32  -lwinmm  -lz  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && :
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x984): undefined reference to `NtCancelIoFileEx'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x9ab): undefined reference to `RtlNtStatusToDosError'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x15e1): undefined reference to `NtCancelIoFileEx'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x16d9): undefined reference to `NtDeviceIoControlFile'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x16eb): undefined reference to `RtlNtStatusToDosError'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x1786): undefined reference to `NtCancelIoFileEx'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x17c6): undefined reference to `RtlNtStatusToDosError'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.1.rcgu.o):mio.bea75a8e-cgu.1:(.text+0x18b9): undefined reference to `RtlNtStatusToDosError'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.5.rcgu.o):mio.bea75a8e-cgu.5:(.text+0x674): undefined reference to `NtDeviceIoControlFile'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.5.rcgu.o):mio.bea75a8e-cgu.5:(.text+0x694): undefined reference to `RtlNtStatusToDosError'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.5.rcgu.o):mio.bea75a8e-cgu.5:(.text+0x6fa): undefined reference to `NtCancelIoFileEx'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.5.rcgu.o):mio.bea75a8e-cgu.5:(.text+0x714): undefined reference to `RtlNtStatusToDosError'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.5.rcgu.o):mio.bea75a8e-cgu.5:(.text+0x980): undefined reference to `NtCreateFile'
/usr/bin/x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(mio-0afee7db029469f6.mio.bea75a8e-cgu.5.rcgu.o):mio.bea75a8e-cgu.5:(.text+0x98f): undefined reference to `RtlNtStatusToDosError'
collect2: error: ld returned 1 exit status
ninja: build stopped: cannot make progress due to previous errors.
Build build-win64 failed with exit code 1

@bot build-linux64 build-linux-aarch64 build-linux-arm build-osx build-win64

use fancier CMAKE_SYSTEM_NAME instead of WIN32

define FindNTDLL.cmake and use it in chronik/CMakeLists.txt

Tail of the build log:

-- Found boost_filesystem 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/boost_filesystem-1.70.0
--   libboost_filesystem-mt-s-x64.a
-- Adding boost_filesystem dependencies: headers
-- Found Boost: /work/depends/x86_64-w64-mingw32/lib/cmake/Boost-1.70.0/BoostConfig.cmake (found suitable version "1.70.0", minimum required is "1.59") found components: filesystem 
-- Found Boost 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/Boost-1.70.0
--   Requested configuration: QUIET REQUIRED COMPONENTS thread
-- Found boost_thread 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/boost_thread-1.70.0
--   libboost_thread-mt-s-x64.a
-- Adding boost_thread dependencies: chrono;headers
-- Found boost_chrono 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/boost_chrono-1.70.0
--   libboost_chrono-mt-s-x64.a
-- Adding boost_chrono dependencies: headers
-- Found Boost: /work/depends/x86_64-w64-mingw32/lib/cmake/Boost-1.70.0/BoostConfig.cmake (found suitable version "1.70.0", minimum required is "1.59") found components: thread 
-- Found MiniUPnPc component miniupnpc: /work/depends/x86_64-w64-mingw32/lib/libminiupnpc.a
-- Found MiniUPnPc: /work/depends/x86_64-w64-mingw32/include/miniupnpc (found suitable version "2.0.20180203", minimum required is "1.9")  
-- Found NATPMP component natpmp: /work/depends/x86_64-w64-mingw32/lib/libnatpmp.a
-- Found NATPMP: /work/depends/x86_64-w64-mingw32/include   
-- Found Boost 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/Boost-1.70.0
--   Requested configuration: QUIET REQUIRED COMPONENTS unit_test_framework
-- Found boost_unit_test_framework 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/boost_unit_test_framework-1.70.0
--   libboost_unit_test_framework-mt-s-x64.a
-- Adding boost_unit_test_framework dependencies: headers
-- Found Boost: /work/depends/x86_64-w64-mingw32/lib/cmake/Boost-1.70.0/BoostConfig.cmake (found suitable version "1.70.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Failed
-- Found Boost 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/Boost-1.70.0
--   Requested configuration: QUIET REQUIRED COMPONENTS unit_test_framework
-- Found boost_unit_test_framework 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/boost_unit_test_framework-1.70.0
--   libboost_unit_test_framework-mt-s-x64.a
-- Adding boost_unit_test_framework dependencies: headers
-- Found Boost 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/Boost-1.70.0
--   Requested configuration: QUIET REQUIRED COMPONENTS unit_test_framework
-- Found boost_unit_test_framework 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/boost_unit_test_framework-1.70.0
--   libboost_unit_test_framework-mt-s-x64.a
-- Adding boost_unit_test_framework dependencies: headers
-- Found BerkeleyDB component CXX: /work/depends/x86_64-w64-mingw32/lib/libdb_cxx.a
-- Found BerkeleyDB: /work/depends/x86_64-w64-mingw32/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /work/depends/x86_64-w64-mingw32/include (found suitable version "3.32.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /work/depends/x86_64-w64-mingw32/lib/libzmq.a
-- Found ZeroMQ: /work/depends/x86_64-w64-mingw32/include (found suitable version "4.3.1", minimum required is "4.1.5")  
-- Found Protobuf: /work/depends/x86_64-w64-mingw32/lib/libprotobuf.a (found version "2.6.1") 
-- Found OpenSSL: /work/depends/x86_64-w64-mingw32/lib/libcrypto.a (found version "1.0.1k")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - not found
-- Found QREncode component qrencode: /work/depends/x86_64-w64-mingw32/lib/libqrencode.a
-- Found QREncode: /work/depends/x86_64-w64-mingw32/include   
-- Rust Toolchain: 1.61.0-x86_64-unknown-linux-gnu
-- Found Rust: /root/.rustup/toolchains/1.61.0-x86_64-unknown-linux-gnu/bin/rustc (found version "1.61.0") 
CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
  Could NOT find NTDLL (missing: NTIOAPI_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindNTDLL.cmake:47 (find_package_handle_standard_args)
  chronik/CMakeLists.txt:129 (find_package)


-- Configuring incomplete, errors occurred!
See also "/work/abc-ci-builds/build-win64/CMakeFiles/CMakeOutput.log".
See also "/work/abc-ci-builds/build-win64/CMakeFiles/CMakeError.log".
Build build-win64 failed with exit code 1

Make ntioapi.h optional, it seems on some systems only winternl.h exists with all the required stuff in there

Tail of the build log:

  src/test/fuzz/CMakeLists.txt:167 (add_deserialize_fuzz_targets)


CMake Error at src/test/fuzz/CMakeLists.txt:13 (add_executable):
  Target "fuzz-txoutcompressor_deserialize" links to target "NTDLL::ntdll"
  but the target was not found.  Perhaps a find_package() call is missing for
  an IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  src/test/fuzz/CMakeLists.txt:53 (add_fuzz_target)
  src/test/fuzz/CMakeLists.txt:167 (add_deserialize_fuzz_targets)


CMake Error at src/test/fuzz/CMakeLists.txt:13 (add_executable):
  Target "fuzz-fee_rate_deserialize" links to target "NTDLL::ntdll" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  src/test/fuzz/CMakeLists.txt:53 (add_fuzz_target)
  src/test/fuzz/CMakeLists.txt:167 (add_deserialize_fuzz_targets)


CMake Error at src/test/fuzz/CMakeLists.txt:13 (add_executable):
  Target "fuzz-txundo_deserialize" links to target "NTDLL::ntdll" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  src/test/fuzz/CMakeLists.txt:53 (add_fuzz_target)
  src/test/fuzz/CMakeLists.txt:167 (add_deserialize_fuzz_targets)


CMake Error at src/test/fuzz/CMakeLists.txt:13 (add_executable):
  Target "fuzz-process_message_blocktxn" links to target "NTDLL::ntdll" but
  the target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  src/test/fuzz/CMakeLists.txt:70 (add_fuzz_target)
  src/test/fuzz/CMakeLists.txt:209 (add_process_message_fuzz_targets)


CMake Error at src/qt/CMakeLists.txt:80 (add_library):
  Target "bitcoin-qt-base" links to target "NTDLL::ntdll" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?


CMake Error at chronik/CMakeLists.txt:117 (add_library):
  Target "chronik" links to target "NTDLL::ntdll" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


CMake Error at src/test/CMakeLists.txt:47 (add_library):
  Target "testutil" links to target "NTDLL::ntdll" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-win64 failed with exit code 1

use if(WINTERNL_INCLUDE_DIR) instead of if(NTDLL_INCLUDE_DIRS)

Tail of the build log:

  Target "server" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "NTIOAPI_INCLUDE_DIR-NOTFOUND"


CMake Error in src/bench/CMakeLists.txt:
  Target "testutil" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "NTIOAPI_INCLUDE_DIR-NOTFOUND"


CMake Error in src/qt/CMakeLists.txt:
  Target "bitcoin-qt-base" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "NTIOAPI_INCLUDE_DIR-NOTFOUND"


CMake Error in src/qt/CMakeLists.txt:
  Target "bitcoin-qt-base" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "NTIOAPI_INCLUDE_DIR-NOTFOUND"


CMake Error in src/qt/CMakeLists.txt:
  Target "server" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "NTIOAPI_INCLUDE_DIR-NOTFOUND"


CMake Error in src/qt/test/CMakeLists.txt:
  Target "testutil" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "NTIOAPI_INCLUDE_DIR-NOTFOUND"


CMake Error in chronik/CMakeLists.txt:
  Imported target "NTDLL::ntdll" includes non-existent path

    "NTIOAPI_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-win64 failed with exit code 1

only add NTIOAPI_INCLUDE_DIR if it's been found (i.e. has no -NOTFOUND suffix)

Tail of the build log:

-- Found NATPMP component natpmp: /work/depends/x86_64-w64-mingw32/lib/libnatpmp.a
-- Found NATPMP: /work/depends/x86_64-w64-mingw32/include   
-- Found Boost 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/Boost-1.70.0
--   Requested configuration: QUIET REQUIRED COMPONENTS unit_test_framework
-- Found boost_unit_test_framework 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/boost_unit_test_framework-1.70.0
--   libboost_unit_test_framework-mt-s-x64.a
-- Adding boost_unit_test_framework dependencies: headers
-- Found Boost: /work/depends/x86_64-w64-mingw32/lib/cmake/Boost-1.70.0/BoostConfig.cmake (found suitable version "1.70.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Failed
-- Found Boost 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/Boost-1.70.0
--   Requested configuration: QUIET REQUIRED COMPONENTS unit_test_framework
-- Found boost_unit_test_framework 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/boost_unit_test_framework-1.70.0
--   libboost_unit_test_framework-mt-s-x64.a
-- Adding boost_unit_test_framework dependencies: headers
-- Found Boost 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/Boost-1.70.0
--   Requested configuration: QUIET REQUIRED COMPONENTS unit_test_framework
-- Found boost_unit_test_framework 1.70.0 at /work/depends/x86_64-w64-mingw32/lib/cmake/boost_unit_test_framework-1.70.0
--   libboost_unit_test_framework-mt-s-x64.a
-- Adding boost_unit_test_framework dependencies: headers
-- Found BerkeleyDB component CXX: /work/depends/x86_64-w64-mingw32/lib/libdb_cxx.a
-- Found BerkeleyDB: /work/depends/x86_64-w64-mingw32/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /work/depends/x86_64-w64-mingw32/include (found suitable version "3.32.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /work/depends/x86_64-w64-mingw32/lib/libzmq.a
-- Found ZeroMQ: /work/depends/x86_64-w64-mingw32/include (found suitable version "4.3.1", minimum required is "4.1.5")  
-- Found Protobuf: /work/depends/x86_64-w64-mingw32/lib/libprotobuf.a (found version "2.6.1") 
-- Found OpenSSL: /work/depends/x86_64-w64-mingw32/lib/libcrypto.a (found version "1.0.1k")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - not found
-- Found QREncode component qrencode: /work/depends/x86_64-w64-mingw32/lib/libqrencode.a
-- Found QREncode: /work/depends/x86_64-w64-mingw32/include   
-- Rust Toolchain: 1.61.0-x86_64-unknown-linux-gnu
-- Found Rust: /root/.rustup/toolchains/1.61.0-x86_64-unknown-linux-gnu/bin/rustc (found version "1.61.0") 
CMake Error at cmake/modules/FindNTDLL.cmake:40:
  Parse error.  Expected a command name, got right paren with text ")".
Call Stack (most recent call first):
  chronik/CMakeLists.txt:129 (find_package)


CMake Error at chronik/CMakeLists.txt:129 (find_package):
  By not providing "FindNTDLL.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "NTDLL", but
  CMake did not find one.

  Could not find a package configuration file provided by "NTDLL" with any of
  the following names:

    NTDLLConfig.cmake
    ntdll-config.cmake

  Add the installation prefix of "NTDLL" to CMAKE_PREFIX_PATH or set
  "NTDLL_DIR" to a directory containing one of the above files.  If "NTDLL"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/work/abc-ci-builds/build-win64/CMakeFiles/CMakeOutput.log".
See also "/work/abc-ci-builds/build-win64/CMakeFiles/CMakeError.log".
Build build-win64 failed with exit code 1
This revision is now accepted and ready to land.Dec 8 2022, 10:29