Skip to content

rustc (beta) compilation problem when using tarball #148455

@semarie

Description

@semarie

I have a problem for building rustc (beta) using tarball with vendored crates.

The build fail early with:

Building bootstrap
running: /usr/local/bin/cargo build --jobs=default --manifest-path /data/semarie/build-rust/build_dir/rustc-beta-src/src/bootstrap/Cargo.toml -Zroot-dir=/data/semarie/build-rust/build_dir/rustc-beta-src --frozen
error: duplicate key
  --> vendor/libffi-sys-4.0.0/Cargo.toml:46:1
   |
46 | default = ["std"]
   | ^^^^^^^
error: failed to get `cc` as a dependency of package `bootstrap v0.0.0 (/data/semarie/build-rust/build_dir/rustc-beta-src/src/bootstrap)`

Caused by:
  failed to load source for dependency `cc`

Caused by:
  Unable to update registry `crates-io`

Caused by:
  failed to update replaced source registry `crates-io`
Traceback (most recent call last):
  File "/data/semarie/build-rust/build_dir/rustc-beta-src/x.py", line 53, in <module>
    bootstrap.main()
  File "/data/semarie/build-rust/build_dir/rustc-beta-src/src/bootstrap/bootstrap.py", line 1410, in main
    bootstrap(args)
  File "/data/semarie/build-rust/build_dir/rustc-beta-src/src/bootstrap/bootstrap.py", line 1362, in bootstrap
    build.build_bootstrap()
  File "/data/semarie/build-rust/build_dir/rustc-beta-src/src/bootstrap/bootstrap.py", line 1029, in build_bootstrap
    run(args, env=env, verbose=self.verbose, cwd=self.rust_root)
  File "/data/semarie/build-rust/build_dir/rustc-beta-src/src/bootstrap/bootstrap.py", line 237, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /usr/local/bin/cargo build --jobs=default --manifest-path /data/semarie/build-rust/build_dir/rustc-beta-src/src/bootstrap/Cargo.toml -Zroot-dir=/data/semarie/build-rust/build_dir/rustc-beta-src --frozen

After checking vendor/libffi-sys-4.0.0/Cargo.toml, the problem seems the crate has two default keys defined:

[features]
default = ["system"]
check_only = []
complex = []
default = ["std"]
std = []
system = []

I am unsure about the origin of the problem as libffi-sys 4.0.0 seems fine in its repository

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions