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

Build failed [Solved?] #21

Open
richb-hanover opened this issue Jun 4, 2020 · 1 comment
Open

Build failed [Solved?] #21

richb-hanover opened this issue Jun 4, 2020 · 1 comment

Comments

@richb-hanover
Copy link

richb-hanover commented Jun 4, 2020

Using macOS 10.15.4, I got a "build failed" error message. Not being a Rust guy, I don't know what to look at next. What other information could I provide? Thanks.

bash-3.2$ cargo install wireguard-vanity-address
    Updating registry `https://github.com/rust-lang/crates.io-index`
  Installing wireguard-vanity-address v0.4.0
   Compiling subtle v2.1.1
   Compiling scopeguard v1.0.0
   Compiling libc v0.2.62
   Compiling strsim v0.8.0
   Compiling memoffset v0.5.1
   Compiling unicode-width v0.1.6
   Compiling nodrop v0.1.13
   Compiling rand_core v0.4.2
error: expected identifier, found keyword `type`
  --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/memoffset-0.5.1/src/offset_of.rs:41:20
   |
41 |     ($name:ident, $type:tt) => {
   |                    ^^^^

error: expected identifier, found keyword `type`
  --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/memoffset-0.5.1/src/offset_of.rs:44:48
   |
44 |         let non_null = $crate::ptr::NonNull::<$type>::dangling();
   |                                                ^^^^

error: expected identifier, found keyword `type`
  --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/memoffset-0.5.1/src/offset_of.rs:45:50
   |
45 |         let $name = non_null.as_ptr() as *const $type;
   |                                                  ^^^^

error: expected identifier, found keyword `type`
  --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/memoffset-0.5.1/src/offset_of.rs:53:7
   |
53 |     ($type:tt, $field:tt) => {
   |       ^^^^

error: expected identifier, found keyword `type`
  --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/memoffset-0.5.1/src/offset_of.rs:57:14
   |
57 |         let $type { $field: _, .. };
   |              ^^^^

error[E0432]: unresolved import `std::mem::ManuallyDrop`
   --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/scopeguard-1.0.0/src/lib.rs:196:22
    |
196 | use std::mem::{self, ManuallyDrop};
    |                      ^^^^^^^^^^^^ no `ManuallyDrop` in `mem`

error: aborting due to 5 previous errors

error: Could not compile `memoffset`.
Build failed, waiting for other jobs to finish...
error: the type of this value must be known in this context
   --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/scopeguard-1.0.0/src/lib.rs:459:13
    |
459 |             dropfn(value);
    |             ^^^^^^^^^^^^^

error: aborting due to previous error

error: Could not compile `scopeguard`.
Build failed, waiting for other jobs to finish...
error: struct field shorthands are unstable (see issue #37340)
   --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.4.2/src/error.rs:102:21
    |
102 |             Error { kind, msg, cause: None }
    |                     ^^^^

error: struct field shorthands are unstable (see issue #37340)
   --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.4.2/src/error.rs:102:27
    |
102 |             Error { kind, msg, cause: None }
    |                           ^^^

error: struct field shorthands are unstable (see issue #37340)
   --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.4.2/src/error.rs:122:17
    |
122 |         Error { kind, msg, cause: Some(cause.into()) }
    |                 ^^^^

error: struct field shorthands are unstable (see issue #37340)
   --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.4.2/src/error.rs:122:23
    |
122 |         Error { kind, msg, cause: Some(cause.into()) }
    |                       ^^^

error: struct field shorthands are unstable (see issue #37340)
   --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.4.2/src/block.rs:138:13
    |
138 |             core,
    |             ^^^^

error: struct field shorthands are unstable (see issue #37340)
   --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.4.2/src/block.rs:311:13
    |
311 |             core,
    |             ^^^^

error: aborting due to 6 previous errors

error: Could not compile `rand_core`.
Build failed, waiting for other jobs to finish...
error: no method named `max` found for type `usize` in the current scope
   --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/strsim-0.8.0/src/lib.rs:190:59
    |
190 |     1.0 - (levenshtein(a, b) as f64) / (a.chars().count().max(b.chars().count()) as f64)
    |                                                           ^^^
    |
    = note: the method `max` exists but the following trait bounds were not satisfied: `usize : std::iter::Iterator`

error: no method named `max` found for type `usize` in the current scope
   --> /Users/richb/.cargo/registry/src/github.com-1ecc6299db9ec823/strsim-0.8.0/src/lib.rs:333:67
    |
333 |     1.0 - (damerau_levenshtein(a, b) as f64) / (a.chars().count().max(b.chars().count()) as f64)
    |                                                                   ^^^
    |
    = note: the method `max` exists but the following trait bounds were not satisfied: `usize : std::iter::Iterator`

error: aborting due to 2 previous errors

error: Could not compile `strsim`.
Build failed, waiting for other jobs to finish...
error: failed to compile `wireguard-vanity-address v0.4.0`, intermediate artifacts can be found at `/var/folders/t7/txh6j62h8xjfkd0059b7m_k00000gn/T/cargo-install.mrOexw7s7REN`

Caused by:
  build failed
bash-3.2$
@richb-hanover
Copy link
Author

(Sort of) Solved...

I spun up a Ubuntu 20.04 VM and sudo apt install cargo followed by cargo install wireguard-vanity-address worked perfectly.

@richb-hanover richb-hanover changed the title Build failed Build failed [Solved?] Jun 8, 2020
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

1 participant