kornelski / cargo-deb

Make Debian packages directly from Rust/Cargo projects
https://lib.rs/cargo-deb
MIT License
431 stars 52 forks source link

Cannot build cargo-deb #72

Closed jamesadevine closed 1 year ago

jamesadevine commented 1 year ago

Running cargo install cargo-deb results in:

   Compiling cargo_toml v0.14.0
error[E0658]: use of unstable library feature 'scoped_threads'
   --> /home/james/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-deb-1.42.0/src/data.rs:128:5
    |
128 |     std::thread::scope(move |s| {
    |     ^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #93203 <https://github.com/rust-lang/rust/issues/93203> for more information

error[E0658]: use of unstable library feature 'scoped_threads'
   --> /home/james/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-deb-1.42.0/src/data.rs:130:29
    |
130 |         let hash_thread = s.spawn(move || {
    |                             ^^^^^
    |
    = note: see issue #93203 <https://github.com/rust-lang/rust/issues/93203> for more information

error[E0658]: use of unstable library feature 'scoped_threads'
   --> /home/james/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-deb-1.42.0/src/data.rs:162:24
    |
162 |         Ok(hash_thread.join().unwrap())
    |                        ^^^^
    |
    = note: see issue #93203 <https://github.com/rust-lang/rust/issues/93203> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `cargo-deb` due to 3 previous errors
error: failed to compile `cargo-deb v1.42.0`, intermediate artifacts can be found at `/tmp/cargo-installfbsSw4`

Apologies if I missed something in the README about this issue.

orhun commented 1 year ago

You can try updating Rust, scoped_threads feature was stabilized in 1.63.

Minimum supported Rust version of cargo-deb is also 1.63.

jamesadevine commented 1 year ago

Duh! Sorry, let me give that a go

kornelski commented 1 year ago

This is why installation instruction in the readme is not cargo install cargo-deb, but:

rustup update
cargo install cargo-deb
jamesadevine commented 1 year ago

Yup - sorry for the noise and thanks for the cool tool!