Re: [PATCH] rust: kbuild: disambiguate `zerocopy_derive` for `rusttest`
Miguel Ojeda <[email protected]>
| Newsgroups | org.kernel.vger.rust-for-linux,org.kernel.vger.linux-kbuild,org.kernel.vger.stable |
|---|---|
| Message-ID | <CANiq72=AXhvxG3TD5QgnLMmL1hcPyahn55wO28MOsWTAo6F_Ww@mail.gmail.com> |
On Sun, Aug 23, 2026 at 9:35 PM Miguel Ojeda <[email protected]> wrote: > > The `rustc-dev` components for Rust 1.82.0 through 1.87.0 include a > precompiled `zerocopy_derive` procedural macro in the sysroot. This > range includes Rust 1.85.0, our minimum supported version. > > This makes `rusttest` fail because the compiler finds both the sysroot > copy and the copy built in `rust/test`: > > error[E0464]: multiple candidates for `dylib` dependency `zerocopy_derive` found > --> rust/kernel/prelude.rs:70:9 > | > 70 | pub use zerocopy_derive::{ > | ^^^^^^^^^^^^^^^ > | > = note: candidate #1: .../lib/rustlib/x86_64-unknown-linux-gnu/lib/libzerocopy_derive-54d2b38896fa6bc5.so > = note: candidate #2: .../rust/test/libzerocopy_derive.so > > Commit fe39a233ea52 ("rust: kbuild: disambiguate `zerocopy` for > `rusttest`") fixed the equivalent ambiguity for `zerocopy`. > > Thus point to the dependency explicitly in this case too. > > Cc: Antoni Boucher <[email protected]> > Cc: [email protected] > Fixes: 506054980429 ("rust: zerocopy-derive: enable support in kbuild") > Signed-off-by: Miguel Ojeda <[email protected]> Applied to `rust-fixes`. Cheers, Miguel