lambda-fairy / rust-errno

:boom: Cross-platform interface to the `errno` variable
https://docs.rs/errno
Apache License 2.0
64 stars 40 forks source link

error[E0583]: file not found for module sys #76

Open istommao opened 1 year ago

istommao commented 1 year ago

error[E0583]: file not found for module sys

cargo 1.73.0-nightly (7e9de3f4e 2023-08-13) rustc 1.73.0-nightly (https://github.com/rust-lang/rust/commit/180dffba142c47240ca0d93096ce90b9fd97c8d7 2023-08-14) image

kadiwa4 commented 1 year ago

which OS are you compiling for?

istommao commented 1 year ago

which OS are you compiling for?

LInux @kadiwa4

lambda-fairy commented 1 year ago

Linux + Rust nightly is tested in CI. If you want to report an issue with that combination then you'll need to give more info.

istommao commented 1 year ago

substrate node template project, cargo build then report this issue https://github.com/Generative-Labs/Substrate-HotStuff

feat/hotstuff branch

Saratii commented 1 year ago

I can reproduce this on windows.

Satchitananda commented 10 months ago

Can reproduce it on macOS Sonoma

marija-mijailovic commented 7 months ago

Is there some update about this one? I can reproduce it on macOS Monterey(rustc 1.74.0-nightly)

sunfishcode commented 7 months ago

The code in question looks like this:

#[cfg_attr(unix, path = "unix.rs")]
#[cfg_attr(windows, path = "windows.rs")]
#[cfg_attr(target_os = "wasi", path = "wasi.rs")]
#[cfg_attr(target_os = "hermit", path = "hermit.rs")]
mod sys;

As far as I'm aware, Rust always considers macOS to be a unix target, so it should always use the unix path. The repo has a unix.rs file, so that should always be there. I don't have any guesses as to which of those assumptions might be false.

mikkypactreon commented 7 months ago

Any suggested fix or workaround for this issue ?

sunfishcode commented 6 months ago

Could anyone who can reproduce this, please post:

Afetzner commented 6 months ago

I also ran into this issue, but I was trying to target wasm64-unknown-unknown for use with wasm-pack. Since "unknown" does not match unix, windows, wasi, nor hermit, none of the configurations matched and resolved to just the line "mod sys;" without a path. I stopped using wasm-pack and just built instead with build --target wasm32-wasi. I'm still having issues, but I'm confident that's to do with my toolchain. TL;DR double check what your targeting

kleinesfilmroellchen commented 4 months ago

@sunfishcode errno is currently always broken on wasm*-unknown-unknown targets, and I (and others) depend on it through multiple indirections, such as clap or miette. I hope this gets fixed soon.

manish02-code commented 2 months ago

I am also facing the same errors did anyone fix it Screenshot 2024-07-05 124645

connorcarpenter commented 2 months ago

I'm running into this too ..

anyon17 commented 2 days ago

Any resolution to this ? I am building my rust project and this library I believe is a dependency and my target wasm32-unknown-unknown build is failing with the same errors. Command to build: cargo build --target wasm32-unknown-unknown --release

manish02-code commented 2 days ago

Try to clean your project and re-build it

manish02-code commented 2 days ago

Can you share your git repo