sp1 icon indicating copy to clipboard operation
sp1 copied to clipboard

Invalid summary version when compiling zkvm guest

Open Zk2u opened this issue 8 months ago • 7 comments

Component

sp1-zkvm

Have you ensured that all of these are up to date?

  • [x] SP1 SDK
  • [x] cargo prove CLI/sp1up

What version of SP1 SDK are you on?

4.1.3

What version of the cargo prove CLI are you on?

cargo-prove sp1 (9312c7c 2025-04-17T18:45:11.033695524Z)

Operating System

Linux (Other)

Describe the bug

I get a rust-lld: error: Invalid summary version 12. Version should be in the range [1-10] running on Bazzite (fedora) 42. Rust installed via rustup. Clang installed via rpm-ostree, sp1 installed from sp1up.

warning: [email protected]: rustc +succinct --version: "rustc 1.85.0-dev\n"

error: failed to run custom build command for `strata-bridge-guest-builder v0.1.0 (/var/home/bazzite/Developer/alpen/strata-bridge/bridge-guest-builder)`

Caused by:
  process didn't exit successfully: `/var/home/bazzite/Developer/alpen/strata-bridge/target/debug/build/strata-bridge-guest-builder-56d05ebba2e33421/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=SKIP_GUEST_BUILD
  cargo:rustc-check-cfg=cfg(skip_guest_build)
  cargo::rerun-if-changed=/var/home/bazzite/Developer/alpen/strata-bridge/bridge-guest-builder/bridge-guest/src
  cargo::rerun-if-changed=/var/home/bazzite/Developer/alpen/strata-bridge/bridge-guest-builder/bridge-guest/Cargo.toml
  cargo:rerun-if-changed=/var/home/bazzite/Developer/alpen/strata-bridge/bridge-guest-builder/bridge-guest/Cargo.lock
  cargo:rerun-if-changed=/var/home/bazzite/Developer/alpen/strata-bridge/crates/bridge-proof/protocol
  cargo:rerun-if-changed=/var/home/bazzite/Developer/alpen/strata-bridge/crates/test-utils
  cargo:rerun-if-changed=/var/home/bazzite/Developer/alpen/strata-bridge/crates/params
  cargo:rerun-if-changed=/var/home/bazzite/Developer/alpen/strata-bridge/crates/bridge-proof/primitives
  cargo:rerun-if-changed=/var/home/bazzite/Developer/alpen/strata-bridge/crates/bridge-proof/test-utils
  cargo:rerun-if-changed=/var/home/bazzite/Developer/alpen/strata-bridge/crates/common
  cargo:warning=rustc +succinct --version: "rustc 1.85.0-dev\n"

  --- stderr
  [sp1]  warning: unexpected `cfg` condition name: `test`
  [sp1]    --> /var/home/bazzite/Developer/alpen/strata-bridge/crates/params/src/stake_chain.rs:40:7
  [sp1]     |
  [sp1]  40 | #[cfg(test)]
  [sp1]     |       ^^^^
  [sp1]     |
  [sp1]     = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
  [sp1]     = help: consider using a Cargo feature instead
  [sp1]     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
  [sp1]              [lints.rust]
  [sp1]              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test)'] }
  [sp1]     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test)");` to the top of the `build.rs`
  [sp1]     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
  [sp1]     = note: `#[warn(unexpected_cfgs)]` on by default
  [sp1]  
  [sp1]  warning: `alpen-bridge-params` (lib) generated 1 warning
  [sp1]  warning: unexpected `cfg` condition name: `test`
  [sp1]     --> /var/home/bazzite/Developer/alpen/strata-bridge/crates/bridge-proof/primitives/src/tx.rs:126:7
  [sp1]      |
  [sp1]  126 | #[cfg(test)]
  [sp1]      |       ^^^^
  [sp1]      |
  [sp1]      = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
  [sp1]      = help: consider using a Cargo feature instead
  [sp1]      = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
  [sp1]               [lints.rust]
  [sp1]               unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test)'] }
  [sp1]      = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test)");` to the top of the `build.rs`
  [sp1]      = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
  [sp1]      = note: `#[warn(unexpected_cfgs)]` on by default
  [sp1]  
  [sp1]  warning: unexpected `cfg` condition name: `test`
  [sp1]     --> /var/home/bazzite/Developer/alpen/strata-bridge/crates/bridge-proof/primitives/src/tx_inclusion_proof.rs:174:7
  [sp1]      |
  [sp1]  174 | #[cfg(test)]
  [sp1]      |       ^^^^
  [sp1]      |
  [sp1]      = help: consider using a Cargo feature instead
  [sp1]      = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
  [sp1]               [lints.rust]
  [sp1]               unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test)'] }
  [sp1]      = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test)");` to the top of the `build.rs`
  [sp1]      = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
  [sp1]  
  [sp1]  warning: `strata-bridge-proof-primitives` (lib) generated 2 warnings
  [sp1]  warning: unexpected `cfg` condition name: `test`
  [sp1]    --> /var/home/bazzite/Developer/alpen/strata-bridge/crates/bridge-proof/protocol/src/program.rs:96:7
  [sp1]     |
  [sp1]  96 | #[cfg(test)]
  [sp1]     |       ^^^^
  [sp1]     |
  [sp1]     = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `ub_checks`, `unix`, and `windows`
  [sp1]     = help: consider using a Cargo feature instead
  [sp1]     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
  [sp1]              [lints.rust]
  [sp1]              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test)'] }
  [sp1]     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test)");` to the top of the `build.rs`
  [sp1]     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
  [sp1]     = note: `#[warn(unexpected_cfgs)]` on by default
  [sp1]  
  [sp1]  warning: unexpected `cfg` condition name: `test`
  [sp1]     --> /var/home/bazzite/Developer/alpen/strata-bridge/crates/bridge-proof/protocol/src/tx_info.rs:121:7
  [sp1]      |
  [sp1]  121 | #[cfg(test)]
  [sp1]      |       ^^^^
  [sp1]      |
  [sp1]      = help: consider using a Cargo feature instead
  [sp1]      = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
  [sp1]               [lints.rust]
  [sp1]               unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test)'] }
  [sp1]      = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test)");` to the top of the `build.rs`
  [sp1]      = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
  [sp1]  
  [sp1]  warning: `strata-bridge-proof-protocol` (lib) generated 2 warnings
  [sp1]     Compiling strata-bridge-guest v0.1.0 (/var/home/bazzite/Developer/alpen/strata-bridge/bridge-guest-builder/bridge-guest)
  [sp1]  error: linking with `rust-lld` failed: exit status: 1
  [sp1]    |
  [sp1]    = note: LC_ALL="C" PATH="/var/home/bazzite/.sp1/toolchains/OfoKEsMYxz/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/linuxbrew/.linuxbrew/opt/llvm@19/bin:/home/linuxbrew/.linuxbrew/opt/llvm@19/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/bazzite/.cargo/bin:/home/bazzite/.local/bin:/home/bazzite/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/bazzite/.sp1/bin" VSLANG="1033" "rust-lld" "-flavor" "gnu" "/tmp/rustcecYnkx/symbols.o" "<10 object files omitted>" "--as-needed" "-Bstatic" "/var/home/bazzite/Developer/alpen/strata-bridge/bridge-guest-builder/bridge-guest/target/elf-compilation/riscv32im-succinct-zkvm-elf/release/deps/{libzkaleido_sp1_guest_env-6cab649b56503877.rlib,libsp1_zkvm-54f392e8b92e50a9.rlib,liblibm-1724d9eb8667152a.rlib,libstrata_bridge_proof_protocol-b8dbb0507deb3519.rlib,libstrata_bridge_proof_primitives-451b05c8880f9add.rlib,libstrata_proofimpl_btc_blockspace-665c438a1991f5a6.rlib,libstrata_l1tx-36caee64ced13600.rlib,libstrata_state-fd844de4f1ccdf49.rlib,libstrata_crypto-432e704e15ca5891.rlib,libzkaleido_sp1_groth16_verifier-9e1b0bc31128956f.rlib,libsp1_verifier-b7ca704b45de5fe2.rlib,libsubstrate_bn_succinct-02dcc44c829f6664.rlib,libsp1_lib-3ddbd15a3bf7bd87.rlib,libsp1_primitives-ef35db9184c0298e.rlib,libp3_baby_bear-8d1ec1af0c8ea110.rlib,libp3_poseidon2-64305e93708127ba.rlib,libgcd-a3ddde53186bdd3d.rlib,libp3_mds-40b11f76f416b32c.rlib,libp3_dft-c328d93a7de2238e.rlib,libp3_matrix-91439a54deb18314.rlib,libp3_maybe_rayon-9cf141c12e7d4073.rlib,libp3_symmetric-c463615e3e865bec.rlib,libp3_field-ad6d1676cd84cc73.rlib,libp3_util-b6ed8de8a3f9cf4d.rlib,libitertools-ba000b95fea6c55e.rlib,libcrunchy-313aa0126509678a.rlib,liblazy_static-0302cdb804eaede5.rlib,libspin-d70c730683f543c5.rlib,libzkaleido_risc0_groth16_verifier-1e788dcff1a86ee8.rlib,librisc0_groth16-44a89bca0933029d.rlib,libark_groth16-23f557f1f9bdd412.rlib,libark_crypto_primitives-3aac478a3562d1c7.rlib,libark_snark-711ab86db177e2a3.rlib,libark_relations-0f6dcd2071e4481c.rlib,libtracing_subscriber-56e8222c4e850c23.rlib,libark_bn254-86ac3940f3022e7d.rlib,libark_ec-17b73644c3ff784e.rlib,libark_poly-6b9bc01544383c95.rlib,libhashbrown-f763644d5ee38158.rlib,libahash-a996db7fb9d9f5aa.rlib,libitertools-0fc63021a4e9cc6e.rlib,libeither-cd71bcbfce48cc08.rlib,libark_ff-6dabdce6b826a0d5.rlib,libark_serialize-da28fba60d1a3a61.rlib,libnum_bigint-c25b4206ff185972.rlib,libnum_integer-1aa9d73d90787fe6.rlib,libark_std-3c2eaed3e47d163b.rlib,libnum_traits-4ad1597a4b15ae01.rlib,librisc0_binfmt-347697c6154651ff.rlib,librisc0_zkp-b5b8c2e3fb83b082.rlib,libblake2-e0e2271caba3e25b.rlib,librisc0_core-117645a2046e1990.rlib,libbytemuck-208e5fa2df6f9261.rlib,librisc0_zkvm_platform-aa467070adebdf46.rlib,libelf-31293605ca1a164f.rlib,libanyhow-c68a97efd0720c57.rlib,libtracing-01b5d0abdbdf84ac.rlib,liblog-09e9b5a01c482eca.rlib,libpin_project_lite-a1c20e4bc1f686cb.rlib,libtracing_core-3db91a002a79b85c.rlib,libstrata_bridge_tx_builder-36dbd77e59ab0b46.rlib,libalpen_bridge_params-bc42a4141c13ce7b.rlib,libzkaleido_native_adapter-68ad670b85db669c.rlib,libstrata_primitives-006c93ed9ee8357a.rlib,libhex-d840f68b758a6b28.rlib,libnum_enum-4838a54a28f707ec.rlib,libbitcoin_bosd-7627ead1f7e2568b.rlib,libthiserror-7826dd610ee36268.rlib,libconst_hex-f31c62a4020107a7.rlib,libmusig2-4f7ddd16d1483e9e.rlib,libsecp-f2e7110e7b23c529.rlib,libserdect-c1ca1e05ed80542b.rlib,libbitcoin-2efff201b535faef.rlib,libbitcoin_units-ae7b0df1529efbb1.rlib,libsecp256k1-412797f6f347e949.rlib,librand-9ec96cbf16f9cfb5.rlib,librand_chacha-c7e7f0864a707186.rlib,libppv_lite86-d9d95853f3e7b53a.rlib,libzerocopy-e57d48ef863febe2.rlib,libbyteorder-be7e40f08b262ec3.rlib,libecdsa-f694824988bcd456.rlib,libhex_literal-5b7c3058a4b83e85.rlib,libsp1_lib-f22b16eb6230dd3e.rlib,libk256-66bc5ba03d359441.rlib,libsha2-6c4d1b99f6d391a1.rlib,libecdsa-328cbcdc083a982a.rlib,librfc6979-017e5e0b18d7b178.rlib,libsignature-2b8de73421ce0689.rlib,libonce_cell-1d9f0cacd8079bed.rlib,libelliptic_curve-e32c8b119f502053.rlib,libpkcs8-5fd9405e1696f920.rlib,libspki-6acb15cb015d91f2.rlib,libsec1-9fc61d4ed3dce36b.rlib,libder-69c49c3be7ec6f01.rlib,libhkdf-c7ae355f380e33a0.rlib,libhmac-e9a1d77d8bb3a68a.rlib,libdigest-4736f1f2af12f2cd.rlib,libconst_oid-e1b279ccc31f8d6f.rlib,libblock_buffer-8bd2b01e14bbf555.rlib,libcrypto_common-29b7d8e98381b288.rlib,libcrypto_bigint-49254402cf604e3d.rlib,libgeneric_array-f8c3c07bbc399c46.rlib,libtypenum-fca245cd4343b620.rlib,libbase16ct-d2a232c73fba282d.rlib,libzeroize-2cdb95412711811e.rlib,libgroup-cd54523eaf4f6a9c.rlib,libff-0882a10b62fc9732.rlib,librand_core-5e72c4ad48655b3b.rlib,libgetrandom-1f49d2006062e1d9.rlib,libcfg_if-9120ff14c89028c6.rlib,libsubtle-77babf6d63dc0f8c.rlib,libsecp256k1_sys-7dafd9eeb282e42a.rlib,libbech32-d27012ab02074a9d.rlib,libbase58ck-bb855c982088c934.rlib,libbitcoin_hashes-34dda0c38c2e7357.rlib,libbitcoin_io-82823798406ca2ed.rlib,libhex_conservative-9e5f405c29504d85.rlib,libarrayvec-93e19eb83a860ec0.rlib,libbitcoin_internals-55cbb8bb2ffb1a42.rlib,libzkaleido-395279b35abb9d30.rlib,libbincode-a596be26fded286a.rlib,libthiserror-05912708641936b5.rlib,libserde-93f5a27684d7399b.rlib,libborsh-c88fb9b8f514126e.rlib,libarbitrary-21a1b267c5e82291.rlib}" "/var/home/bazzite/.sp1/toolchains/OfoKEsMYxz/lib/rustlib/riscv32im-succinct-zkvm-elf/lib/{libstd-e1c4276657a6d3e9.rlib,libpanic_abort-e9bbdd6fc2bd921e.rlib,librustc_demangle-e19b88be09f436e2.rlib,libstd_detect-ce5ab4add45fbf0d.rlib,libhashbrown-aa259cd9e97f7925.rlib,librustc_std_workspace_alloc-06c30b5d2879dc76.rlib,libminiz_oxide-cab65e151bcbe6b0.rlib,libadler-791f6bea7fec443e.rlib,libunwind-963ed3d3fb576b2b.rlib,libcfg_if-5584e27ec6d419ce.rlib,liblibc-aa0a8587c7e791f2.rlib,liballoc-669f36e2b4d435c8.rlib,librustc_std_workspace_core-5033f30186acf452.rlib,libcore-a13c84deafa4d52e.rlib,libcompiler_builtins-08fea47397c2a972.rlib}" "-Bdynamic" "-z" "noexecstack" "-L" "/var/home/bazzite/Developer/alpen/strata-bridge/bridge-guest-builder/bridge-guest/target/elf-compilation/riscv32im-succinct-zkvm-elf/release/build/secp256k1-sys-48de99ed86928f9f/out" "-o" "/var/home/bazzite/Developer/alpen/strata-bridge/bridge-guest-builder/bridge-guest/target/elf-compilation/riscv32im-succinct-zkvm-elf/release/deps/strata_bridge_guest-c30fb55bd21ab230" "--gc-sections" "-O1" "--strip-debug" "-Ttext=0x00200800"
  [sp1]    = note: some arguments are omitted. use `--verbose` to show all linker arguments
  [sp1]    = note: rust-lld: error: Invalid summary version 12. Version should be in the range [1-10].
  [sp1]            rust-lld: error: Invalid summary version 12. Version should be in the range [1-10].
  [sp1]            rust-lld: error: Invalid summary version 12. Version should be in the range [1-10].
  [sp1]            rust-lld: error: Invalid summary version 12. Version should be in the range [1-10].

