Closed
Description
Trying to build beta using downloaded tarball and vendor=true
(in order to test and prepare distribution for OpenBSD packages), I have the following error:
$ python2.7 /data/semarie/build-rust/build_dir/rustc/rustc-beta-src/x.py build
Updating git repository `https://github.com/rust-lang-nursery/rustfmt`
error: failed to load source for a dependency on `rustfmt`
Caused by:
Unable to update https://github.com/rust-lang-nursery/rustfmt?branch=libsyntax#6c1de769
Caused by:
failed to fetch into /home/semarie/.cargo/git/db/rustfmt-5390e0ead582d971
Caused by:
attempting to update a git repository, but --frozen was specified
failed to run: /usr/local/bin/cargo build --manifest-path /data/semarie/build-rust/build_dir/rustc/rustc-beta-src/src/bootstrap/Cargo.toml --frozen
Build completed unsuccessfully in 0:00:00
My config.toml is:
[build]
rustc = "/usr/local/bin/rustc"
cargo = "/usr/local/bin/cargo"
prefix = "/data/semarie/build-rust/install_dir/beta"
docs = false
vendor = true
[dist]
src-tarball = false
[rust]
channel = "beta"
codegen-tests = false
[target.x86_64-unknown-openbsd]
llvm-config = "/usr/local/bin/llvm-config"
$ rustc -vV
rustc 1.18.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-openbsd
release: 1.18.0
LLVM version: 4.0
$ cargo -vV
cargo 0.19.0
release: 0.19.0
The error could be about rustfmt
or cargo
dependency.
It seems that rls have git dependencies defined for them. From src/tools/rls/Cargo.toml
:
[dependencies]
cargo = { git = "https://github.com/rust-lang/cargo" }
rustfmt = { git = "https://github.com/rust-lang-nursery/rustfmt", branch = "libsyntax" }
And even if src/Cargo.toml
has a [replace]
section, it is only for 0.20.0 (and not git head):
"https://github.com/rust-lang/cargo#0.20.0" = { path = "tools/cargo" }
So when cargo tries to resolv dependencies, it tries to download them from network, but fail due to --frozen
.
Please note that when testing, my CARGO_HOME
(~/.cargo
) is empty.