Page MenuHomePhabricator

[Chronik] Refactor bridge: Split into `chronik-bridge` and `chronik-lib`
ClosedPublic

Authored by tobias_ruck on Sep 2 2022, 13:52.

Details

Summary

Currently, all the ffi code is in chronik-ffi. However, other crates might want to depend on the ffi code.

However, chronik-ffi is the staticlib that is linked to bitcoind at the end, it'll be the "root" crate depending on all the crates comprising Chronik.

For that reason, other crates cannot depend on chronik-ffi, as it will create a circular reference, which is not allowed for crates.

Say a crate chronik-log wants to reference log_println, defined in chronik-ffi. Also, chronik-ffi wants to use the logging defined in chronik-log.

It would create circular dependencies: chronik-log -> chronik-ffi -> chronik-log.

Therefore, we have to split the ffi into two parts:

  1. chronik-bridge: This defines shared types and functions defined in C++, e.g. log_println.
  2. chronik-lib: This defines all the functions that C++ will need to call, like setup_bridge and methods from CValidationInterface.

This way, there's no circular dependencies: chronik-bridge -> chronik-log -> chronik-lib.

Note: There's a linking issue, and we apparently need to link to chronik-bridge twice. We added this because linking otherwise fails on gcc. This was quite tricky to solve, and Fabien and I aren't sure yet why this fixes it.
In short, somehow lld (with clang) compiles fine, whereas ld and gold fail to compile it.

This *might* be a bug with either of the linkers, and we'll need more investigation.

