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

Cargo does not compile code: no such file or directory #1337

Closed
greggawatt opened this issue Feb 23, 2015 · 7 comments
Closed

Cargo does not compile code: no such file or directory #1337

greggawatt opened this issue Feb 23, 2015 · 7 comments

Comments

@greggawatt
Copy link

Cargo giving a weird error, following directions exactly from the rust book. My code is here if you want to test it out: https://github.com/greggawatt/rust-intro

Running OSX yosemite, zsh shell

cargo build --verbose
   Compiling hello_world v0.0.1 (file:///Users/gregg/Development/rust-intro)
     Running `rustc src/main.rs --crate-name hello_world --crate-type bin -g --out-dir /Users/gregg/Development/rust-intro/target --emit=dep-info,link -L dependency=/Users/gregg/Development/rust-intro/target -L dependency=/Users/gregg/Development/rust-intro/target/deps`
Could not compile `hello_world`.

Caused by:
  Could not execute process `rustc src/main.rs --crate-name hello_world --crate-type bin -g --out-dir /Users/gregg/Development/rust-intro/target --emit=dep-info,link -L dependency=/Users/gregg/Development/rust-intro/target -L dependency=/Users/gregg/Development/rust-intro/target/deps` (status=never executed)

Caused by:
  no such file or directory
@steveklabnik
Copy link
Member

It's also worth noting that when @greggawatt runs the rustc command by itself, it does work, so it's something weird in cargo

@alexcrichton
Copy link
Member

I believe this is a dupe of #987. Unfortunately I have not been able to track down why this is happening because I am unable to duplicate it myself. If you've got anything more to add to the thread though, please feel free to post a comment!

@greggawatt
Copy link
Author

Would it be at least useful to improve the verbose output so we know what file or directory is not found?

@alexcrichton
Copy link
Member

Unfortunately the only cause for "no such file or directory" when executing a process that I know of is that the executable rustc was not found. That's quite puzzling, however, because you clearly have rustc and it's in your PATH so I'm not quite sure what's going on :(

@greggawatt
Copy link
Author

Was the other person running zsh? I know there are sometimes weird path issues there.

@alexcrichton
Copy link
Member

It's not mentioned specifically, but I would suspect the answer would be yes.

@greggawatt
Copy link
Author

I will try this in straight terminal and see what happens.

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

3 participants