Zk2u avatar Apr 18 '25 11:04 Zk2u

@storopoli and @Rajil1213 have also encountered this issue on macOS by using llvm@20 from brew and fixed by installing llvm@19. I have 19 installed but not functional. Guessing it's not choosing it for some reason or another.

Zk2u avatar Apr 18 '25 11:04 Zk2u

Can you do the following checks:

  1. Run

    cargo clean 
    cargo build
    

    and see if there is still an error (I guess you already tried that)

  2. Can you give the output of the following commands:

    dnf list --installed | grep llvm
    llvm-config --version
    

leruaa avatar Apr 18 '25 12:04 leruaa

llvm-config --version
19.1.7

I'm using Bazzite which is immutable, so rpm-ostree search llvm returns this

===== Name Matched =====
llvm : The Low Level Virtual Machine
llvm-bolt : A post-link optimizer developed to speed up large applications
llvm-cmake-utils : CMake utilities shared across LLVM subprojects
llvm-devel : Libraries and header files for LLVM
llvm-doc : Documentation for LLVM
llvm-filesystem : Filesystem package that owns the versioned llvm prefix
llvm-googletest : LLVM's modified googletest sources
llvm-libs : LLVM shared libraries
llvm-libunwind : LLVM libunwind
llvm-libunwind-devel : LLVM libunwind development files
llvm-libunwind-static : Static library for LLVM libunwind
llvm-static : LLVM static libraries
llvm-test : LLVM regression tests
llvm-test-suite : C/C++ Compiler Test Suite
llvm19 : The Low Level Virtual Machine
llvm19-cmake-utils : CMake utilities shared across LLVM subprojects
llvm19-devel : Libraries and header files for LLVM
llvm19-doc : Documentation for LLVM
llvm19-filesystem : Filesystem package that owns the versioned llvm prefix
llvm19-googletest : LLVM's modified googletest sources
llvm19-libs : LLVM shared libraries
llvm19-static : LLVM static libraries
llvm19-test : LLVM regression tests
annobin-plugin-llvm : annobin llvm plugin
ghdl-llvm : GHDL with LLVM backend
ghdl-llvm-grt : GHDL LLVM runtime libraries
golang-tinygo-x-llvm-devel : Go bindings to a system-installed LLVM
llvm11 : The Low Level Virtual Machine
llvm11-devel : Libraries and header files for LLVM
llvm11-doc : Documentation for LLVM
llvm11-libs : LLVM shared libraries
llvm11-static : LLVM static libraries
llvm12 : The Low Level Virtual Machine
llvm12-devel : Libraries and header files for LLVM
llvm12-doc : Documentation for LLVM
llvm12-libs : LLVM shared libraries
llvm12-static : LLVM static libraries
llvm13 : The Low Level Virtual Machine
llvm13-devel : Libraries and header files for LLVM
llvm13-doc : Documentation for LLVM
llvm13-libs : LLVM shared libraries
llvm13-static : LLVM static libraries
llvm14 : The Low Level Virtual Machine
llvm14-devel : Libraries and header files for LLVM
llvm14-doc : Documentation for LLVM
llvm14-libs : LLVM shared libraries
llvm14-static : LLVM static libraries
llvm15 : The Low Level Virtual Machine
llvm15-devel : Libraries and header files for LLVM
llvm15-doc : Documentation for LLVM