Fabien's guess is that the symbols are not propagated to libchronik.a because it doesn't use it (he checked and it's not in the lib) and gets optimized out or something like that.

My guess is as good as yours.

I left a "TODO" comment in CMake so maybe someone wiser than us can stumble over it and solve it, or it gets fixed in either of the two linkers.

Test Plan
  1. ninja
  2. ./src/bitcoind -regtest prints "Starting Chronik..." as before

Diff Detail

Repository
rABC Bitcoin ABC
Branch
chronik-split-ffi
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 20084
Build 39855: Build Diffbuild-chronik
Build 39854: arc lint + arc unit

Event Timeline

Tail of the build log:

[476/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qvaluecombobox.cpp.o
[477/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/bitcoin-qt-base_autogen/mocs_compilation.cpp.o
[478/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/intro.cpp.o
[479/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qrc_bitcoin.cpp.o
[480/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/bitcoin.cpp.o
[481/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/bitcoingui.cpp.o
[482/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/guiutil.cpp.o
[483/526] Linking CXX executable src/bench/bitcoin-bench
FAILED: src/bench/bitcoin-bench 
: && /usr/bin/c++ -g -O2 -fuse-ld=gold -Wl,-z,relro -Wl,-z,now -fPIE -pie src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o src/test/CMakeFiles/testutil.dir/util/logging.cpp.o src/test/CMakeFiles/testutil.dir/util/mining.cpp.o src/test/CMakeFiles/testutil.dir/util/net.cpp.o src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o src/test/CMakeFiles/testutil.dir/util/str.cpp.o src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/addrman.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/base58.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/bench.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/bench_bitcoin.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/block_assemble.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/cashaddr.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/ccoins_caching.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/chacha_poly_aead.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/chacha20.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/checkblock.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/checkqueue.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/crypto_aes.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/crypto_hash.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/data.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/duplicate_inputs.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/examples.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/gcs_filter.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/hashpadding.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/lockedpool.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/mempool_eviction.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/mempool_stress.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/merkle_root.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/nanobench.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/peer_eviction.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/poly1305.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/prevector.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/rollingbloom.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/rpc_blockchain.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/rpc_mempool.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/util_time.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/verify_script.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/coin_selection.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/wallet_balance.cpp.o -o src/bench/bitcoin-bench  /usr/lib/x86_64-linux-gnu/libjemalloc_pic.a  src/wallet/libwallet.a  src/libserver.a  src/wallet/libwallet.a  /usr/lib/x86_64-linux-gnu/libdb_cxx.so  /usr/lib/x86_64-linux-gnu/libsqlite3.so  src/libbitcoinconsensus.a  src/libscript.a  src/libcommon.a  src/libbitcoinconsensus.a  src/libscript.a  src/libcommon.a  src/secp256k1/libsecp256k1.a  src/leveldb/libleveldb.a  src/leveldb/libleveldb-sse4.2.a  src/leveldb/libmemenv.a  /usr/lib/x86_64-linux-gnu/libevent_pthreads.so  /usr/lib/x86_64-linux-gnu/libminiupnpc.so  src/zmq/libzmq.a  /usr/lib/x86_64-linux-gnu/libzmq.so  chronik/libchronik.a  chronik/libchronik_lib.a  src/libutil.a  src/univalue/libunivalue.a  /usr/lib/x86_64-linux-gnu/libevent.so  src/crypto/libcrypto.a  src/crypto/libcrypto_sse4.1.a  src/crypto/libcrypto_avx2.a  src/crypto/libcrypto_shani.a  /usr/lib/x86_64-linux-gnu/libjemalloc_pic.a  -ldl  /usr/lib/x86_64-linux-gnu/libboost_filesystem.so  /usr/lib/x86_64-linux-gnu/libboost_thread.so  -pthread  /usr/lib/x86_64-linux-gnu/libboost_chrono.so  /usr/lib/x86_64-linux-gnu/libboost_system.so  /usr/lib/x86_64-linux-gnu/libboost_date_time.so  /usr/lib/x86_64-linux-gnu/libboost_atomic.so  -lrt  -lpthread  -lgcc_s  -lc  -lm && :
chronik/libchronik_lib.a(chronik_bridge-a206f2c68003fd3a.chronik_bridge.6e348c3f-cgu.0.rcgu.o):chronik_bridge.6e348c3f-cgu.0:function chronik_bridge::ffi::ffi_inner::log_println: error: undefined reference to 'chronik_bridge$cxxbridge1$log_println'
collect2: error: ld returned 1 exit status
[484/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/optionsdialog.cpp.o
[485/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/optionsmodel.cpp.o
[486/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/addressbookpage.cpp.o
[487/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/utilitydialog.cpp.o
[488/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/createwalletdialog.cpp.o
[489/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/coincontroltreewidget.cpp.o
[490/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/peertablemodel.cpp.o
[491/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/trafficgraphwidget.cpp.o
[492/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/editaddressdialog.cpp.o
[493/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qrc_bitcoin_locale.cpp.o
[494/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/openuridialog.cpp.o
[495/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qrimagewidget.cpp.o
[496/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/askpassphrasedialog.cpp.o
[497/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/splashscreen.cpp.o
[498/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/addresstablemodel.cpp.o
[499/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactionfilterproxy.cpp.o
[500/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/overviewpage.cpp.o
[501/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/receiverequestdialog.cpp.o
[502/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactiondescdialog.cpp.o
[503/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/recentrequeststablemodel.cpp.o
[504/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/coincontroldialog.cpp.o
[505/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/receivecoinsdialog.cpp.o
[506/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/sendcoinsentry.cpp.o
[507/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/rpcconsole.cpp.o
[508/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactionrecord.cpp.o
[509/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/paymentserver.cpp.o
[510/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactionview.cpp.o
[511/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/signverifymessagedialog.cpp.o
[512/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletmodeltransaction.cpp.o
[513/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactiondesc.cpp.o
[514/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletframe.cpp.o
[515/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactiontablemodel.cpp.o
[516/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/paymentrequestplus.cpp.o
[517/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/sendcoinsdialog.cpp.o
[518/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletcontroller.cpp.o
[519/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletview.cpp.o
[520/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletmodel.cpp.o
[521/526] Linking CXX static library src/qt/libbitcoin-qt-base.a
[522/526] Automatic MOC for target bitcoin-qt
[523/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt.dir/bitcoin-qt_autogen/mocs_compilation.cpp.o
[524/526] Building CXX object src/qt/CMakeFiles/bitcoin-qt.dir/main.cpp.o
[525/526] Linking CXX executable src/qt/bitcoin-qt
FAILED: src/qt/bitcoin-qt 
: && /usr/bin/c++ -g -O2 -fuse-ld=gold -Wl,-z,relro -Wl,-z,now -fPIE -pie src/qt/CMakeFiles/bitcoin-qt.dir/bitcoin-qt_autogen/mocs_compilation.cpp.o src/qt/CMakeFiles/bitcoin-qt.dir/main.cpp.o -o src/qt/bitcoin-qt  /usr/lib/x86_64-linux-gnu/libjemalloc_pic.a  src/qt/libbitcoin-qt-base.a  src/libserver.a  src/leveldb/libleveldb.a  src/leveldb/libleveldb-sse4.2.a  src/leveldb/libmemenv.a  /usr/lib/x86_64-linux-gnu/libevent_pthreads.so  /usr/lib/x86_64-linux-gnu/libminiupnpc.so  src/zmq/libzmq.a  /usr/lib/x86_64-linux-gnu/libzmq.so  chronik/libchronik.a  chronik/libchronik_lib.a  -lrt  -lpthread  -lgcc_s  -lc  src/librpcclient.a  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.11.3  /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.11.3  /usr/lib/x86_64-linux-gnu/libQt5Network.so.5.11.3  /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5.11.3  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.11.3  /usr/lib/x86_64-linux-gnu/libssl.so  /usr/lib/x86_64-linux-gnu/libcrypto.so  /usr/lib/x86_64-linux-gnu/libprotobuf.so  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  /usr/lib/x86_64-linux-gnu/libevent.so  src/crypto/libcrypto.a  src/crypto/libcrypto_sse4.1.a  src/crypto/libcrypto_avx2.a  src/crypto/libcrypto_shani.a  /usr/lib/x86_64-linux-gnu/libboost_filesystem.so  /usr/lib/x86_64-linux-gnu/libboost_thread.so  /usr/lib/x86_64-linux-gnu/libboost_chrono.so  /usr/lib/x86_64-linux-gnu/libboost_system.so  /usr/lib/x86_64-linux-gnu/libboost_date_time.so  /usr/lib/x86_64-linux-gnu/libboost_atomic.so  src/secp256k1/libsecp256k1.a  src/univalue/libunivalue.a  /usr/lib/x86_64-linux-gnu/libjemalloc_pic.a  -lm  -pthread  -ldl  /usr/lib/x86_64-linux-gnu/libdb_cxx.so  /usr/lib/x86_64-linux-gnu/libsqlite3.so  /usr/lib/x86_64-linux-gnu/libqrencode.so && :
chronik/libchronik_lib.a(chronik_bridge-a206f2c68003fd3a.chronik_bridge.6e348c3f-cgu.0.rcgu.o):chronik_bridge.6e348c3f-cgu.0:function chronik_bridge::ffi::ffi_inner::log_println: error: undefined reference to 'chronik_bridge$cxxbridge1$log_println'
collect2: error: ld returned 1 exit status
ninja: build stopped: cannot make progress due to previous errors.
Build build-chronik failed with exit code 1
Fabien requested changes to this revision.Sep 2 2022, 14:16

The chronik build failed, back to your queue

This revision now requires changes to proceed.Sep 2 2022, 14:16

Fix gcc linker issue

Note: This was quite tricky to solve, and Fabien and I aren't sure yet why this fixes it.
In short, somehow lld (with clang) compiles fine, whereas ld and gold fail to compile it.

This *might* be a bug with either of the linkers, and we'll need more investigation.

Fabien's guess is that the symbols are not propagated to libchronik.a because it doesn't use it (he checked and it's not in the lib)
and gets optimized out or something like that.

My guess is as good as yours.

I left a "TODO" comment in CMake so maybe someone wiser than us can stumble over it and solve it, or it gets fixed in either of the
two linkers.

tobias_ruck edited the summary of this revision. (Show Details)

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

Tail of the build log:

9ea64e9760f2c7832f1c9840923947915361acb22dcc0bae440494be0d51842d
ae60f62b336c6a948f95af123bc25574b0c5f423d1cab8f795d3bf8f895457f3
cbd77dad2ebc525c591ab44a0f6a25803c1d934c3e5caa61f9f4c63c9f29a4e6
a7cd6e76b5766cf4fc2251da4a01668682a1786d4b76539e04d7f79cebeb5983
848c146066af1c5187a3c5e73ceaaf7f2f1c39972410cbd1b0f2fb1793382e74
333c462a0161e9146da55d77733a2d4ccd022217a70beb0047425069f1d32ed5
6b7d6b32a88e68e830454bb0189ac14dc938917bdc64f22ef11dd41535ede85a
d4e2673f9df2e5c506892f3794b986910c77aa9b0c292cdcfea83dd804008b00
fefa0e3d8f76358431caba523ac71faaf57921bb6f1049f74a3e8bebd512c20b
a9f6b78b97a01d21d47b834bb8bf5d9397f50bfac115ec3da05b695189aef040
89796be200e6eeeefdb894e47f16653afc572310d5f94c859cac628ffc0d9781
77db71b3099331de1e09262d03ee4a5f2d2c21f5abc48f68e28d456cecc822ce
3663e72aae7fe4dacde5aa6d5e6f2a3041171d9e7756a47662e1e0a11e82621c
cbd77dad2ebc525c591ab44a0f6a25803c1d934c3e5caa61f9f4c63c9f29a4e6
38f7c9696f9c2c07db3f23024d550a6b0b7f851013074280dbe349f42a2a5a00
979dbc3b1351ee12f91f537e04e61fdf93a73d5ebfc317bccd12643b8be87b02
e01bac293ed39e8d5e06214e7fe0bceb9646ef253ce501dcd7a475f802ab07f1
ebf52f8d3c845761e55ef145a37537162e5fbbcc87c58a5b0040d0a9c89003c4
8542635d83f8020bc781d9e8a3de53c23f5e3f77c21588719b58b6618ee1782b
6ba2a3ff986d5bc4457da693096bab408cfd8cf4e988e5ac013fe48a4e2961c9
cdcdd71605139f49d4884b0c3d9a6be309f07b008a760bb3b25fcfcb7a3ffc46
5d4919b43a1afb6acdeddaf1678397eaa10562125db6b911ec4e35fd8598ad73
526e0e5aef9d857d8c4c15208cc30b5a00818627eebe06098055a88d57d461b0
8b0640e7bf81f487d90d6b5c3ead4bc41eae418da4e6874618b289124e52ba1e
26ce40e7b5dfc8d3d48d743ed23fa6ff32ca269a59c4fb101b3b48e5d8450465
4b57e163adc5174820ce21eb0e0e9d6565bc00d51bf9f86c58c56947428c2d84
b569969b77b683904a89c3364c667ac434602936548c80352a85ffed4c934cbc
6989ce300064196c177eae6fd73cf3f89719ddedf068e757eb39eb2030baa846
81d217bbfa019439ab6dfbe02b8b703b93eb26e6047a7ee3cc4aba1366286d8d
e33e02f3d608b4a6447c3b3ee283763718716fff02f3a79e3251417bd03b9834
cdcdd71605139f49d4884b0c3d9a6be309f07b008a760bb3b25fcfcb7a3ffc46
c95e3c6417a799dd3085af689ea12fb3d2e1130870fef9f0bdc6d10a27df746a
455f34eb8a00b0799630071c0728481bdb1653035b1484ac33e974aa4ae7db6d
8a2fcc5700a89f37a3726cdf3202353bf61f280815a9df744e3c9de6215a745a
c61ee0416eb9549ea0e09dfd2c6062a11aa5d3ab0adcdf59abcc02dd0de401fc
29deedc94713bbc4d4f88fe96fae6801b91c5ae50601f158fa76a036e18ea468
c24dc13d98d0e0a80c19346b9590368557a66f0f65c0088c179d89eca25107c8
bfc250ca1986177acc779f26eaff80aa8916d23cb3e7e0ce6d3589c4f5ea364c
046e75fa2d7f0868dcfa683bbdf657fc6a49b8f8b0d5c2dfdf90736ded26b076
e66b0ab11de5e2f358d2e1f65b1ebe608e4a1f10a9f5d42f1173b262e1a218a6
ce2812a1decdef0267e0266c68ab53c5ecad292f7b7d0fbd3db9285a08ccd2a1
37a08e004f35d6410b24a5724b8351b41d4e3ac04f285cd76d73a023b2ae5519
1312eff53594f63e61f044c36b2cf2d3e7e44c706f17bfabcf49954741380bbc
de837b44ae2df5408f89dc42039ae53a61ea508a15e214e69a50d940b72e7713
2c90b8359740d675952b570cca76ffb7c1a225984b8c7f47bc27607c58a613b5
289c082f835c2edd24b95e1aee7dbb353dff30cdcaab02d5dc2ac44c57181468
8d97d3ed1884462122976da4706778593fc4b5eaafb859bec0b45f590219f5ba
690cb3d74b5add1cfb7d4cf186426d41117586c57d59da330cc950e2d18d613c
f713dec5d2f798360748914face171d5a45706b9c5f0bc4d561f6e80e098beef
df84548b3a085e29d58ba5e83ad2fd1c9ecbe8595d4240f3f588e52af84cc65b
455f34eb8a00b0799630071c0728481bdb1653035b1484ac33e974aa4ae7db6d
96bd9fee759d81f9bc30e26015d979df3f6046c7a8764582d1a2c5c3d61c2f44

*** 1 failure is detected in the test module "Avalanche Test Suite"
[464/482] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[479/482] Running bitcoin test suite
PASSED: bitcoin test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-linux64 failed with exit code 1

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

Fabien added inline comments.
chronik/CMakeLists.txt
83–85 ↗(On Diff #35050)
88 ↗(On Diff #35050)
100 ↗(On Diff #35050)
116 ↗(On Diff #35050)
This revision is now accepted and ready to land.Sep 20 2022, 19:12

avoid copy pasting the paths

Tail of the build log:

-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wshadow
-- Performing Test have_C__Wshadow - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: filesystem system 
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: thread chrono system date_time atomic 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.1", minimum required is "1.9")  
-- Found Boost: /usr/include (found suitable version "1.67.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 - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /usr/include (found suitable version "3.27.2", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.1", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.6.1") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.61.0 (fe5b13d68 2022-05-18)`
-- Rust Toolchain: 1.61.0-x86_64-unknown-linux-gnu
-- Rust Target: 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 chronik/CMakeLists.txt:87 (add_custom_command):
  add_custom_command Wrong syntax.  A TARGET or OUTPUT must be specified.


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