-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
When building a project cross-platform that depends on crunchy:
cargo build --target x86_64-pc-windows-gnu
This currently fails with an error like this:
error: couldn't read /home/runner/work/reth/reth/target/x86_64-pc-windows-gnu/debug/build/crunchy-f1c0e4cba7d0aa5b/out\lib.rs: No such file or directory (os error 2)
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crunchy-0.2.3/src/lib.rs:37:1
|
37 | include!(concat!(env!("OUT_DIR"), "\\lib.rs"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)
error: could not compile `crunchy` (lib) due to 1 previous error
I'm not sure why the lib.rs
needs to be included like this, but now any project that uses crunchy requires that the host path separator is the same as the target path separator.
Lines 36 to 40 in df1e539
#[cfg(target_os = "windows")] | |
include!(concat!(env!("OUT_DIR"), "\\lib.rs")); | |
#[cfg(not(target_os = "windows"))] | |
include!(concat!(env!("OUT_DIR"), "/lib.rs")); |
wjones127, jjohannes, skutcher, okulch-hence, Firaenix and 9 more
Metadata
Metadata
Assignees
Labels
No labels