Going to try uninstall from brew and install llvm10 into rpm-ostree and see what happens.

Zk2u avatar Apr 18 '25 22:04 Zk2u

I have exactly these lines in my $HOME/.zprofile. Unredacted because it shows how annoying these things can be:

# Fuck you C/C++
export CFLAGS="-I/opt/homebrew/include"
export LDFLAGS="-L/opt/homebrew/lib"

# Fuck you WASM32
#export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
# Workaround for strata-bridge, fuck you sp1
export PATH="/opt/homebrew/opt/llvm@19/bin:$PATH"

I had to install llvm@19 with homebrew.

Don't forget to nuke all nested target/ dirs. I have the cleanrust function for that:

# Rust
if command -v fd &> /dev/null; then
  cleanrust() {
    fd -It d -g target -X rm -rf
  }
fi

storopoli avatar Apr 18 '25 23:04 storopoli

@Zk2u Do you still have issues with llvm?

leruaa avatar Apr 24 '25 15:04 leruaa

As far as I remember, yes. I'll follow up in a few days as I don't have access to my machine ATM.

Zk2u avatar Apr 24 '25 15:04 Zk2u

I've switched to a non immutable fedora and with llvm installed via DNF, working fine. Doesn't solve this issue though

Zk2u avatar Apr 26 '25 10:04 Zk2u

