Skip to content

multiple rlib candidates for compiler_builtins found #388

Closed
@jiayihu

Description

@jiayihu

I'm having a similar issue to #334 but it's different I think. I have build-std = ["core", "alloc"] in config.toml and I'm trying to compile a local patch of compiler-builtins, for the reasons stated in #387 . In Cargo.toml I have the following configuration:

wasm3 = { version = "0.1.3", default-features = false, features = ["use-32bit-slots"] }
compiler_builtins = { version = "0.1.36" }

[patch.crates-io]
wasm3 = { path = "../../wasm3-rs" }
compiler_builtins = { path = "../../compiler-builtins" }

But the compiler is giving the error:

error[E0465]: multiple rlib candidates for `compiler_builtins` found
  |
  = note: candidate #1: /Users/jiayihu/Desktop/Repo/fedra-thesis/fedra/target/thumbv7em-none-eabi/debug/deps/libcompiler_builtins-c00a7bd3257465d5.rlib
  = note: candidate #2: /Users/jiayihu/Desktop/Repo/fedra-thesis/fedra/target/thumbv7em-none-eabi/debug/deps/libcompiler_builtins-7cae6c5d923380b0.rlib

I believe one version is the one included by default by cargo because of core in https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/standard_lib.rs#L28, whereas the second one is my patch. How do I opt-out the cargo-inserted one?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions