Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows code coverage is broken with undefined reference to __imp__ZN15crossbeam_ #3680

Closed
sylvestre opened this issue Jun 28, 2022 · 2 comments

Comments

@sylvestre
Copy link
Sponsor Contributor

Opened here:
mozilla/grcov#849

I tried to fix this:
#3665
but failed

@anastygnome
Copy link
Contributor

anastygnome commented Jun 28, 2022

Following the issues chain,
rust-lang/rust#98302 is the culprit there.

This is beyond us.

@marco-c
Copy link

marco-c commented Jul 6, 2022

The fix for this issue is in theory really easy: just need to pin crossbeam-epoch to 0.9.8.

In grcov itself, we don't even need crossbeam-epoch directly as we are using only crossbeam-channels, so I can remove that dependency (#859).

The problem is that we are using rayon, and rayon depends on crossbeam-deque, which depends on crossbeam-epoch.

It looks like there is a way to override transitive dependencies in Cargo.toml, https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section, but it appears to only be possible to override them with a path or a git repo and when you do that, the crate is not publishable anymore.

A possibiliy could be to, in your CI, clone grcov and override the dependency in grcov's Cargo.toml to point to the older crossbeam (similar to what m-ab-s/media-autobuild_suite@85fc88b is doing). Another possibility would be to use an older grcov, but ensure that cargo is using grcov's Cargo.lock to install it (so it uses the exact versions specified in Cargo.lock and not the relaxed ones from Cargo.toml)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants