- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.
Description
Trying to build the latest libstd outside of the rustc build itself (i.e., using xargo and the rust-src component) results in warnings and build failures:
warning: use of deprecated item: gcc::Config has been renamed to gcc::Build
    --> /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/rustc/compiler_builtins_shim/../../libcompiler_builtins/build.rs:4011:24
     |
4011 |         let cfg = &mut gcc::Config::new();
     |                        ^^^^^^^^^^^^^^^^
     |
     = note: #[warn(deprecated)] on by default
error: use of deprecated item: gcc::Config has been renamed to gcc::Build
  --> /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/build.rs:80:20
   |
80 |     let compiler = gcc::Config::new().get_compiler();
   |                    ^^^^^^^^^^^^^^^^
   |
note: lint level defined here
  --> /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/build.rs:11:9
   |
11 | #![deny(warnings)]
   |         ^^^^^^^^
   = note: #[deny(deprecated)] implied by #[deny(warnings)]
error: use of deprecated item: gcc::Config has been renamed to gcc::Build
  --> /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc_jemalloc/build.rs:66:20
   |
66 |     let compiler = gcc::Config::new().get_compiler();
   |                    ^^^^^^^^^^^^^^^^
   |
note: lint level defined here
  --> /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc_jemalloc/build.rs:11:9
   |
11 | #![deny(warnings)]
   |         ^^^^^^^^
   = note: #[deny(deprecated)] implied by #[deny(warnings)]
error: use of deprecated item: gcc::Config has been renamed to gcc::Build
   --> /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc_jemalloc/build.rs:173:9
    |
173 |         gcc::Config::new()
    |         ^^^^^^^^^^^^^^^^
I think what happens is that the lock file in rustc itself makes rustc still use an older version of the gcc crate, but since that crate deprecated gcc::Config in a minor release, and since some crates in rustc have deny(warnings), the gcc minor version upgrade breaks the build here. libstd's Cargo.toml says gcc = "0.3.50", so cargo will happily use 0.3.52 instead.
I tried fixing this by using gcc::Build rather than gcc::Config in rustc itself, but then it complains that there is no Build in gcc. Seems like I have to find some way to upgrade the version of the gcc crate that rustc uses?
ids1024 and divyamistry
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.