Skip to content

svm-rs-builds dependency generates invalid build.rs file for foundry-compilers #4581

@danijelTxFusion

Description

@danijelTxFusion

🐛 Bug Report

📝 Description

The core module cannot compile because the svm-rs-builds dependency generates an invalid build.rs file. The build.rs file contains duplicate constant declarations, which breaks the compilation."

🔄 Reproduction Steps

git clone https://github.com/matter-labs/zksync-era.git
cd zksync-era/core
cargo check

🤔 Expected Behavior

Compilation to finish successfully.

😯 Current Behavior

Compilation fails.

📎 Log Output

error[E0428]: the name `SOLC_VERSION_0_8_31` is defined multiple times
   --> /home/danijel/zks/zksync-era/core/target/debug/build/svm-rs-builds-a57a9409d22fd6db/out/generated.rs:589:1
    |
583 | pub const SOLC_VERSION_0_8_31: semver::Version = semver::Version::new(0, 8, 31);
    | -------------------------------------------------------------------------------- previous definition of the value `SOLC_VERSION_0_8_31` here
...
589 | pub const SOLC_VERSION_0_8_31: semver::Version = semver::Version::new(0, 8, 31);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SOLC_VERSION_0_8_31` redefined here
    |
    = note: `SOLC_VERSION_0_8_31` must be defined only once in the value namespace of this module

error[E0428]: the name `SOLC_VERSION_0_8_31_CHECKSUM` is defined multiple times
   --> /home/danijel/zks/zksync-era/core/target/debug/build/svm-rs-builds-a57a9409d22fd6db/out/generated.rs:592:1
    |
586 | pub const SOLC_VERSION_0_8_31_CHECKSUM: &str = "c7ce590c02928ef04ba936b4962eed2162d4eefac5d73288257e16d20512f89f";
    | ------------------------------------------------------------------------------------------------------------------ previous definition of the value `SOLC_VERSION_0_8_31_CHECKSUM` here
...
592 | pub const SOLC_VERSION_0_8_31_CHECKSUM: &str = "aac9cd0116e9ae0cd3d8f64a8641381845dc9f12e2a52653de36fb619323e557";
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SOLC_VERSION_0_8_31_CHECKSUM` redefined here
    |
    = note: `SOLC_VERSION_0_8_31_CHECKSUM` must be defined only once in the value namespace of this module

    Checking blockstore v0.7.1
For more information about this error, try `rustc --explain E0428`.
error: could not compile `svm-rs-builds` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions