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

rustbuild doesn't honor cargo path in config.toml anymore #49776

Closed
semarie opened this issue Apr 8, 2018 · 4 comments
Closed

rustbuild doesn't honor cargo path in config.toml anymore #49776

semarie opened this issue Apr 8, 2018 · 4 comments

Comments

@semarie
Copy link
Contributor

semarie commented Apr 8, 2018

I am building rustc-nightly using tarball.

Currently, I am not able to build rustc-nightly anymore, due to rustbuild error:

failed to execute command: "/data/semarie/build-rust/build_dir/build/x86_64-unknown-openbsd/stage0/bin/cargo" "metadata" "--format-version" "1" "--manifest-path" "/data/semarie/build-rust/build_dir/rustc-nightly-src/src/libstd/Cargo.toml"
error: No such file or directory (os error 2)

rustbuild tries to use cargo from stage0 directory, whereas config.toml has setting for alternate path.

Here my config.toml file:

[build]
rustc = "/data/semarie/build-rust/install_dir/beta/bin/rustc"
cargo = "/data/semarie/build-rust/install_dir/beta/bin/cargo"
python = "/usr/local/bin/python2.7"
gdb = "/usr/local/bin/egdb"
#docs = false
vendor = true
extended = true
verbose = 1

[install]
prefix = "/data/semarie/build-rust/install_dir/nightly"

[dist]
src-tarball = false

[rust]
channel = "nightly"
codegen-tests = false

[target.x86_64-unknown-openbsd]
llvm-config = "/usr/local/bin/llvm-config"

[llvm]
static-libstdcpp = false
ninja = true

cargo and rustc binaries are functional.

Here my build log:

Sun Apr  8 08:55:10 CEST 2018: info: building: 1.27.0-nightly (056f589fb 2018-04-07)
Sun Apr  8 08:55:10 CEST 2018: info: required stage0:
	date: 2018-04-04
	rustc: beta
	cargo: beta
Sun Apr  8 08:55:10 CEST 2018: info: rustc -vV
	rustc 1.26.0-beta
	binary: rustc
	commit-hash: unknown
	commit-date: unknown
	host: x86_64-unknown-openbsd
	release: 1.26.0-beta
	LLVM version: 6.0
Sun Apr  8 08:55:18 CEST 2018: info: cargo -vV
	cargo 1.26.0-beta
	release: 1.26.0
Sun Apr  8 08:55:18 CEST 2018: starting rustbuild dist --jobs=4
running: /data/semarie/build-rust/install_dir/beta/bin/cargo build --manifest-path /data/semarie/build-rust/build_dir/rustc-nightly-src/src/bootstrap/Cargo.toml --frozen
   Compiling unicode-xid v0.1.0
   Compiling dtoa v0.4.2
   Compiling libc v0.2.40
   Compiling serde v1.0.37
   Compiling cc v1.0.9
   Compiling num-traits v0.2.2
   Compiling itoa v0.4.1
   Compiling cfg-if v0.1.2
   Compiling fixedbitset v0.1.9
   Compiling ordermap v0.3.5
   Compiling getopts v0.2.17
   Compiling lazy_static v0.2.11
   Compiling build_helper v0.1.0 (file:///data/semarie/build-rust/build_dir/rustc-nightly-src/src/build_helper)
   Compiling proc-macro2 v0.3.1
   Compiling time v0.1.39
   Compiling num_cpus v1.8.0
   Compiling filetime v0.1.15
   Compiling cmake v0.1.29
   Compiling petgraph v0.4.12
   Compiling quote v0.5.1
   Compiling syn v0.13.1
   Compiling serde_json v1.0.13
   Compiling toml v0.4.5
   Compiling serde_derive_internals v0.23.0
   Compiling serde_derive v1.0.37
   Compiling bootstrap v0.0.0 (file:///data/semarie/build-rust/build_dir/rustc-nightly-src/src/bootstrap)
    Finished dev [unoptimized] target(s) in 185.91 secs
running: /data/semarie/build-rust/build_dir/build/bootstrap/debug/bootstrap dist --jobs=4
finding compilers
CC_x86_64-unknown-openbsd = "cc"
AR_x86_64-unknown-openbsd = "ar"
CXX_x86_64-unknown-openbsd = "c++"
running sanity check
learning about cargo


failed to execute command: "/data/semarie/build-rust/build_dir/build/x86_64-unknown-openbsd/stage0/bin/cargo" "metadata" "--format-version" "1" "--manifest-path" "/data/semarie/build-rust/build_dir/rustc-nightly-src/src/libstd/Cargo.toml"
error: No such file or directory (os error 2)


Traceback (most recent call last):
  File "/data/semarie/build-rust/build_dir/rustc-nightly-src/x.py", line 20, in <module>
    bootstrap.main()
  File "/data/semarie/build-rust/build_dir/rustc-nightly-src/src/bootstrap/bootstrap.py", line 800, in main
    bootstrap(help_triggered)
  File "/data/semarie/build-rust/build_dir/rustc-nightly-src/src/bootstrap/bootstrap.py", line 791, in bootstrap
    run(args, env=env, verbose=build.verbose)
  File "/data/semarie/build-rust/build_dir/rustc-nightly-src/src/bootstrap/bootstrap.py", line 148, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /data/semarie/build-rust/build_dir/build/bootstrap/debug/bootstrap dist --jobs=4
@semarie
Copy link
Contributor Author

semarie commented Apr 8, 2018

cc @Mark-Simulacrum as reverting 8fd42ec seems to correct the behaviour.

build is pending, but it found cargo and rustc, and starts building some crates.

@semarie
Copy link
Contributor Author

semarie commented Apr 8, 2018

The failure occurs inside Config::parse(args) because it calls Flags::parse(args), which (when "verbose" option is present) calls metadata::build(build) with a default build configuration (using initial_cargo pointing to stage0 directory).

The problem is almost the same as #41779

@semarie
Copy link
Contributor Author

semarie commented Apr 8, 2018

hum. unsure finally. it seems the config used should be initialized (from flags.rs):

let config = Config::parse(&["build".to_string()]);

@ishitatsuyuki
Copy link
Contributor

Duplicate of #49741

@ishitatsuyuki ishitatsuyuki marked this as a duplicate of #49741 Apr 8, 2018
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

2 participants