Page MenuHomePhabricator

[Chronik] Add `/block/:height` HTTP endpoint
ClosedPublic

Authored by tobias_ruck on Mar 1 2023, 01:28.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCb324ac7de644: [Chronik] Add `/block/:height` HTTP endpoint
Summary

WIP for a /block endpoint to query data of a single block

Depends on D13222.

Test Plan

ninja check-crates

Diff Detail

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

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

try setting _LARGEFILE64_SOURCE to appease RocksDB

Failed tests logs:

====== Bitcoin ABC functional tests: chronik_block.py ======

------- Stdout: -------
2023-03-02T21:33:12.849000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20230302_212355/chronik_block_214
2023-03-02T21:33:14.103000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 510, in start_nodes
    node.wait_for_rpc_connection()
  File "/work/test/functional/test_framework/test_node.py", line 310, in wait_for_rpc_connection
    raise FailedToStartError(self._node_msg(
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status 1 during initialization

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 135, in main
    self.setup()
  File "/work/test/functional/test_framework/test_framework.py", line 275, in setup
    self.setup_network()
  File "/work/test/functional/test_framework/test_framework.py", line 379, in setup_network
    self.setup_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 404, in setup_nodes
    self.start_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 513, in start_nodes
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 529, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 453, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/test_node.py", line 235, in __getattr__
    assert self.rpc is not None, self._node_msg(
AssertionError: [node 0] Error: RPC not initialized
2023-03-02T21:33:14.154000Z TestFramework (INFO): Stopping nodes
[node 0] Cleaning up leftover process
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/chronik_block.py", line 86, in <module>
    ChronikServeTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 159, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 290, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 529, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 453, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/test_node.py", line 235, in __getattr__
    assert self.rpc is not None, self._node_msg(
AssertionError: [node 0] Error: RPC not initialized
====== Bitcoin ABC functional tests: chronik_serve.py ======

------- Stdout: -------
2023-03-02T21:32:13.920000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20230302_212355/chronik_serve_139
2023-03-02T21:32:15.174000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 510, in start_nodes
    node.wait_for_rpc_connection()
  File "/work/test/functional/test_framework/test_node.py", line 310, in wait_for_rpc_connection
    raise FailedToStartError(self._node_msg(
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status 1 during initialization

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 135, in main
    self.setup()
  File "/work/test/functional/test_framework/test_framework.py", line 275, in setup
    self.setup_network()
  File "/work/test/functional/test_framework/test_framework.py", line 379, in setup_network
    self.setup_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 404, in setup_nodes
    self.start_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 513, in start_nodes
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 529, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 453, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/test_node.py", line 235, in __getattr__
    assert self.rpc is not None, self._node_msg(
AssertionError: [node 0] Error: RPC not initialized
2023-03-02T21:32:15.225000Z TestFramework (INFO): Stopping nodes
[node 0] Cleaning up leftover process
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/chronik_serve.py", line 54, in <module>
    ChronikServeTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 159, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 290, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 529, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 453, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/test_node.py", line 235, in __getattr__
    assert self.rpc is not None, self._node_msg(
AssertionError: [node 0] Error: RPC not initialized

Each failure log is accessible here:
Bitcoin ABC functional tests: chronik_block.py
Bitcoin ABC functional tests: chronik_serve.py

use custom RocksDB dependency which maybe fixed the arm build

Tail of the build log:

-- 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.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-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.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.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-5.3.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.34.1", 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.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- 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   
-- Rust Toolchain: 1.67.1-x86_64-unknown-linux-gnu
-- Rust Target: x86_64-unknown-linux-gnu
-- Found Rust: /root/.rustup/toolchains/1.67.1-x86_64-unknown-linux-gnu/bin/rustc (found version "1.67.1") 
Error: CargoMetadata { stderr: "error: failed to load manifest for workspace member `/work/chronik/chronik-db`\n\nCaused by:\n  failed to parse manifest at `/work/chronik/chronik-db/Cargo.toml`\n\nCaused by:\n  dependency (rocksdb) specification is ambiguous. Only one of `branch`, `tag` or `rev` is allowed.\n" }
CMake Error at /usr/local/share/cmake/Corrosion.cmake:1072 (message):
  corrosion-generator failed: 1
Call Stack (most recent call first):
  chronik/CMakeLists.txt:78 (corrosion_import_crate)


-- 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

Tail of the build log:

--   libboost_filesystem-mt-a32.a
-- Adding boost_filesystem dependencies: headers
-- Found Boost: /work/depends/arm-linux-gnueabihf/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/arm-linux-gnueabihf/lib/cmake/Boost-1.70.0
--   Requested configuration: QUIET REQUIRED COMPONENTS thread
-- Found boost_thread 1.70.0 at /work/depends/arm-linux-gnueabihf/lib/cmake/boost_thread-1.70.0
--   libboost_thread-mt-a32.a
-- Adding boost_thread dependencies: headers
-- Found Boost: /work/depends/arm-linux-gnueabihf/lib/cmake/Boost-1.70.0/BoostConfig.cmake (found suitable version "1.70.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /work/depends/arm-linux-gnueabihf/lib/libevent_pthreads.a
-- Found Event: /work/depends/arm-linux-gnueabihf/include (found suitable version "99.99.99", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /work/depends/arm-linux-gnueabihf/lib/libminiupnpc.a
-- Found MiniUPnPc: /work/depends/arm-linux-gnueabihf/include/miniupnpc (found suitable version "2.0.20180203", minimum required is "1.9")  
-- Found NATPMP component natpmp: /work/depends/arm-linux-gnueabihf/lib/libnatpmp.a
-- Found NATPMP: /work/depends/arm-linux-gnueabihf/include   
-- Found Boost 1.70.0 at /work/depends/arm-linux-gnueabihf/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/arm-linux-gnueabihf/lib/cmake/boost_unit_test_framework-1.70.0
--   libboost_unit_test_framework-mt-a32.a
-- Adding boost_unit_test_framework dependencies: headers
-- Found Boost: /work/depends/arm-linux-gnueabihf/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/arm-linux-gnueabihf/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/arm-linux-gnueabihf/lib/cmake/boost_unit_test_framework-1.70.0
--   libboost_unit_test_framework-mt-a32.a
-- Adding boost_unit_test_framework dependencies: headers
-- Found Boost 1.70.0 at /work/depends/arm-linux-gnueabihf/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/arm-linux-gnueabihf/lib/cmake/boost_unit_test_framework-1.70.0
--   libboost_unit_test_framework-mt-a32.a
-- Adding boost_unit_test_framework dependencies: headers
-- Found BerkeleyDB component CXX: /work/depends/arm-linux-gnueabihf/lib/libdb_cxx-5.3.a
-- Found BerkeleyDB: /work/depends/arm-linux-gnueabihf/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /work/depends/arm-linux-gnueabihf/include (found suitable version "3.32.1", minimum required is "3.7.17") 
-- Found Boost 1.70.0 at /work/depends/arm-linux-gnueabihf/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/arm-linux-gnueabihf/lib/cmake/boost_unit_test_framework-1.70.0
--   libboost_unit_test_framework-mt-a32.a
-- Adding boost_unit_test_framework dependencies: headers
-- Found Protobuf: /work/depends/arm-linux-gnueabihf/lib/libprotobuf.a;-pthread (found version "3.21.12") 
-- Found OpenSSL: /work/depends/arm-linux-gnueabihf/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/arm-linux-gnueabihf/lib/libqrencode.a
-- Found QREncode: /work/depends/arm-linux-gnueabihf/include   
-- Rust Toolchain: 1.67.1-x86_64-unknown-linux-gnu
-- Found Rust: /root/.rustup/toolchains/1.67.1-x86_64-unknown-linux-gnu/bin/rustc (found version "1.67.1") 
Error: CargoMetadata { stderr: "error: failed to load manifest for workspace member `/work/chronik/chronik-db`\n\nCaused by:\n  failed to parse manifest at `/work/chronik/chronik-db/Cargo.toml`\n\nCaused by:\n  dependency (rocksdb) specification is ambiguous. Only one of `branch`, `tag` or `rev` is allowed.\n" }
CMake Error at /usr/local/share/cmake/Corrosion.cmake:1072 (message):
  corrosion-generator failed: 1
Call Stack (most recent call first):
  chronik/CMakeLists.txt:78 (corrosion_import_crate)


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

use custom RocksDB fork dependency

Failed tests logs:

====== Bitcoin ABC functional tests: chronik_block.py ======

------- Stdout: -------
2023-03-03T01:40:59.144000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20230303_013136/chronik_block_214
2023-03-03T01:41:30.031000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 510, in start_nodes
    node.wait_for_rpc_connection()
  File "/work/test/functional/test_framework/test_node.py", line 310, in wait_for_rpc_connection
    raise FailedToStartError(self._node_msg(
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status 1 during initialization

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 135, in main
    self.setup()
  File "/work/test/functional/test_framework/test_framework.py", line 275, in setup
    self.setup_network()
  File "/work/test/functional/test_framework/test_framework.py", line 379, in setup_network
    self.setup_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 404, in setup_nodes
    self.start_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 513, in start_nodes
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 529, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 453, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/test_node.py", line 235, in __getattr__
    assert self.rpc is not None, self._node_msg(
AssertionError: [node 0] Error: RPC not initialized
2023-03-03T01:41:30.083000Z TestFramework (INFO): Stopping nodes
[node 0] Cleaning up leftover process
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/chronik_block.py", line 86, in <module>
    ChronikServeTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 159, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 290, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 529, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 453, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/test_node.py", line 235, in __getattr__
    assert self.rpc is not None, self._node_msg(
AssertionError: [node 0] Error: RPC not initialized
====== Bitcoin ABC functional tests: chronik_serve.py ======

------- Stdout: -------
2023-03-03T01:39:55.497000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20230303_013136/chronik_serve_139
2023-03-03T01:40:26.847000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 510, in start_nodes
    node.wait_for_rpc_connection()
  File "/work/test/functional/test_framework/test_node.py", line 310, in wait_for_rpc_connection
    raise FailedToStartError(self._node_msg(
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status 1 during initialization

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 135, in main
    self.setup()
  File "/work/test/functional/test_framework/test_framework.py", line 275, in setup
    self.setup_network()
  File "/work/test/functional/test_framework/test_framework.py", line 379, in setup_network
    self.setup_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 404, in setup_nodes
    self.start_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 513, in start_nodes
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 529, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 453, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/test_node.py", line 235, in __getattr__
    assert self.rpc is not None, self._node_msg(
AssertionError: [node 0] Error: RPC not initialized
2023-03-03T01:40:26.898000Z TestFramework (INFO): Stopping nodes
[node 0] Cleaning up leftover process
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/chronik_serve.py", line 54, in <module>
    ChronikServeTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 159, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 290, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 529, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 453, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/test_node.py", line 235, in __getattr__
    assert self.rpc is not None, self._node_msg(
AssertionError: [node 0] Error: RPC not initialized

Each failure log is accessible here:
Bitcoin ABC functional tests: chronik_block.py
Bitcoin ABC functional tests: chronik_serve.py

use rocksdb fork that unconditionally compiles _LARGEFILE64_SOURCE=1

Failed tests logs:

====== Bitcoin ABC functional tests: abc_p2p_avalanche_voting.py ======

------- Stdout: -------
2023-03-03T01:59:52.819000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20230303_015754/abc_p2p_avalanche_voting_15
2023-03-03T02:00:04.921000Z TestFramework (INFO): Poll for the chain tip...
2023-03-03T02:00:04.978000Z TestFramework (INFO): Poll for a selection of blocks...
2023-03-03T02:00:05.045000Z TestFramework (INFO): Poll for a selection of blocks, but some are now invalid...
2023-03-03T02:00:08.968000Z TestFramework (INFO): Poll for unknown blocks...
2023-03-03T02:00:09.541000Z TestFramework (INFO): Trigger polling from the node...
2023-03-03T02:00:16.649000Z TestFramework (INFO): Answer all polls to finalize...
2023-03-03T02:00:29.910000Z TestFramework (INFO): Answer all polls to park...
2023-03-03T02:00:38.865000Z TestFramework (INFO): Verify finalization sticks...
2023-03-03T02:00:38.865000Z TestFramework (INFO): ...for a chain 1 block long...
2023-03-03T02:00:38.993000Z TestFramework (INFO): ...for a chain 2 blocks long...
2023-03-03T02:00:39.164000Z TestFramework (INFO): ...for a chain 3 blocks long...
2023-03-03T02:00:39.359000Z TestFramework (INFO): ...for a chain 4 blocks long...
2023-03-03T02:00:39.558000Z TestFramework (INFO): ...for a chain 5 blocks long...
2023-03-03T02:00:39.800000Z TestFramework (INFO): Check the node is discouraging unexpected avaresponses.
2023-03-03T02:00:41.801000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 136, in main
    self.run_test()
  File "/work/test/functional/abc_p2p_avalanche_voting.py", line 331, in run_test
    poll_node.send_avaresponse(
  File "/usr/lib/python3.9/contextlib.py", line 124, in __exit__
    next(self.gen)
  File "/work/test/functional/test_framework/test_node.py", line 558, in assert_debug_log
    self._raise_assertion_error(
  File "/work/test/functional/test_framework/test_node.py", line 217, in _raise_assertion_error
    raise AssertionError(self._node_msg(msg))
AssertionError: [node 0] Expected messages "['Misbehaving', 'peer=1 (0 -> 2): unexpected-ava-response']" does not partially match log:

 - 2023-03-03T02:00:39.827842Z [../../src/net_processing.cpp:3530] [ProcessMessage] received: avaresponse (77 bytes) peer=1
 - 2023-03-03T02:00:39.828779Z [../../src/net_processing.cpp:1977] [Misbehaving] Misbehaving: peer=1 (2 -> 4): unexpected-ava-response
 - 2023-03-03T02:00:39.850000Z [../../src/net.cpp:3492] [PushMessage] sending avapoll (333 bytes) peer=1
 - 2023-03-03T02:00:39.988376Z [../../src/./net.h:1061] [StartExtraBlockRelayPeers] net: enabling extra block-relay-only peers


2023-03-03T02:00:41.852000Z TestFramework (INFO): Stopping nodes
2023-03-03T02:00:42.162000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20230303_015754/abc_p2p_avalanche_voting_15
2023-03-03T02:00:42.162000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20230303_015754/abc_p2p_avalanche_voting_15/test_framework.log
2023-03-03T02:00:42.162000Z TestFramework (ERROR): 
2023-03-03T02:00:42.162000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20230303_015754/abc_p2p_avalanche_voting_15' to consolidate all logs
2023-03-03T02:00:42.162000Z TestFramework (ERROR): 
2023-03-03T02:00:42.162000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2023-03-03T02:00:42.163000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2023-03-03T02:00:42.163000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: abc_p2p_avalanche_voting.py

Failed tests logs:

====== Bitcoin ABC functional tests: abc_p2p_avalanche_voting.py ======

------- Stdout: -------
2023-03-03T02:16:04.403000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20230303_021358/abc_p2p_avalanche_voting_15
2023-03-03T02:16:16.950000Z TestFramework (INFO): Poll for the chain tip...
2023-03-03T02:16:17.007000Z TestFramework (INFO): Poll for a selection of blocks...
2023-03-03T02:16:17.073000Z TestFramework (INFO): Poll for a selection of blocks, but some are now invalid...
2023-03-03T02:16:18.598000Z TestFramework (INFO): Poll for unknown blocks...
2023-03-03T02:16:18.660000Z TestFramework (INFO): Trigger polling from the node...
2023-03-03T02:16:19.669000Z TestFramework (INFO): Answer all polls to finalize...
2023-03-03T02:16:28.750000Z TestFramework (INFO): Answer all polls to park...
2023-03-03T02:16:57.688000Z TestFramework (INFO): Verify finalization sticks...
2023-03-03T02:16:57.688000Z TestFramework (INFO): ...for a chain 1 block long...
2023-03-03T02:16:57.825000Z TestFramework (INFO): ...for a chain 2 blocks long...
2023-03-03T02:16:57.934000Z TestFramework (INFO): ...for a chain 3 blocks long...
2023-03-03T02:16:58.183000Z TestFramework (INFO): ...for a chain 4 blocks long...
2023-03-03T02:16:58.521000Z TestFramework (INFO): ...for a chain 5 blocks long...
2023-03-03T02:16:58.855000Z TestFramework (INFO): Check the node is discouraging unexpected avaresponses.
2023-03-03T02:17:00.895000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 136, in main
    self.run_test()
  File "/work/test/functional/abc_p2p_avalanche_voting.py", line 331, in run_test
    poll_node.send_avaresponse(
  File "/usr/lib/python3.9/contextlib.py", line 124, in __exit__
    next(self.gen)
  File "/work/test/functional/test_framework/test_node.py", line 558, in assert_debug_log
    self._raise_assertion_error(
  File "/work/test/functional/test_framework/test_node.py", line 217, in _raise_assertion_error
    raise AssertionError(self._node_msg(msg))
AssertionError: [node 0] Expected messages "['Misbehaving', 'peer=1 (0 -> 2): unexpected-ava-response']" does not partially match log:

 - 2023-03-03T02:16:58.875669Z [../../src/net_processing.cpp:3530] [ProcessMessage] received: avaresponse (77 bytes) peer=1
 - 2023-03-03T02:16:58.876566Z [../../src/net_processing.cpp:1977] [Misbehaving] Misbehaving: peer=1 (2 -> 4): unexpected-ava-response
 - 2023-03-03T02:16:58.905881Z [../../src/net.cpp:3492] [PushMessage] sending avapoll (333 bytes) peer=1


2023-03-03T02:17:00.946000Z TestFramework (INFO): Stopping nodes
2023-03-03T02:17:01.158000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20230303_021358/abc_p2p_avalanche_voting_15
2023-03-03T02:17:01.158000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20230303_021358/abc_p2p_avalanche_voting_15/test_framework.log
2023-03-03T02:17:01.158000Z TestFramework (ERROR): 
2023-03-03T02:17:01.158000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20230303_021358/abc_p2p_avalanche_voting_15' to consolidate all logs
2023-03-03T02:17:01.158000Z TestFramework (ERROR): 
2023-03-03T02:17:01.158000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2023-03-03T02:17:01.158000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2023-03-03T02:17:01.158000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: abc_p2p_avalanche_voting.py

Use correct custom RocksDB revision

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-5.3.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 "3.21.12") 
-- 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.67.1-x86_64-unknown-linux-gnu
-- Found Rust: /root/.rustup/toolchains/1.67.1-x86_64-unknown-linux-gnu/bin/rustc (found version "1.67.1") 
-- Found NTDLL component ntdll: /usr/x86_64-w64-mingw32/lib/libntdll.a
-- Found NTDLL: /usr/x86_64-w64-mingw32/include   
-- Configuring native build in /work/abc-ci-builds/build-win64/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
RPC_LIBRARY
    linked by target "chronik" in directory /work/chronik

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

fix if(... MATCHES "arm"), remove unneeded constant set for RocksDB on 32-bit in src/CMakeLists.txt

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

cmake/modules/FindRPCRT4.cmake
1 ↗(On Diff #38267)

Macro whatyearisit:

20 ↗(On Diff #38267)

Macro huhdog:

test/functional/chronik_block.py
2 ↗(On Diff #38267)

dito

Fabien requested changes to this revision.Mar 7 2023, 19:29

clearing my queue, pending a rocksdb upstream fix

This revision now requires changes to proceed.Mar 7 2023, 19:29

Merge ffi::Block and ffi::BlockHeader into just ffi::Block, use rust-rocksdb git dependency (fixed arm build upstream), use add_linker_flag to add -latomic.

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

Tail of the build log:

/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: version_edit_handler.cc:(.text._ZN7rocksdb19DumpManifestHandler20CheckIterationResultERKNS_3log6ReaderEPNS_6StatusE+0x1e0): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: version_edit_handler.cc:(.text._ZN7rocksdb19DumpManifestHandler20CheckIterationResultERKNS_3log6ReaderEPNS_6StatusE+0x20c): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(cuckoo_table_builder.o): in function `rocksdb::CuckooTableBuilder::FileSize() const [clone .localalias]':
cuckoo_table_builder.cc:(.text._ZNK7rocksdb18CuckooTableBuilder8FileSizeEv+0x90): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(point_lock_manager.o): in function `rocksdb::PointLockManager::UnLockKey(rocksdb::PessimisticTransaction*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::LockMapStripe*, rocksdb::LockMap*, rocksdb::Env*)':
point_lock_manager.cc:(.text._ZN7rocksdb16PointLockManager9UnLockKeyEPNS_22PessimisticTransactionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_13LockMapStripeEPNS_7LockMapEPNS_3EnvE+0x1f4): undefined reference to `__atomic_fetch_sub_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(point_lock_manager.o): in function `rocksdb::PointLockManager::AcquireLocked(rocksdb::LockMap*, rocksdb::LockMapStripe*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::Env*, rocksdb::LockInfo const&, unsigned long long*, rocksdb::autovector<unsigned long long, 8u>*)':
point_lock_manager.cc:(.text._ZN7rocksdb16PointLockManager13AcquireLockedEPNS_7LockMapEPNS_13LockMapStripeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_3EnvERKNS_8LockInfoEPyPNS_10autovectorIyLj8EEE+0x158): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: point_lock_manager.cc:(.text._ZN7rocksdb16PointLockManager13AcquireLockedEPNS_7LockMapEPNS_13LockMapStripeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_3EnvERKNS_8LockInfoEPyPNS_10autovectorIyLj8EEE+0x1c8): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(pessimistic_transaction.o): in function `rocksdb::PessimisticTransaction::GenTxnID()':
pessimistic_transaction.cc:(.text._ZN7rocksdb22PessimisticTransaction8GenTxnIDEv+0x28): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(write_prepared_txn.o): in function `rocksdb::WritePreparedTxn::MultiGet(rocksdb::ReadOptions const&, rocksdb::ColumnFamilyHandle*, unsigned int, rocksdb::Slice const*, rocksdb::PinnableSlice*, rocksdb::Status*, bool)':
write_prepared_txn.cc:(.text._ZN7rocksdb16WritePreparedTxn8MultiGetERKNS_11ReadOptionsEPNS_18ColumnFamilyHandleEjPKNS_5SliceEPNS_13PinnableSliceEPNS_6StatusEb+0x174): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: write_prepared_txn.cc:(.text._ZN7rocksdb16WritePreparedTxn8MultiGetERKNS_11ReadOptionsEPNS_18ColumnFamilyHandleEjPKNS_5SliceEPNS_13PinnableSliceEPNS_6StatusEb+0x24c): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(write_prepared_txn.o): in function `rocksdb::WritePreparedTxn::Get(rocksdb::ReadOptions const&, rocksdb::ColumnFamilyHandle*, rocksdb::Slice const&, rocksdb::PinnableSlice*)':
write_prepared_txn.cc:(.text._ZN7rocksdb16WritePreparedTxn3GetERKNS_11ReadOptionsEPNS_18ColumnFamilyHandleERKNS_5SliceEPNS_13PinnableSliceE+0xcc): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: write_prepared_txn.cc:(.text._ZN7rocksdb16WritePreparedTxn3GetERKNS_11ReadOptionsEPNS_18ColumnFamilyHandleERKNS_5SliceEPNS_13PinnableSliceE+0x178): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(write_unprepared_txn.o): in function `rocksdb::WriteUnpreparedTxn::MultiGet(rocksdb::ReadOptions const&, rocksdb::ColumnFamilyHandle*, unsigned int, rocksdb::Slice const*, rocksdb::PinnableSlice*, rocksdb::Status*, bool)':
write_unprepared_txn.cc:(.text._ZN7rocksdb18WriteUnpreparedTxn8MultiGetERKNS_11ReadOptionsEPNS_18ColumnFamilyHandleEjPKNS_5SliceEPNS_13PinnableSliceEPNS_6StatusEb+0x130): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(write_unprepared_txn.o):write_unprepared_txn.cc:(.text._ZN7rocksdb18WriteUnpreparedTxn8MultiGetERKNS_11ReadOptionsEPNS_18ColumnFamilyHandleEjPKNS_5SliceEPNS_13PinnableSliceEPNS_6StatusEb+0x228): more undefined references to `__atomic_load_8' follow
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(blob_file_builder.o): in function `std::_Function_handler<unsigned long long (), rocksdb::BlobFileBuilder::BlobFileBuilder(rocksdb::VersionSet*, rocksdb::FileSystem*, rocksdb::ImmutableOptions const*, rocksdb::MutableCFOptions const*, rocksdb::FileOptions const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::Env::IOPriority, rocksdb::Env::WriteLifeTimeHint, std::shared_ptr<rocksdb::IOTracer> const&, rocksdb::BlobFileCompletionCallback*, rocksdb::BlobFileCreationReason, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*, std::vector<rocksdb::BlobFileAddition, std::allocator<rocksdb::BlobFileAddition> >*)::{lambda()#1}>::_M_invoke(std::_Any_data const&)':
blob_file_builder.cc:(.text._ZNSt17_Function_handlerIFyvEZN7rocksdb15BlobFileBuilderC4EPNS1_10VersionSetEPNS1_10FileSystemEPKNS1_16ImmutableOptionsEPKNS1_16MutableCFOptionsEPKNS1_11FileOptionsENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESL_ijRKSL_NS1_3Env10IOPriorityENSO_17WriteLifeTimeHintERKSt10shared_ptrINS1_8IOTracerEEPNS1_26BlobFileCompletionCallbackENS1_22BlobFileCreationReasonEPSt6vectorISL_SaISL_EEPSZ_INS1_16BlobFileAdditionESaIS13_EEEUlvE_E9_M_invokeERKSt9_Any_data+0x20): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(blob_file_builder.o): in function `rocksdb::BlobFileBuilder::CloseBlobFileIfNeeded()':
blob_file_builder.cc:(.text._ZN7rocksdb15BlobFileBuilder21CloseBlobFileIfNeededEv+0x1c): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(unique_id_gen.o): in function `rocksdb::SemiStructuredUniqueIdGen::Reset()':
unique_id_gen.cc:(.text._ZN7rocksdb25SemiStructuredUniqueIdGen5ResetEv+0x38): undefined reference to `__atomic_store_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(unique_id_gen.o): in function `rocksdb::SemiStructuredUniqueIdGen::GenerateNext(unsigned long long*, unsigned long long*)':
unique_id_gen.cc:(.text._ZN7rocksdb25SemiStructuredUniqueIdGen12GenerateNextEPyS1_+0x5c): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(rate_limiter.o): in function `rocksdb::RateLimiter::RequestToken(unsigned int, unsigned int, rocksdb::Env::IOPriority, rocksdb::Statistics*, rocksdb::RateLimiter::OpType)':
rate_limiter.cc:(.text._ZN7rocksdb11RateLimiter12RequestTokenEjjNS_3Env10IOPriorityEPNS_10StatisticsENS0_6OpTypeE+0x78): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(rate_limiter.o): in function `rocksdb::GenericRateLimiter::RefillBytesAndGrantRequestsLocked()':
rate_limiter.cc:(.text._ZN7rocksdb18GenericRateLimiter33RefillBytesAndGrantRequestsLockedEv+0x44): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(rate_limiter.o): in function `rocksdb::GenericRateLimiter::SetBytesPerSecondLocked(long long)':
rate_limiter.cc:(.text._ZN7rocksdb18GenericRateLimiter23SetBytesPerSecondLockedEx+0x20): undefined reference to `__atomic_store_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: rate_limiter.cc:(.text._ZN7rocksdb18GenericRateLimiter23SetBytesPerSecondLockedEx+0x44): undefined reference to `__atomic_store_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(rate_limiter.o): in function `rocksdb::GenericRateLimiter::TuneLocked()':
rate_limiter.cc:(.text._ZN7rocksdb18GenericRateLimiter10TuneLockedEv+0xdc): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(rate_limiter.o): in function `rocksdb::GenericRateLimiter::GenericRateLimiter(long long, long long, int, rocksdb::RateLimiter::Mode, std::shared_ptr<rocksdb::SystemClock> const&, bool)':
rate_limiter.cc:(.text._ZN7rocksdb18GenericRateLimiterC2ExxiNS_11RateLimiter4ModeERKSt10shared_ptrINS_11SystemClockEEb+0xa4): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(counted_fs.o): in function `rocksdb::(anonymous namespace)::CountedRandomRWFile::Read(unsigned long long, unsigned int, rocksdb::IOOptions const&, rocksdb::Slice*, char*, rocksdb::IODebugContext*) const':
counted_fs.cc:(.text._ZNK7rocksdb12_GLOBAL__N_119CountedRandomRWFile4ReadEyjRKNS_9IOOptionsEPNS_5SliceEPcPNS_14IODebugContextE+0x94): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(counted_fs.o): in function `rocksdb::(anonymous namespace)::CountedRandomAccessFile::MultiRead(rocksdb::FSReadRequest*, unsigned int, rocksdb::IOOptions const&, rocksdb::IODebugContext*)':
counted_fs.cc:(.text._ZN7rocksdb12_GLOBAL__N_123CountedRandomAccessFile9MultiReadEPNS_13FSReadRequestEjRKNS_9IOOptionsEPNS_14IODebugContextE+0x84): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(counted_fs.o): in function `rocksdb::(anonymous namespace)::CountedWritableFile::Append(rocksdb::Slice const&, rocksdb::IOOptions const&, rocksdb::IODebugContext*)':
counted_fs.cc:(.text._ZN7rocksdb12_GLOBAL__N_119CountedWritableFile6AppendERKNS_5SliceERKNS_9IOOptionsEPNS_14IODebugContextE+0x7c): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(counted_fs.o): in function `rocksdb::(anonymous namespace)::CountedWritableFile::Append(rocksdb::Slice const&, rocksdb::IOOptions const&, rocksdb::DataVerificationInfo const&, rocksdb::IODebugContext*)':
counted_fs.cc:(.text._ZN7rocksdb12_GLOBAL__N_119CountedWritableFile6AppendERKNS_5SliceERKNS_9IOOptionsERKNS_20DataVerificationInfoEPNS_14IODebugContextE+0x7c): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(counted_fs.o): in function `rocksdb::(anonymous namespace)::CountedRandomRWFile::Write(unsigned long long, rocksdb::Slice const&, rocksdb::IOOptions const&, rocksdb::IODebugContext*)':
counted_fs.cc:(.text._ZN7rocksdb12_GLOBAL__N_119CountedRandomRWFile5WriteEyRKNS_5SliceERKNS_9IOOptionsEPNS_14IODebugContextE+0x84): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(counted_fs.o):counted_fs.cc:(.text._ZN7rocksdb12_GLOBAL__N_121CountedSequentialFile4ReadEjRKNS_9IOOptionsEPNS_5SliceEPcPNS_14IODebugContextE+0x84): more undefined references to `__atomic_fetch_add_8' follow
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(counted_fs.o): in function `rocksdb::FileOpCounters::PrintCounters[abi:cxx11]() const':
counted_fs.cc:(.text._ZNK7rocksdb14FileOpCounters13PrintCountersB5cxx11Ev+0x5cc): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: counted_fs.cc:(.text._ZNK7rocksdb14FileOpCounters13PrintCountersB5cxx11Ev+0x634): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(cache_key.o): in function `rocksdb::CacheKey::CreateUniqueForProcessLifetime()':
cache_key.cc:(.text._ZN7rocksdb8CacheKey30CreateUniqueForProcessLifetimeEv+0x24): undefined reference to `__atomic_fetch_sub_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(sharded_cache.o): in function `rocksdb::ShardedCacheBase::NewId()':
sharded_cache.cc:(.text._ZN7rocksdb16ShardedCacheBase5NewIdEv+0x1c): undefined reference to `__atomic_fetch_add_8'
collect2: error: ld returned 1 exit status
ninja: build stopped: cannot make progress due to previous errors.
Build build-linux-arm failed with exit code 1

Use if() and custom_check_linker_flag for -latomic

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

Tail of the build log:

/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: version_edit_handler.cc:(.text._ZN7rocksdb19DumpManifestHandler20CheckIterationResultERKNS_3log6ReaderEPNS_6StatusE+0x1e0): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: version_edit_handler.cc:(.text._ZN7rocksdb19DumpManifestHandler20CheckIterationResultERKNS_3log6ReaderEPNS_6StatusE+0x20c): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(cuckoo_table_builder.o): in function `rocksdb::CuckooTableBuilder::FileSize() const [clone .localalias]':
cuckoo_table_builder.cc:(.text._ZNK7rocksdb18CuckooTableBuilder8FileSizeEv+0x90): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(point_lock_manager.o): in function `rocksdb::PointLockManager::UnLockKey(rocksdb::PessimisticTransaction*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::LockMapStripe*, rocksdb::LockMap*, rocksdb::Env*)':
point_lock_manager.cc:(.text._ZN7rocksdb16PointLockManager9UnLockKeyEPNS_22PessimisticTransactionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_13LockMapStripeEPNS_7LockMapEPNS_3EnvE+0x1f4): undefined reference to `__atomic_fetch_sub_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(point_lock_manager.o): in function `rocksdb::PointLockManager::AcquireLocked(rocksdb::LockMap*, rocksdb::LockMapStripe*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::Env*, rocksdb::LockInfo const&, unsigned long long*, rocksdb::autovector<unsigned long long, 8u>*)':
point_lock_manager.cc:(.text._ZN7rocksdb16PointLockManager13AcquireLockedEPNS_7LockMapEPNS_13LockMapStripeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_3EnvERKNS_8LockInfoEPyPNS_10autovectorIyLj8EEE+0x158): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: point_lock_manager.cc:(.text._ZN7rocksdb16PointLockManager13AcquireLockedEPNS_7LockMapEPNS_13LockMapStripeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_3EnvERKNS_8LockInfoEPyPNS_10autovectorIyLj8EEE+0x1c8): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(pessimistic_transaction.o): in function `rocksdb::PessimisticTransaction::GenTxnID()':
pessimistic_transaction.cc:(.text._ZN7rocksdb22PessimisticTransaction8GenTxnIDEv+0x28): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(write_prepared_txn.o): in function `rocksdb::WritePreparedTxn::MultiGet(rocksdb::ReadOptions const&, rocksdb::ColumnFamilyHandle*, unsigned int, rocksdb::Slice const*, rocksdb::PinnableSlice*, rocksdb::Status*, bool)':
write_prepared_txn.cc:(.text._ZN7rocksdb16WritePreparedTxn8MultiGetERKNS_11ReadOptionsEPNS_18ColumnFamilyHandleEjPKNS_5SliceEPNS_13PinnableSliceEPNS_6StatusEb+0x174): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: write_prepared_txn.cc:(.text._ZN7rocksdb16WritePreparedTxn8MultiGetERKNS_11ReadOptionsEPNS_18ColumnFamilyHandleEjPKNS_5SliceEPNS_13PinnableSliceEPNS_6StatusEb+0x24c): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(write_prepared_txn.o): in function `rocksdb::WritePreparedTxn::Get(rocksdb::ReadOptions const&, rocksdb::ColumnFamilyHandle*, rocksdb::Slice const&, rocksdb::PinnableSlice*)':
write_prepared_txn.cc:(.text._ZN7rocksdb16WritePreparedTxn3GetERKNS_11ReadOptionsEPNS_18ColumnFamilyHandleERKNS_5SliceEPNS_13PinnableSliceE+0xcc): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: write_prepared_txn.cc:(.text._ZN7rocksdb16WritePreparedTxn3GetERKNS_11ReadOptionsEPNS_18ColumnFamilyHandleERKNS_5SliceEPNS_13PinnableSliceE+0x178): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(write_unprepared_txn.o): in function `rocksdb::WriteUnpreparedTxn::MultiGet(rocksdb::ReadOptions const&, rocksdb::ColumnFamilyHandle*, unsigned int, rocksdb::Slice const*, rocksdb::PinnableSlice*, rocksdb::Status*, bool)':
write_unprepared_txn.cc:(.text._ZN7rocksdb18WriteUnpreparedTxn8MultiGetERKNS_11ReadOptionsEPNS_18ColumnFamilyHandleEjPKNS_5SliceEPNS_13PinnableSliceEPNS_6StatusEb+0x130): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(write_unprepared_txn.o):write_unprepared_txn.cc:(.text._ZN7rocksdb18WriteUnpreparedTxn8MultiGetERKNS_11ReadOptionsEPNS_18ColumnFamilyHandleEjPKNS_5SliceEPNS_13PinnableSliceEPNS_6StatusEb+0x228): more undefined references to `__atomic_load_8' follow
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(blob_file_builder.o): in function `std::_Function_handler<unsigned long long (), rocksdb::BlobFileBuilder::BlobFileBuilder(rocksdb::VersionSet*, rocksdb::FileSystem*, rocksdb::ImmutableOptions const*, rocksdb::MutableCFOptions const*, rocksdb::FileOptions const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::Env::IOPriority, rocksdb::Env::WriteLifeTimeHint, std::shared_ptr<rocksdb::IOTracer> const&, rocksdb::BlobFileCompletionCallback*, rocksdb::BlobFileCreationReason, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*, std::vector<rocksdb::BlobFileAddition, std::allocator<rocksdb::BlobFileAddition> >*)::{lambda()#1}>::_M_invoke(std::_Any_data const&)':
blob_file_builder.cc:(.text._ZNSt17_Function_handlerIFyvEZN7rocksdb15BlobFileBuilderC4EPNS1_10VersionSetEPNS1_10FileSystemEPKNS1_16ImmutableOptionsEPKNS1_16MutableCFOptionsEPKNS1_11FileOptionsENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESL_ijRKSL_NS1_3Env10IOPriorityENSO_17WriteLifeTimeHintERKSt10shared_ptrINS1_8IOTracerEEPNS1_26BlobFileCompletionCallbackENS1_22BlobFileCreationReasonEPSt6vectorISL_SaISL_EEPSZ_INS1_16BlobFileAdditionESaIS13_EEEUlvE_E9_M_invokeERKSt9_Any_data+0x20): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(blob_file_builder.o): in function `rocksdb::BlobFileBuilder::CloseBlobFileIfNeeded()':
blob_file_builder.cc:(.text._ZN7rocksdb15BlobFileBuilder21CloseBlobFileIfNeededEv+0x1c): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(unique_id_gen.o): in function `rocksdb::SemiStructuredUniqueIdGen::Reset()':
unique_id_gen.cc:(.text._ZN7rocksdb25SemiStructuredUniqueIdGen5ResetEv+0x38): undefined reference to `__atomic_store_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(unique_id_gen.o): in function `rocksdb::SemiStructuredUniqueIdGen::GenerateNext(unsigned long long*, unsigned long long*)':
unique_id_gen.cc:(.text._ZN7rocksdb25SemiStructuredUniqueIdGen12GenerateNextEPyS1_+0x5c): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(rate_limiter.o): in function `rocksdb::RateLimiter::RequestToken(unsigned int, unsigned int, rocksdb::Env::IOPriority, rocksdb::Statistics*, rocksdb::RateLimiter::OpType)':
rate_limiter.cc:(.text._ZN7rocksdb11RateLimiter12RequestTokenEjjNS_3Env10IOPriorityEPNS_10StatisticsENS0_6OpTypeE+0x78): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(rate_limiter.o): in function `rocksdb::GenericRateLimiter::RefillBytesAndGrantRequestsLocked()':
rate_limiter.cc:(.text._ZN7rocksdb18GenericRateLimiter33RefillBytesAndGrantRequestsLockedEv+0x44): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(rate_limiter.o): in function `rocksdb::GenericRateLimiter::SetBytesPerSecondLocked(long long)':
rate_limiter.cc:(.text._ZN7rocksdb18GenericRateLimiter23SetBytesPerSecondLockedEx+0x20): undefined reference to `__atomic_store_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: rate_limiter.cc:(.text._ZN7rocksdb18GenericRateLimiter23SetBytesPerSecondLockedEx+0x44): undefined reference to `__atomic_store_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(rate_limiter.o): in function `rocksdb::GenericRateLimiter::TuneLocked()':
rate_limiter.cc:(.text._ZN7rocksdb18GenericRateLimiter10TuneLockedEv+0xdc): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(rate_limiter.o): in function `rocksdb::GenericRateLimiter::GenericRateLimiter(long long, long long, int, rocksdb::RateLimiter::Mode, std::shared_ptr<rocksdb::SystemClock> const&, bool)':
rate_limiter.cc:(.text._ZN7rocksdb18GenericRateLimiterC2ExxiNS_11RateLimiter4ModeERKSt10shared_ptrINS_11SystemClockEEb+0xa4): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(counted_fs.o): in function `rocksdb::(anonymous namespace)::CountedRandomRWFile::Read(unsigned long long, unsigned int, rocksdb::IOOptions const&, rocksdb::Slice*, char*, rocksdb::IODebugContext*) const':
counted_fs.cc:(.text._ZNK7rocksdb12_GLOBAL__N_119CountedRandomRWFile4ReadEyjRKNS_9IOOptionsEPNS_5SliceEPcPNS_14IODebugContextE+0x94): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(counted_fs.o): in function `rocksdb::(anonymous namespace)::CountedRandomAccessFile::MultiRead(rocksdb::FSReadRequest*, unsigned int, rocksdb::IOOptions const&, rocksdb::IODebugContext*)':
counted_fs.cc:(.text._ZN7rocksdb12_GLOBAL__N_123CountedRandomAccessFile9MultiReadEPNS_13FSReadRequestEjRKNS_9IOOptionsEPNS_14IODebugContextE+0x84): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(counted_fs.o): in function `rocksdb::(anonymous namespace)::CountedWritableFile::Append(rocksdb::Slice const&, rocksdb::IOOptions const&, rocksdb::IODebugContext*)':
counted_fs.cc:(.text._ZN7rocksdb12_GLOBAL__N_119CountedWritableFile6AppendERKNS_5SliceERKNS_9IOOptionsEPNS_14IODebugContextE+0x7c): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(counted_fs.o): in function `rocksdb::(anonymous namespace)::CountedWritableFile::Append(rocksdb::Slice const&, rocksdb::IOOptions const&, rocksdb::DataVerificationInfo const&, rocksdb::IODebugContext*)':
counted_fs.cc:(.text._ZN7rocksdb12_GLOBAL__N_119CountedWritableFile6AppendERKNS_5SliceERKNS_9IOOptionsERKNS_20DataVerificationInfoEPNS_14IODebugContextE+0x7c): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(counted_fs.o): in function `rocksdb::(anonymous namespace)::CountedRandomRWFile::Write(unsigned long long, rocksdb::Slice const&, rocksdb::IOOptions const&, rocksdb::IODebugContext*)':
counted_fs.cc:(.text._ZN7rocksdb12_GLOBAL__N_119CountedRandomRWFile5WriteEyRKNS_5SliceERKNS_9IOOptionsEPNS_14IODebugContextE+0x84): undefined reference to `__atomic_fetch_add_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(counted_fs.o):counted_fs.cc:(.text._ZN7rocksdb12_GLOBAL__N_121CountedSequentialFile4ReadEjRKNS_9IOOptionsEPNS_5SliceEPcPNS_14IODebugContextE+0x84): more undefined references to `__atomic_fetch_add_8' follow
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(counted_fs.o): in function `rocksdb::FileOpCounters::PrintCounters[abi:cxx11]() const':
counted_fs.cc:(.text._ZNK7rocksdb14FileOpCounters13PrintCountersB5cxx11Ev+0x5cc): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: counted_fs.cc:(.text._ZNK7rocksdb14FileOpCounters13PrintCountersB5cxx11Ev+0x634): undefined reference to `__atomic_load_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(cache_key.o): in function `rocksdb::CacheKey::CreateUniqueForProcessLifetime()':
cache_key.cc:(.text._ZN7rocksdb8CacheKey30CreateUniqueForProcessLifetimeEv+0x24): undefined reference to `__atomic_fetch_sub_8'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: chronik/libchronik_lib.a(sharded_cache.o): in function `rocksdb::ShardedCacheBase::NewId()':
sharded_cache.cc:(.text._ZN7rocksdb16ShardedCacheBase5NewIdEv+0x1c): undefined reference to `__atomic_fetch_add_8'
collect2: error: ld returned 1 exit status
ninja: build stopped: cannot make progress due to previous errors.
Build build-linux-arm failed with exit code 1
chronik/CMakeLists.txt
140 ↗(On Diff #38353)

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

Fabien requested changes to this revision.Mar 10 2023, 08:16

Nits and suggestions for tests improvements, but overall looks good

chronik/chronik-db/Cargo.toml
22 ↗(On Diff #38369)

You should put a comment explaining why this is not a version and that it can be updated after the next rocksdb release

test/functional/chronik_block.py
34–35 ↗(On Diff #38369)
40 ↗(On Diff #38369)

you're missing the height

59–68 ↗(On Diff #38369)
84 ↗(On Diff #38369)

You can try to mine a forked block and check it connects as expected

This revision now requires changes to proceed.Mar 10 2023, 08:16

Add comments to chronik-db/Cargo.toml, expand chronik_block.py

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

Fabien added inline comments.
test/functional/chronik_block.py
96 ↗(On Diff #38376)

let's avoid the line continuation here

This revision is now accepted and ready to land.Mar 10 2023, 10:51

remove unnecessary line continuation