Ok I'm on normal fedora 42 and this is happening again.

$ dnf ls --installed | rg llvm
llvm-filesystem.i686                                 20.1.5-1.fc42                        <unknown>
llvm-filesystem.x86_64                               20.1.5-1.fc42                        <unknown>
llvm-googletest.x86_64                               20.1.5-1.fc42                        <unknown>
llvm-libs.i686                                       20.1.5-1.fc42                        <unknown>
llvm-libs.x86_64                                     20.1.5-1.fc42                        <unknown>
llvm-static.x86_64                                   20.1.5-1.fc42                        <unknown>
llvm19.x86_64                                        19.1.7-13.fc42                       updates
llvm19-devel.x86_64                                  19.1.7-13.fc42                       <unknown>
llvm19-filesystem.x86_64                             19.1.7-13.fc42                       updates
llvm19-googletest.x86_64                             19.1.7-13.fc42                       <unknown>
llvm19-libs.x86_64                                   19.1.7-13.fc42                       updates
llvm19-static.x86_64                                 19.1.7-13.fc42                       <unknown>
llvm19-test.x86_64                                   19.1.7-13.fc42                       <unknown>

What's blocking this from working with llvm20?

Zk2u avatar Jun 05 '25 14:06 Zk2u

What are the output of these commands?

