build: force-include <cstdint> via CXXFLAGS for GCC 15+#5
Merged
Conversation
902b709 to
1435a26
Compare
nullcopy
previously approved these changes
Jun 4, 2026
|
I use gcc-13.4.0 but I don't have the warning on my side. Can you give more information to reproduce the actual warning, please? |
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.
1435a26 to
d5e0604
Compare
Contributor
|
Good catch, the issue is with GCC 15, not GCC 13 |
nuttycom
approved these changes
Jun 4, 2026
Contributor
nuttycom
left a comment
There was a problem hiding this comment.
utACK, I will be glad to not have to deal with this manually.
dannywillems
approved these changes
Jun 4, 2026
dannywillems
left a comment
There was a problem hiding this comment.
utACK
Additionnally, trying to add checks in the CI: #6
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.
Clean
cargo buildfails on GCC 15+ with'uint64_t' has not been declaredfromlibrocksdb-sys(andlibzcash_script) headers. Their vendored C++ relies on transitive<cstdint>inclusion, which newer libstdc++ no longer provides.Add
CXXFLAGS = "-include cstdint"to.cargo/config.toml [env]so every C++ TU gets the header. No-op for files that already include it.force = falseso any developer/CI-suppliedCXXFLAGSstill wins. Drop once both upstreams add the include directly.Verified: clean
cargo build -p zebra-stateaftercargo clean -p librocksdb-sys, no env vars set.