[Bug] snarkOS doesn't build with GCC 15
🐛 Bug Report
Root issue: https://github.com/rust-rocksdb/rust-rocksdb/issues/991.
Workaround: CXXFLAGS="$CXXFLAGS -include cstdint" cargo build --release.
I have the same problem on Arch Linux. This also seems to happen with a more recent version of clang. My Linux machine is at clang 19.* while macOS is still at 17.*.
This is fixed upstream, but they didn't tag a release for it (yet). We are also not on the most recent version of the rocksdb crate, so not sure how easy upgrading will be.
Maybe we can just add the CXXFLAGS to .cargo/config.toml? I assume macOS will eventually update clang and things will break there too.
The upgrade is not an issue, I've already done it in https://github.com/ProvableHQ/snarkOS/pull/3671. As for including CXXFLAGS in config.toml, something like the following would work:
[env]
CXXFLAGS = "-include cstdint"
It's only a matter of whether we want to work around it right away; @vicsn?
IMO good to update the Cargo.toml if its permanent and useful - if it becomes superfluous or requires another change within a few weeks we can wait and ignore.
Yeah, it's the latter.