"error: Unknown option" while building
Closed this issue · 3 comments
Could please help me compiling your project a bit :)
First, I have rustup
1.18.3 (435397f48 2019-05-22) and cargo
1.36.0 (c4fcfb725 2019-05-15) installed. And $HOME/.cargo/bin
is present in my $PATH
.
Now, I cloned your repository, and if I try to run cargo build
in it, it installs crates (I see those in $HOME/.cargo/registry/index
) and then fails saying "error: Unknown option".
And if I try to run rusts src/main.rs
, it fails saying something like the following:
error[E0432]: unresolved import `clap`
--> src/main.rs:1:5
|
1 | use clap::{App, Arg};
| ^^^^ maybe a missing `extern crate clap;`?
error[E0433]: failed to resolve: maybe a missing `extern crate termcolor;`?
--> src/main.rs:7:5
|
7 | use termcolor::{
| ^^^^^^^^^ maybe a missing `extern crate termcolor;`?
[rest skipped]
As if it doesn't see installed crates from $HOME/.cargo/registry
for some reason... So, what could be wrong here? Any hints may be? :)
Thanks.
hi @for-coursera,
I am a bit puzzled about your issue.
First of all, you probably want to use cargo to build the dependencies (clap and termcolor) and not call rustc directly yourself.
I set up the CI build, which should at least give you a recipe to build the project.
What is the output of cargo build --verbose
?
What is the output of
cargo build --verbose
?
Same:
diffr> cargo build --verbose
Updating crates.io index
error: Unknown option
(Just in case, it does updates crates in the process.)
Could it be related to my macOS being too old? cargo
is all fresh, though.
I think it is a good issue for the cargo people indeed. I will not be able to reproduce it.
What is your version of osx?