build: force-include <cstdint> via CXXFLAGS for GCC 15+#10788
Open
nuttycom wants to merge 1 commit into
Open
Conversation
librocksdb-sys and libzcash_script's vendored C++ rely on transitive <cstdint>, which GCC 15+ libstdc++ no longer provides. Drop once both upstreams add the include.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Zebra’s Cargo configuration to apply a build workaround for GCC 15+ by force-including the standard <cstdint> header when compiling vendored C++ dependencies (notably librocksdb-sys and libzcash_script), addressing breakage from removed transitive includes in newer libstdc++.
Changes:
- Add
CXXFLAGS="-include cstdint"to.cargo/config.tomlto make the workaround automatic for local builds.
Comment on lines
12
to
+15
| [env] | ||
| RUST_BACKTRACE="1" | ||
| # Workaround for GCC 15+: librocksdb-sys / libzcash_script vendored C++ relies on transitive <cstdint>. | ||
| CXXFLAGS = { value = "-include cstdint", force = false, relative = false } |
oxarbitrage
reviewed
Jun 24, 2026
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.
Cherry-picked from zodl-inc/zebra#5
Motivation
librocksdb-sys and libzcash_script's vendored C++ rely on transitive , which GCC 15+ libstdc++ no longer provides.
Solution
Adding the CXXFLAGS="-include cstdint" directive to .cargo/config.toml saves users from having to (a) know to use this workaround, and (b) do this manually every time we go to build.
Tests
Tested locally; this works fine.
Follow-up Work
This can removed once both upstream libraries' builds add the include.
AI Disclosure
PR Checklist
type(scope): description