Skip to content

Commit 0c30c9c

Browse files
build: update rocksdb to 0.24 (#10922)
Co-authored-by: Gustavo Valverde <g.valverde02@gmail.com>
1 parent b71c35c commit 0c30c9c

8 files changed

Lines changed: 50 additions & 169 deletions

File tree

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
name: 'Setup Zebra Build Environment'
2-
description: 'Install protoc and RocksDB as system libraries'
2+
description: 'Install libclang, protoc, and RocksDB as system libraries'
33
runs:
44
using: 'composite'
55
steps:
6-
- name: Install protoc and librocksdb-dev on Ubuntu
6+
- name: Install libclang, protoc, and librocksdb-dev on Ubuntu
77
if: runner.os == 'Linux'
88
shell: bash
99
run: |
1010
sudo apt-get -qq update
11-
sudo apt-get -qq install -y --no-install-recommends protobuf-compiler librocksdb-dev
11+
# libclang is needed at build time: librocksdb-sys always runs bindgen
12+
# (via clang-sys) to generate FFI bindings, even when linking the system
13+
# RocksDB via ROCKSDB_LIB_DIR.
14+
sudo apt-get -qq install -y --no-install-recommends clang libclang-dev protobuf-compiler librocksdb-dev
1215
echo "ROCKSDB_LIB_DIR=/usr/lib/" >> $GITHUB_ENV

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org).
99

1010
### Changed
1111

12+
- Updated `rocksdb` to 0.24. The bundled `librocksdb-sys` now always runs
13+
`bindgen` to generate its FFI bindings, so **`libclang` is required at build
14+
time** (in addition to `protoc` and a C++ compiler) even when linking a system
15+
RocksDB via `ROCKSDB_LIB_DIR`. Install `libclang-dev` (Debian/Ubuntu),
16+
`clang` (Arch), or the equivalent for your platform.
1217
- Bumped the workspace (libraries) MSRV from 1.85.1 to 1.88. The `zebrad` binary
1318
MSRV is unchanged at 1.91. `home` is no longer pinned to 0.5.11, since 0.5.12
1419
builds on the new MSRV.

Cargo.lock

Lines changed: 10 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -372,26 +372,6 @@ dependencies = [
372372
"serde",
373373
]
374374

375-
[[package]]
376-
name = "bindgen"
377-
version = "0.69.5"
378-
source = "registry+https://github.com/rust-lang/crates.io-index"
379-
checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
380-
dependencies = [
381-
"bitflags",
382-
"cexpr",
383-
"clang-sys",
384-
"itertools 0.12.1",
385-
"lazy_static",
386-
"lazycell",
387-
"proc-macro2",
388-
"quote",
389-
"regex",
390-
"rustc-hash 1.1.0",
391-
"shlex",
392-
"syn 2.0.117",
393-
]
394-
395375
[[package]]
396376
name = "bindgen"
397377
version = "0.72.1"
@@ -405,7 +385,7 @@ dependencies = [
405385
"proc-macro2",
406386
"quote",
407387
"regex",
408-
"rustc-hash 2.1.2",
388+
"rustc-hash",
409389
"shlex",
410390
"syn 2.0.117",
411391
]
@@ -2627,15 +2607,6 @@ dependencies = [
26272607
"either",
26282608
]
26292609

