You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a dummy library project, with an attached dummy benchmark which uses criterion (most popular benchmarking library).
This is a 'realistic' setup, as benchmarking library projects is a fairly common use case. For a simpler setup
To reproduce the issue, build with cargo tarpaulin --engine llvm.
Sample stdout (from my machine):
➜ dummy_criterion git:(master) ✗ cargo tarpaulin --engine llvm
2025-01-16T19:40:23.675874Z INFO cargo_tarpaulin::config: Creating config
2025-01-16T19:40:23.729267Z INFO cargo_tarpaulin: Running Tarpaulin
2025-01-16T19:40:23.729275Z INFO cargo_tarpaulin: Building project
2025-01-16T19:40:23.729278Z INFO cargo_tarpaulin::cargo: Cleaning project
Compiling proc-macro2 v1.0.93
Compiling unicode-ident v1.0.14
Compiling crossbeam-utils v0.8.21
Compiling serde v1.0.217
Compiling autocfg v1.4.0
Compiling either v1.13.0
Compiling serde_json v1.0.135
Compiling libc v0.2.169
Compiling rayon-core v1.12.1
Compiling cfg-if v1.0.0
Compiling clap_lex v0.7.4
Compiling itoa v1.0.14
Compiling plotters-backend v0.3.7
Compiling memchr v2.7.4
Compiling ryu v1.0.18
Compiling ciborium-io v0.2.2
Compiling regex-syntax v0.8.5
Compiling anstyle v1.0.10
Compiling cast v0.3.0
Compiling same-file v1.0.6
Compiling once_cell v1.20.2
Compiling anes v0.1.6
Compiling oorandom v11.1.4
Compiling half v2.4.1
Compiling num-traits v0.2.19
Compiling walkdir v2.5.0
Compiling itertools v0.10.5
Compiling plotters-svg v0.3.7
Compiling clap_builder v4.5.26
Compiling ciborium-ll v0.2.2
Compiling regex-automata v0.4.9
Compiling criterion-plot v0.5.0
Compiling crossbeam-epoch v0.9.18
Compiling crossbeam-deque v0.8.6
Compiling quote v1.0.38
Compiling plotters v0.3.7
Compiling syn v2.0.96
Compiling is-terminal v0.4.13
Compiling regex v1.11.1
Compiling rayon v1.10.0
Compiling serde_derive v1.0.217
error: could not compile `clap_builder` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
2025-01-16T19:40:25.390163Z ERROR cargo_tarpaulin: Failed to compile tests!
error: symbol `_RNCNCNvMs2_NtNtCs87SbzEJgdEg_12clap_builder7builder7commandNtB9_7Command29get_global_arg_conflicts_with00Bd_` is already defined
--> /home/sewer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clap_builder-4.5.26/src/builder/command.rs:3992:39
|
3992 | ... .flat_map(|x| x.args.args()),
| ^^^
Error: "Failed to compile tests!\nerror: symbol `_RNCNCNvMs2_NtNtCs87SbzEJgdEg_12clap_builder7builder7commandNtB9_7Command29get_global_arg_conflicts_with00Bd_` is already defined\n --> /home/sewer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clap_builder-4.5.26/src/builder/command.rs:3992:39\n |\n3992 | ... .flat_map(|x| x.args.args()),\n | ^^^\n\n"
Edit:
If you wish to test with an even simpler setup, simply try building any crate with a (direct or transitive) dependency on clap_builder, i.e.
[dev-dependencies]
clap_builder = { version = "4.5.26" }
That should reproduce the error.
Affected Platforms/Targets
To my awareness, all targets when using --engine llvm.
Which means on some platforms on nightly, it's not possible to do coverage at all as llvm is the only/default implementation.
I've tested on:
i686-unknown-linux-gnu
x86_64-unknown-linux-gnu
i686-pc-windows-msvc
x86_64-pc-windows-msvc
I don't have any hardware to text more exotic configurations, but in CI I've also seen failures for:
x86_64-apple-darwin
aarch64-apple-darwin
The default engine on Linux (ptrace) is not affected.
The text was updated successfully, but these errors were encountered:
Sewer56
changed the title
Tarpaulin fails to build binaries with --engine llvm on Nightly (duplicate symbol)
Tarpaulin fails to build binaries with --engine llvm on Nightly, when clap_builder crate is used in a project.
Jan 17, 2025
It's a very curious case; in any case. I don't know the exact details of the project internals here, how it all interacts with LLVM, etc.
Will wait for thoughts/feedback.
After some more poking around, I also noticed that simply depending on clap_builder in any capacity at all causes the build error; so I amended the original post to reflect this.
Notably tarpaulin itself also has a transitive dependency on clap_builder.
Summary
Originally reported as:
Nightly builds of Rust (since around 2025, January, 12) fail to build the
clap_builder
crate when used in a project.(Either directly or transitively)
As caught on my daily cron job that tests a GitHub Composite Action
To Reproduce
dummy_criterion.zip
Here's a dummy library project, with an attached dummy benchmark which uses criterion (most popular benchmarking library).
This is a 'realistic' setup, as benchmarking library projects is a fairly common use case. For a simpler setup
To reproduce the issue, build with
cargo tarpaulin --engine llvm
.Sample stdout (from my machine):
Edit:
If you wish to test with an even simpler setup, simply try building any crate with a (direct or transitive) dependency on
clap_builder
, i.e.That should reproduce the error.
Affected Platforms/Targets
To my awareness, all targets when using
--engine llvm
.Which means on some platforms on nightly, it's not possible to do coverage at all as
llvm
is the only/default implementation.I've tested on:
I don't have any hardware to text more exotic configurations, but in CI I've also seen failures for:
The default engine on Linux (ptrace) is not affected.
The text was updated successfully, but these errors were encountered: