Minimal build requirements for rust compiler not specified
Is your feature request related to a problem? Please describe.
I run spotifyd on a i386 machine, which means I need to compile my own binaries. With the v0.2.24 version, the build with the following error.
$ cargo build --release
Compiling whoami v0.7.0
Compiling libc v0.2.66
Compiling crossbeam-utils v0.7.0
error[E0658]: the `#[non_exhaustive]` attribute is an experimental feature
--> /home/tom/.cargo/registry/src/github.com-1ecc6299db9ec823/whoami-0.7.0/src/lib.rs:44:1
|
44 | #[non_exhaustive]
| ^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/44109
error[E0658]: the `#[non_exhaustive]` attribute is an experimental feature
--> /home/tom/.cargo/registry/src/github.com-1ecc6299db9ec823/whoami-0.7.0/src/lib.rs:106:1
|
106 | #[non_exhaustive]
| ^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/44109
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0658`.
error: could not compile `whoami`.
warning: build failed, waiting for other jobs to finish...
error: build failed
tom@julie:/opt/spotifyd$ rustc --version
rustc 1.39.0
tom@julie:/opt/spotifyd$ dpkg -l rustc
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=================================-=====================-=====================-========================================================================
ii rustc 1.39.0+dfsg1+llvm-3ub i386 Rust systems programming language
tom@julie:/opt/spotifyd$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
After some googling, I found this https://github.com/NetBSD/pkgsrc-wip/commit/8a278d23c2b554fe05f84533fa1dbd1fe3bf8202, which seems to indicate that I need a newer version of the rust compiler. In the README no minimal version of the compiler is described.
Describe the solution you'd like Two solutions come to mind:
- Allow compiling spotifyd and dependencies with any rust compiler. It would be nice if I wouldn't need to find out how to upgrade my compiler (without performing a dist-upgrade). spotifyd is the only rust program I'm compiling. I have no idea if this is possible, I never developed anything in rust.
- Document minimal toolchain versions in the README
Generally speaking, I always use the latest stable version of Rust for development. I normally do not use my distro's Rust version but instead use the official way to install it, rustup.
The newest version is 1.41.1, released on the 24th of February.
Rust supports a so called rust-toolchain file that could be used to pin to a version, I'll add it later. Normally, when rustc is invoked, It'll then check if it matches the version specified in that file and if not it will update itself.
I've installed the newest rust compiler using rustup now, and built the latest tag successfully. I already knew about rustup, but it was hard work to actually find out that the problem I was having, was caused by the compiler being too old.
So documenting the minimal version of the rust compiler to use (or verifying during the build and giving a clear error message during the build) would have been a great help during that process.
I first installed the packaged binaries of rustc from Debian 10 repository (1.34). The build failed and I immediately suspected it was due to the compiler version. Purged it, re-installed via rustup (1.43) and then everything turns out working fine (more or less). Though, It would have been nice to have a minimum compiler version requirement in the README, imho.
Yes, will do so! Sorry for the missing information on my side.