mozilla / sccache

Sccache is a ccache-like tool. It is used as a compiler wrapper and avoids compilation when possible. Sccache has the capability to utilize caching in remote storage environments, including various cloud storage options, or alternatively, in local storage.
Apache License 2.0
5.83k stars 547 forks source link

Document minimum required version of Rust + Cargo in README #39

Closed andreparodi closed 7 years ago

andreparodi commented 7 years ago

I trying to build on ubuntu 16.04 and getting and error. Is there any chance you could provide some more detailed instruction about what dependencies need to be installed. rust, docker? what is the prefered install method?

Unable to find image 'luser/rust-musl-builder:latest' locally latest: Pulling from luser/rust-musl-builder 357ea8c3d80b: Pull complete a3ed95caeb02: Pull complete 17eec89006f1: Pull complete b90aacaf5477: Pull complete 09416fd865ce: Pull complete 5e7229b6f848: Pull complete 92f5a003f128: Pull complete 859d74d4ebb3: Pull complete caabe158e9f8: Pull complete Digest: sha256:60e50d539670cc756ef95f686ec82fe848e4d341c6017313876332cc737f137c Status: Downloaded newer image for luser/rust-musl-builder:latest error: Permission denied (os error 13)

tried modifying the build script to run with sudo but no luck. i'm new to rust and docker so could be i'm missing something very obvious.

luser commented 7 years ago

You should be able to simply run cargo build to build the binary, or cargo build --release if you want an optimized binary. The build-release script is just what I use to build release binaries locally, it depends on some quirky things.

Once I get a few more things together I'd like to publish prebuilt binaries via GitHub releases, which should make things simpler for people.

andreparodi commented 7 years ago

thanks @luser

didn't realise that was the standard build command for rust. thanks.

i face a different problem now.

''' andrep@bardtw2827 ~/dev/sccache (master) $ cargo -V cargo 0.8.0 (built 2016-03-22) andrep@bardtw2827 ~/dev/sccache (master) $ cargo build failed to parse manifest at /home/andrep/dev/sccache/Cargo.toml

Caused by: could not parse input as TOML Cargo.toml:34:9 expected a key but found an empty string Cargo.toml:34:9-34:10 expected ., but found '

'''

seems think the cfg(unix) might be causing the problem.

luser commented 7 years ago

I don't know specifically what version of Rust+cargo the project requires, but I've been building it locally with Rust 1.12, which ships with cargo 0.13. The build automation I set up with Travis only tests against the latest stable Rust release and nothing older, so it's entirely likely that it requires Rust 1.12 (and its matching cargo).

I'd recommend installing Rust via rustup, which makes it easy to keep your Rust toolchain up-to-date.

luser commented 7 years ago

It looks like support for [target.'cfg(...)'.dependencies] first shipped in cargo 0.9, so we definitely require at least that version: https://github.com/rust-lang/cargo/commit/4739ba1db4c31951c109873210578a32496bce0b

luser commented 7 years ago

Since my change to use lru-cache we'll require Rust 1.9.0. I'll document this and add building against that version to the CI.

luser commented 7 years ago

Apparently futures requires Rust 1.10: https://github.com/rust-lang/rust/issues/31767

luser commented 7 years ago

Apparently building only requires Rust 1.10, but building tests requires Rust 1.12, because I'm using the From<T> impl for Option<T>.

luser commented 7 years ago

I noted that the minimum required Rust version is 1.12 in the README: https://github.com/mozilla/sccache/commit/982ff329b26fd21c6b1db81bee21683f10d4155b

I added builds against Rust 1.12 to the Travis CI, so we should be able to guarantee that we don't unintentionally break that.