Closed
Description
Using procedural derive macros on musl seems to work just fine for the most of the cases, but there is one pitfall; in some cases like this dtolnay/proc-macro-hack#6 build fails because not only the crate that implements the macro (crate marked with proc-macro = true
), but also another, normal crate links to the proc_macro
crate. "Normal" crates are unable to find proc_macro
when built on musl target:
Compiling proc-macro-hack v0.3.0
error[E0463]: can't find crate for `proc_macro`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-hack-0.3.0/src/lib.rs:1:1
|
1 | extern crate proc_macro;
| ^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
error: aborting due to previous error
error: Could not compile `proc-macro-hack`.