snarkOS icon indicating copy to clipboard operation
snarkOS copied to clipboard

[Bug] snarkOS doesn't build with GCC 15

Open ljedrz opened this issue 8 months ago • 5 comments

🐛 Bug Report

Root issue: https://github.com/rust-rocksdb/rust-rocksdb/issues/991.

Workaround: CXXFLAGS="$CXXFLAGS -include cstdint" cargo build --release.

ljedrz avatar May 12 '25 12:05 ljedrz

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.*.

kaimast avatar May 20 '25 18:05 kaimast

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.

kaimast avatar Jun 04 '25 19:06 kaimast

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?

ljedrz avatar Jun 05 '25 08:06 ljedrz

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.

vicsn avatar Jun 05 '25 19:06 vicsn

Yeah, it's the latter.

ljedrz avatar Jun 06 '25 07:06 ljedrz