Skip to content

regression: can't find crate #128892

Not planned
Not planned
@BoxyUwU

Description

@BoxyUwU
Member
[INFO] [stdout] error[E0463]: can't find crate for `rasn_compiler_derive`
[INFO] [stdout]   --> /opt/rustwide/workdir/rasn-compiler-tests/src/helpers/mod.rs:14:13
[INFO] [stdout]    |
[INFO] [stdout] 14 |             rasn_compiler_derive::asn1!($asn1);
[INFO] [stdout]    |             ^^^^^^^^^^^^^^^^^^^^ can't find crate

Activity

added
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Aug 9, 2024
added
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Aug 9, 2024
removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Aug 9, 2024
ehuss

ehuss commented on Aug 10, 2024

@ehuss
Contributor

I have a very strong suspicion this is due to this warning:

[INFO] [stderr] warning: output filename collision.
[INFO] [stderr] The lib target `rasn_compiler` in package `rasn-compiler v0.3.0 (/opt/rustwide/workdir/rasn-compiler)` has the same output filename as the lib target `rasn_compiler` in package `rasn-compiler v0.3.0 (/opt/rustwide/workdir/rasn-compiler)`.
[INFO] [stderr] Colliding filename is: /opt/rustwide/target/debug/deps/librasn_compiler.so
[INFO] [stderr] The targets should have unique names.
[INFO] [stderr] Consider changing their names to be unique or compiling them separately.

Because this workspace defines rasn-compiler as a cdylib, and rasn-compiler is used as both a regular and proc-macro dependency, and it is using cargo's resolver="2", the cdylib ends up getting built twice in parallel. One rustc process will stomp over the .so while the other is running.

This is a known bug in cargo, tracked in rust-lang/cargo#6313.

I'm not entirely certain why this is exhibiting as rasn_compiler_derive not found. I would not expect the .so filename collision to affect a proc-macro since the proc-macro should be loading the .rlib, not the .so (and the .rlib has a unique filename).

I cannot reproduce the can't find crate error on any version. I suspect this is not a regression.

added
T-cargoRelevant to the cargo team, which will review and decide on the PR/issue.
and removed
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on Aug 12, 2024
added this to the 1.82.0 milestone on Oct 11, 2024
Mark-Simulacrum

Mark-Simulacrum commented on Oct 11, 2024

@Mark-Simulacrum
Member

I'm going go ahead and close as we think this isn't a regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-cargoRelevant to the cargo team, which will review and decide on the PR/issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ehuss@Mark-Simulacrum@apiraino@BoxyUwU@rustbot

        Issue actions

          regression: can't find crate · Issue #128892 · rust-lang/rust