2630-
[[package]]
2631-
name = "itertools"
2632-
version = "0.12.1"
2633-
source = "registry+https://github.com/rust-lang/crates.io-index"
2634-
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
2635-
dependencies = [
2636-
"either",
2637-
]
2638-
26392610
[[package]]
26402611
name = "itertools"
26412612
version = "0.13.0"
@@ -2769,7 +2740,7 @@ dependencies = [
27692740
"jsonrpsee-types",
27702741
"parking_lot",
27712742
"rand 0.8.6",
2772-
"rustc-hash 2.1.2",
2743+
"rustc-hash",
27732744
"serde",
27742745
"serde_json",
27752746
"thiserror 1.0.69",
@@ -2876,12 +2847,6 @@ dependencies = [
28762847
"spin",
28772848
]
28782849

2879-
[[package]]
2880-
name = "lazycell"
2881-
version = "1.3.0"
2882-
source = "registry+https://github.com/rust-lang/crates.io-index"
2883-
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
2884-
28852850
[[package]]
28862851
name = "leb128fmt"
28872852
version = "0.1.0"
@@ -2933,14 +2898,13 @@ dependencies = [
29332898

29342899
[[package]]
29352900
name = "librocksdb-sys"
2936-
version = "0.16.0+8.10.0"
2901+
version = "0.17.3+10.4.2"
29372902
source = "registry+https://github.com/rust-lang/crates.io-index"
2938-
checksum = "ce3d60bc059831dc1c83903fb45c103f75db65c5a7bf22272764d9cc683e348c"
2903+
checksum = "cef2a00ee60fe526157c9023edab23943fae1ce2ab6f4abb2a807c1746835de9"
29392904
dependencies = [
2940-
"bindgen 0.69.5",
2905+
"bindgen",
29412906
"bzip2-sys",
29422907
"cc",
2943-
"glob",
29442908
"libc",
29452909
"libz-sys",
29462910
"lz4-sys",
@@ -2964,7 +2928,7 @@ version = "0.1.0"
29642928
source = "registry+https://github.com/rust-lang/crates.io-index"
29652929
checksum = "3f8ce05b56f3cbc65ec7d0908adb308ed91281e022f61c8c3a0c9388b5380b17"
29662930
dependencies = [
2967-
"bindgen 0.72.1",
2931+
"bindgen",
29682932
"cc",
29692933
"thiserror 2.0.18",
29702934
"tracing",
@@ -4168,7 +4132,7 @@ dependencies = [
41684132
"pin-project-lite",
41694133
"quinn-proto",
41704134
"quinn-udp",
4171-
"rustc-hash 2.1.2",
4135+
"rustc-hash",
41724136
"rustls",
41734137
"socket2",
41744138
"thiserror 2.0.18",
@@ -4189,7 +4153,7 @@ dependencies = [
41894153
"lru-slab",
41904154
"rand 0.9.4",
41914155
"ring",
4192-
"rustc-hash 2.1.2",
4156+
"rustc-hash",
41934157
"rustls",
41944158
"rustls-pki-types",
41954159
"slab",
@@ -4628,9 +4592,9 @@ dependencies = [
46284592

46294593
[[package]]
46304594
name = "rocksdb"
4631-
version = "0.22.0"
4595+
version = "0.24.0"
46324596
source = "registry+https://github.com/rust-lang/crates.io-index"
4633-
checksum = "6bd13e55d6d7b8cd0ea569161127567cd587676c99f4472f779a0279aa60a7a7"
4597+
checksum = "ddb7af00d2b17dbd07d82c0063e25411959748ff03e8d4f96134c2ff41fce34f"
46344598
dependencies = [
46354599
"libc",
46364600
"librocksdb-sys",
@@ -4672,12 +4636,6 @@ version = "0.1.27"
46724636
source = "registry+https://github.com/rust-lang/crates.io-index"
46734637
checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d"
46744638

4675-
[[package]]
4676-
name = "rustc-hash"
4677-
version = "1.1.0"
4678-
source = "registry+https://github.com/rust-lang/crates.io-index"
4679-
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
4680-
46814639
[[package]]
46824640
name = "rustc-hash"
46834641
version = "2.1.2"

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ regex = "1.11"
123123
reqwest = { version = "0.12", default-features = false }
124124
ripemd = "0.1"
125125
rlimit = "0.10"
126-
rocksdb = { version = "0.22", default-features = false }
126+
rocksdb = { version = "0.24", default-features = false }
127127
secp256k1 = "0.29"
128128
semver = "1.0.26"
129129
sentry = { version = "0.47", default-features = false }

book/src/user/install.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,16 @@ If you are having trouble with:
8888
- **clang:** Install both `libclang` and `clang` - they are usually different
8989
packages.
9090
- **libclang:** Check out the [clang-sys
91-
documentation](https://github.com/KyleMayes/clang-sys#dependencies).
91+
documentation](https://github.com/KyleMayes/clang-sys#dependencies). If the
92+
build fails with `couldn't find any valid shared libraries matching:
93+
['libclang.so', 'libclang-*.so']`, libclang is not installed or is not on the
94+
search path: install the `libclang-dev` package (Debian/Ubuntu) or set
95+
`LIBCLANG_PATH` to the directory that contains `libclang.so`.
96+
- **shared libraries:** If the build fails with `error while loading shared
97+
libraries: libclang-*.so.*: cannot open shared object file`, you have the
98+
libclang **dev** files but are missing the matching **runtime** library.
99+
Install the runtime package (`libclang1-<version>` on Debian/Ubuntu) or run
100+
`sudo ldconfig`.
92101
- **g++ or MSVC++:** Try using `clang` or `Xcode` instead.
93102
- **rustc:** Use the latest stable `rustc` and `cargo` versions.
94103
- **dependencies**: Use `cargo install` without `--locked` to build with the

deny.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ skip-tree = [
110110
# wait for abscissa_core to update toml
111111
{ name = "toml", version = "=0.5.11" },
112112

113-
# wait for librocksdb-sys to update bindgen
114-
{ name = "bindgen", version = "=0.69.5" },
115-
116113
# wait for halo2_gadgets and primitive-types to update uint
117114
{ name = "uint", version = "=0.9.5" },
118115

supply-chain/config.toml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -885,10 +885,6 @@ criteria = "safe-to-deploy"
885885
version = "0.2.19"
886886
criteria = "safe-to-deploy"
887887

888-
[[exemptions.lazycell]]
889-
version = "1.3.0"
890-
criteria = "safe-to-deploy"
891-
892888
[[exemptions.libc]]
893889
version = "0.2.186"
894890
criteria = "safe-to-deploy"
@@ -910,7 +906,7 @@ version = "0.1.16"
910906
criteria = "safe-to-deploy"
911907

912908
[[exemptions.librocksdb-sys]]
913-
version = "0.16.0+8.10.0"
909+
version = "0.17.3+10.4.2"
914910
criteria = "safe-to-deploy"
915911

916912
[[exemptions.libz-sys]]
@@ -1017,10 +1013,6 @@ criteria = "safe-to-deploy"
10171013
version = "0.3.2"
10181014
criteria = "safe-to-deploy"
10191015

1020-
[[exemptions.objc2-core-graphics]]
1021-
version = "0.3.2"
1022-
criteria = "safe-to-deploy"
1023-
10241016
[[exemptions.objc2-core-image]]
10251017
version = "0.3.2"
10261018
criteria = "safe-to-deploy"
@@ -1392,7 +1384,7 @@ version = "0.10.1"
13921384
criteria = "safe-to-deploy"
13931385

13941386
[[exemptions.rocksdb]]
1395-
version = "0.22.0"
1387+
version = "0.24.0"
13961388
criteria = "safe-to-deploy"
13971389

13981390
[[exemptions.ron]]

0 commit comments

Comments
 (0)