Fix build on GCC 15 (Fedora 43+) by injecting missing <cstdint> include#1269
Open
stephensong wants to merge 1 commit intoromanz:masterfrom
Open
Fix build on GCC 15 (Fedora 43+) by injecting missing <cstdint> include#1269stephensong wants to merge 1 commit intoromanz:masterfrom
<cstdint> include#1269stephensong wants to merge 1 commit intoromanz:masterfrom
Conversation
…lude GCC 15 no longer transitively includes `<cstdint>` from C++ standard headers, causing the bundled RocksDB in rust-librocksdb-sys to fail with `uint64_t has not been declared` errors. Setting CXXFLAGS via `.cargo/config.toml` resolves this without patching vendored sources. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
antonilol
reviewed
Feb 19, 2026
| # The bundled RocksDB source in rust-librocksdb-sys requires uint64_t etc., | ||
| # so we inject the missing include globally for all C++ compilation units. | ||
| [env] | ||
| CXXFLAGS = "-include cstdint" |
Contributor
There was a problem hiding this comment.
Does this override existing CXXFLAGS?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<cstdint>from C++ standard headersrust-librocksdb-systo fail with errors like'uint64_t' has not been declared.cargo/config.tomlthat setsCXXFLAGS = "-include cstdint", injecting the missing include globally for all C++ compilation unitsWhy this approach
<cstdint>transitively (the flag is harmless if the header is already included)Test plan
cargo build --releasesucceeds on Fedora 43 with GCC 15electrsbinary runs and reports correct version (v0.11.0)