Skip to content
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

Fails to build for Mac OS #26

Closed
slimsag opened this issue Apr 30, 2018 · 2 comments
Closed

Fails to build for Mac OS #26

slimsag opened this issue Apr 30, 2018 · 2 comments

Comments

@slimsag
Copy link

slimsag commented Apr 30, 2018

On Mac OS, using the latest Rust nightly version, cloning and building this crate fails:

$ cargo run --example atty
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling libc v0.2.40                                                       
   Compiling atty v0.2.9 (file:///Users/stephen/drive/hexops/hexi/display/tmp/atty)
error[E0428]: the name `is` is defined multiple times
   --> src/lib.rs:164:1
    |
40  | pub fn is(stream: Stream) -> bool {
    | --------------------------------- previous definition of the value `is` here
...
164 | pub fn is(_stream: Stream) -> bool {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `is` redefined here
    |
    = note: `is` must be defined only once in the value namespace of this module

error: aborting due to previous error

For more information about this error, try `rustc --explain E0428`.
error: Could not compile `atty`.

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

This may be the same regression as #21

@BurntSushi
Copy link
Contributor

Are you trying to do a wasm build? Like 164 is #[cfg(target_arch = "wasm32")], so I'm not sure how that's possible in a normal darwin build.

@slimsag
Copy link
Author

slimsag commented Apr 30, 2018

@BurntSushi No, I am trying to build for x86_64-apple-darwin.

I see now (right before you posted your message) that something is actually wrong with my Rust installation somehow because cargo run --example atty is trying to do a wasm build by default and cargo run --target=x86_64-apple-darwin --example atty works fine.

Apologies for the false issue :/ I'll try to figure out why my Rust installation is like this.

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