Hello, I have yesterday ran into this linker issue when executing cargo test
, but not cargo build
.
error: linking with `cc` failed: exit status: 1
|
(...)
= note: /home/.../code/.../production/device/APU/target/debug/deps/event_publisher_macro-067da5dc8c3e3607.dboylq6anpojh5z.rcgu.o: In function `<T as core::convert::Into<U>>::into':
/rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/convert/mod.rs:540: undefined reference to `<T as core::convert::From<T>>::from'
collect2: error: ld returned 1 exit status
= help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
I have never seen this issue before and I did not add or remove any libraries. The error message is telling me that it can't link against core library conversion functions. What is happening here?