rustc --version --verbose | grep LLVM
ld.lld --version
rust-lld --version

leruaa avatar Jun 05 '25 14:06 leruaa

rustc --version --verbose | grep LLVM
ld.lld --version
rust-lld --version
LLVM version: 19.1.1
bash: ld.lld: command not found...
bash: rust-lld: command not found...

Zk2u avatar Jun 05 '25 15:06 Zk2u

Arg, o3 is hallucinating big time, sorry about that. I'll try to setup a Fedora 42 machine.

Do you know why you have 2 llvm versions?

leruaa avatar Jun 05 '25 16:06 leruaa

Fedora 42 defaults to LLVM 20 but I've installed 19 because I'm trying to get this to work, lol. We had a similar thing on macos using LLVM 20 and switching to LLVM 19 worked to get the version within the correct range. I don't actually know if that'll work but I'm 90% sure it will. That still means we should find the issue so the latest version is compatible. Also thanks for the short reply times, it's much appreciated.

Zk2u avatar Jun 05 '25 20:06 Zk2u

Are your errors on a public repo? Could you provide a minimal repro? (I'm setting up a Fedora machine)

And fwiw, on my Ubuntu machine rustc --version --verbose | grep LLVM returns LLVM version: 20.1.0 and I have no issues

leruaa avatar Jun 05 '25 21:06 leruaa

Yeah, https://github.com/alpenlabs/strata-bridge/

And fwiw, on my Ubuntu machine rustc --version --verbose | grep LLVM returns LLVM version: 20.1.0 and I have no issues

Agh, great.

dnf install gcc git openssl-devel protobuf-compiler 
curl -L https://sp1up.succinct.xyz | bash
git clone --depth 1 https://github.com/alpenlabs/strata-bridge
cargo c

You might need clang or sqlx-cli but i think that's later on in the build and i hit the issues before i installed it. This is just a fresh setup so this is what i ran before trying

Zk2u avatar Jun 06 '25 07:06 Zk2u

I'm able to reproduce, but I haven't found a way to solve it yet...

leruaa avatar Jun 09 '25 08:06 leruaa

Any updates here?

Zk2u avatar Jun 16 '25 10:06 Zk2u

We are planning to release a new succinct Rust toolchain that is build with LLVM 20, that should theorically solve this issue.

leruaa avatar Jun 16 '25 10:06 leruaa

Thanks so much, please keep me posted!

Zk2u avatar Jun 16 '25 10:06 Zk2u

@Zk2u I did a test with the latest succinct Rust toolchain and it seems to be working!

What I did:

sp1up 
sp1up --c-toolchain

Testing rustc +succinct --version now returns "rustc 1.87.0-dev" (was 1.85.0 previously)

I also had to install clang with sudo dnf install clang. Now when doing cargo c I have errors about SQLx as you expected previously.

lmk if it works on your end?

leruaa avatar Jun 19 '25 07:06 leruaa

AGH YOU LEGEND!! it works. thanks so much, i can now work with my lsp again XD. great job

Zk2u avatar Jun 19 '25 10:06 Zk2u

Can confirm that this also works on MacOS with LLVM 20:

% rustc +succinct --version
rustc 1.87.0-dev

% ld.lld --version
Homebrew LLD 20.1.7 (compatible with GNU linkers)

storopoli avatar Jun 19 '25 20:06 storopoli