Skip to content

Version 0.2.0 doesn't compile, missing sys.rs? #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
davidko opened this issue Dec 5, 2016 · 6 comments
Closed

Version 0.2.0 doesn't compile, missing sys.rs? #10

davidko opened this issue Dec 5, 2016 · 6 comments

Comments

@davidko
Copy link

davidko commented Dec 5, 2016

Commit 45c353d introduces a line in lib.rs:9 "mod sys;", but there is no sys.rs or sys/mod.rs committed. Is this a missing file?

Related: When I try to compile errno 0.2.0, I get:

/home/dko/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.0/src/lib.rs:9:5: 9:8 error: file not found for module sys
/home/dko/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.0/src/lib.rs:9 mod sys;
^~~
/home/dko/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.0/src/lib.rs:9:5: 9:8 help: name the file either sys.rs or sys/mod.rs inside the directory "/home/dko/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.0/src"
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
error: Could not compile errno.

To learn more, run the command again with --verbose.

@lambda-fairy
Copy link
Owner

There is no sys.rs, because the code uses the #[cfg_attr] attribute to select either unix.rs or windows.rs depending on the platform.

Can you give me more info about your platform, rustc version, etc.? I haven't been able to reproduce that error, whether on my machine or on CI.

@davidko
Copy link
Author

davidko commented Dec 5, 2016 via email

@lambda-fairy
Copy link
Owner

Aha! It's probably rust-lang/rust#25544, which was fixed after 1.10 was released. If the issue is what I think it is, then upgrading should fix the problem.

@lambda-fairy
Copy link
Owner

I did some testing. Rust 1.12 accepts the code without error, but Rust 1.11 fails with the error you describe.

I'll refactor the code so that it works on both.

@lambda-fairy
Copy link
Owner

Released as 0.2.1. Thanks for reporting!

@davidko
Copy link
Author

davidko commented Dec 6, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants