Closed
Description
Describe the bug
I am attempting to build from source on Fedora 42 which was just released, and am getting errors in the mdbx build. I have tried a few different RUSTFLAGS with no success.
Currently using:
RUSTFLAGS="-C target_cpu=native -C link-arg=-fuse-ld=mold"
but have tried without mold and with clang as well.
clang version 20.1.2
mold 2.37.1 (compatible with GNU ld)
gcc version 15.0.1 20250329 (Red Hat 15.0.1-0) (GCC)
cargo 1.86.0 (adf9b6ad1 2025-02-28)
Steps to reproduce
On a Fedora 42 attempt to build latest tag using cargo build --release
Node logs
warning: reth-mdbx-sys@1.3.10: In file included from /data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c:140:
warning: reth-mdbx-sys@1.3.10: /data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h:507:23: error: expected ',' or ';' before '[' token
warning: reth-mdbx-sys@1.3.10: 507 | #define MDBX_NORETURN [[noreturn]]
warning: reth-mdbx-sys@1.3.10: | ^
warning: reth-mdbx-sys@1.3.10: /data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c:30258:5: note: in expansion of macro 'MDBX_NORETURN'
warning: reth-mdbx-sys@1.3.10: 30258 | MDBX_NORETURN;
warning: reth-mdbx-sys@1.3.10: | ^~~~~~~~~~~~~
warning: reth-mdbx-sys@1.3.10: /data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c:33114:1: warning: 'maybe_unused' attribute ignored [-Wattributes]
warning: reth-mdbx-sys@1.3.10: 33114 | __cold MDBX_MAYBE_UNUSED static bool
warning: reth-mdbx-sys@1.3.10: | ^~~~~~
warning: reth-mdbx-sys@1.3.10: /data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c:33114:26: error: expected identifier or '(' before 'static'
warning: reth-mdbx-sys@1.3.10: 33114 | __cold MDBX_MAYBE_UNUSED static bool
warning: reth-mdbx-sys@1.3.10: | ^~~~~~
warning: reth-mdbx-sys@1.3.10: /data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c: In function 'proc_read_uuid':
warning: reth-mdbx-sys@1.3.10: /data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c:33189:14: error: implicit declaration of function 'bootid_parse_uuid' [-Wimplicit-function-declaration]
warning: reth-mdbx-sys@1.3.10: 33189 | return bootid_parse_uuid(target, buf, len);
warning: reth-mdbx-sys@1.3.10: | ^~~~~~~~~~~~~~~~~
warning: reth-mdbx-sys@1.3.10: /data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c: At top level:
warning: reth-mdbx-sys@1.3.10: /data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c:33109:13: warning: 'check_uuid' defined but not used [-Wunused-function]
warning: reth-mdbx-sys@1.3.10: 33109 | static bool check_uuid(bin128_t uuid) {
warning: reth-mdbx-sys@1.3.10: | ^~~~~~~~~~
error: failed to run custom build command for `reth-mdbx-sys v1.3.10 (/data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys)`
Caused by:
process didn't exit successfully: `/data/reth-user/src/reth/target/release/build/reth-mdbx-sys-a0bb13311a14ad6d/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-changed=/data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx
OPT_LEVEL = Some(3)
OUT_DIR = Some(/data/reth-user/src/reth/target/release/build/reth-mdbx-sys-09617d7b6782166f/out)
TARGET = Some(x86_64-unknown-linux-gnu)
HOST = Some(x86_64-unknown-linux-gnu)
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
CC_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
CC_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some(false)
CARGO_CFG_TARGET_FEATURE = Some(adx,aes,avx,avx2,bmi1,bmi2,cmpxchg16b,f16c,fma,fxsr,lzcnt,movbe,pclmulqdq,popcnt,rdrand,rdseed,sha,sse,sse2,sse3,sse4.1,sse4.2,ssse3,xsave,xsavec,xsaveopt,xsaves)
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
CFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
CFLAGS_x86_64-unknown-linux-gnu = None
CARGO_ENCODED_RUSTFLAGS = Some(-Ctarget_cpu=native)
OUT_DIR = Some(/data/reth-user/src/reth/target/release/build/reth-mdbx-sys-09617d7b6782166f/out)
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
TARGET = Some(x86_64-unknown-linux-gnu)
CARGO_CFG_TARGET_FEATURE = Some(adx,aes,avx,avx2,bmi1,bmi2,cmpxchg16b,f16c,fma,fxsr,lzcnt,movbe,pclmulqdq,popcnt,rdrand,rdseed,sha,sse,sse2,sse3,sse4.1,sse4.2,ssse3,xsave,xsavec,xsaveopt,xsaves)
HOST = Some(x86_64-unknown-linux-gnu)
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
CFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
CFLAGS_x86_64-unknown-linux-gnu = None
OUT_DIR = Some(/data/reth-user/src/reth/target/release/build/reth-mdbx-sys-09617d7b6782166f/out)
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
TARGET = Some(x86_64-unknown-linux-gnu)
CARGO_CFG_TARGET_FEATURE = Some(adx,aes,avx,avx2,bmi1,bmi2,cmpxchg16b,f16c,fma,fxsr,lzcnt,movbe,pclmulqdq,popcnt,rdrand,rdseed,sha,sse,sse2,sse3,sse4.1,sse4.2,ssse3,xsave,xsavec,xsaveopt,xsaves)
HOST = Some(x86_64-unknown-linux-gnu)
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
CFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
CFLAGS_x86_64-unknown-linux-gnu = None
cargo:warning=In file included from /data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c:140:
cargo:warning=/data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h:507:23: error: expected ',' or ';' before '[' token
cargo:warning= 507 | #define MDBX_NORETURN [[noreturn]]
cargo:warning= | ^
cargo:warning=/data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c:30258:5: note: in expansion of macro 'MDBX_NORETURN'
cargo:warning=30258 | MDBX_NORETURN;
cargo:warning= | ^~~~~~~~~~~~~
cargo:warning=/data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c:33114:1: warning: 'maybe_unused' attribute ignored [-Wattributes]
cargo:warning=33114 | __cold MDBX_MAYBE_UNUSED static bool
cargo:warning= | ^~~~~~
cargo:warning=/data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c:33114:26: error: expected identifier or '(' before 'static'
cargo:warning=33114 | __cold MDBX_MAYBE_UNUSED static bool
cargo:warning= | ^~~~~~
cargo:warning=/data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c: In function 'proc_read_uuid':
cargo:warning=/data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c:33189:14: error: implicit declaration of function 'bootid_parse_uuid' [-Wimplicit-function-declaration]
cargo:warning=33189 | return bootid_parse_uuid(target, buf, len);
cargo:warning= | ^~~~~~~~~~~~~~~~~
cargo:warning=/data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c: At top level:
cargo:warning=/data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c:33109:13: warning: 'check_uuid' defined but not used [-Wunused-function]
cargo:warning=33109 | static bool check_uuid(bin128_t uuid) {
cargo:warning= | ^~~~~~~~~~
--- stderr
Warning: can't set `wrap_comments = true`, unstable features are only available in nightly channel.
Warning: can't set `format_code_in_doc_comments = true`, unstable features are only available in nightly channel.
Warning: can't set `doc_comment_code_block_width = 100`, unstable features are only available in nightly channel.
Warning: can't set `comment_width = 100`, unstable features are only available in nightly channel.
Warning: can't set `imports_granularity = Crate`, unstable features are only available in nightly channel.
Warning: can't set `binop_separator = Back`, unstable features are only available in nightly channel.
Warning: can't set `trailing_semicolon = false`, unstable features are only available in nightly channel.
Warning: can't set `trailing_comma = Vertical`, unstable features are only available in nightly channel.
error occurred in cc-rs: command did not execute successfully (status code exit status: 1): LC_ALL="C" "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-Wall" "-Wextra" "-Wno-unused-parameter" "-Wuninitialized" "-DMDBX_BUILD_FLAGS=\"-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -Wextra -Wno-unused-parameter -Wuninitialized\"" "-DMDBX_TXN_CHECKOWNER=0" "-DMDBX_DEBUG=0" "-DNDEBUG" "-o" "/data/reth-user/src/reth/target/release/build/reth-mdbx-sys-09617d7b6782166f/out/98e59b3378c30fa4-mdbx.o" "-c" "/data/reth-user/src/reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c"
Platform(s)
Linux (x86)
Container Type
Not running in a container
What version/commit are you on?
v1.3.10
What database version are you on?
N/A (can't get that far)
Which chain / network are you on?
N/A (can't get that far)
What type of node are you running?
Archive (default)
What prune config do you use, if any?
No response
If you've built Reth from source, provide the full command you used
RUSTFLAGS="-C target_cpu=native -C link-arg=-fuse-ld=mold" cargo build --release
Code of Conduct
- I agree to follow the Code of Conduct
Metadata
Metadata
Assignees
Type
Projects
Status
Done