Skip to content

Building Rust from source with x.py dist uses binary components #90555

Closed
@paulmenzel

Description

@paulmenzel

In issue #86436, @Mark-Simulacrum commented:

FWIW we don't generally expect people to use x.py build in dist tarballs -- x.py dist/install are more likely to work.

I tested ./x.py dist with Rust 1.56.1, but unfortunately, it does not build every component from source, but downloads rust-std, rustc and cargo 1.55.0, containing the binaries.

[…]
+ python3 ./x.py dist
info: looks like you are running this command under `sudo`
      and so in order to preserve your $HOME this will now
      use vendored sources by default.
downloading https://static.rust-lang.org/dist/2021-09-09/rust-std-1.55.0-x86_64-unknown-linux-gnu.tar.xz
######################################################################## 100.0%
extracting /pkg/rustc-1.56.1-0/build/rustc-1.56.1-src/build/cache/2021-09-09/rust-std-1.55.0-x86_64-unknown-linux-gnu.tar.xz
downloading https://static.rust-lang.org/dist/2021-09-09/rustc-1.55.0-x86_64-unknown-linux-gnu.tar.xz
######################################################################## 100.0%
extracting /pkg/rustc-1.56.1-0/build/rustc-1.56.1-src/build/cache/2021-09-09/rustc-1.55.0-x86_64-unknown-linux-gnu.tar.xz
downloading https://static.rust-lang.org/dist/2021-09-09/cargo-1.55.0-x86_64-unknown-linux-gnu.tar.xz
######################################################################## 100.0%
extracting /pkg/rustc-1.56.1-0/build/rustc-1.56.1-src/build/cache/2021-09-09/cargo-1.55.0-x86_64-unknown-linux-gnu.tar.xz
   Compiling proc-macro2 v1.0.24
[…]

Can the already installed Rust in the system be used instead?

Otherwise, x.py build should be the supported way for distributions to build Rust.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions