Compilation fails on GCC 15
Building spin fails when building with GCC 15 because we depend on an old version of oniguruma through rust-onig, which has not yet been updated with a compatible release (although it has been updated on main) https://github.com/rust-onig/rust-onig/pull/192
This means you can't currently compile Spin when using Fedora 42 (without installing your own older GCC), and potentially other distros.
$ cargo tree --invert onig
onig v6.4.0
└── tokenizers v0.21.1
└── spin-llm-local v3.3.0-pre0 (/var/home/danielle/dev/src/github.com/spinframework/spin/crates/llm-local)
└── spin-factor-llm v3.3.0-pre0 (/var/home/danielle/dev/src/github.com/spinframework/spin/crates/factor-llm)
├── spin-runtime-config v3.3.0-pre0 (/var/home/danielle/dev/src/github.com/spinframework/spin/crates/runtime-config)
│ └── spin-runtime-factors v3.3.0-pre0 (/var/home/danielle/dev/src/github.com/spinframework/spin/crates/runtime-factors)
│ ├── spin-cli v3.3.0-pre0 (/var/home/danielle/dev/src/github.com/spinframework/spin)
│ └── testing-framework v0.1.0 (/var/home/danielle/dev/src/github.com/spinframework/spin/tests/testing-framework)
│ ├── conformance v3.3.0-pre0 (/var/home/danielle/dev/src/github.com/spinframework/spin/tests/conformance-tests)
│ │ [dev-dependencies]
│ │ └── spin-cli v3.3.0-pre0 (/var/home/danielle/dev/src/github.com/spinframework/spin)
│ └── runtime-tests v3.3.0-pre0 (/var/home/danielle/dev/src/github.com/spinframework/spin/tests/runtime-tests)
│ [dev-dependencies]
│ └── spin-cli v3.3.0-pre0 (/var/home/danielle/dev/src/github.com/spinframework/spin)
│ [dev-dependencies]
│ └── spin-cli v3.3.0-pre0 (/var/home/danielle/dev/src/github.com/spinframework/spin)
└── spin-runtime-factors v3.3.0-pre0 (/var/home/danielle/dev/src/github.com/spinframework/spin/crates/runtime-factors) (*)
As a temporary workaround you should be able to build without the llm feature, e.g. cargo build --release --no-default-features.
Another option is to add the CFLAGS='-std=gnu17' flag to target the newer standard: CFLAGS='-std=gnu17' cargo build --release. That got it building for me
Next steps: waiting for / need to check on new release(s) for rust-onig repository.
rust-onig published a release with the GCC target fix last week. We pull it in via the tokenizers crate which bumped main to pull in latest rust-onig: https://github.com/huggingface/tokenizers/commit/909fdde2a4ffedd9295206f705eb612be2a91b12. We are now waiting for them to release before we can bump tokenizers and resolve this.