Skip to content

Install is failing on a Debian sid on failed to read /root/rust/src/tools/rust-installer/Cargo.toml #42030

Closed
@sylvestre

Description

@sylvestre
Contributor

Trying to build following the documentation is failing on a Debian sid (aka unstable) in a chroot:

# ./x.py build && sudo ./x.py dist --install
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. Note that if this
      does not work you should run a normal build first
      before running a command like `sudo make install`
downloading https://static.rust-lang.org/dist/2017-04-25/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz
######################################################################## 100.0%
extracting /root/rust/build/cache/2017-04-25/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz
downloading https://static.rust-lang.org/dist/2017-04-25/rustc-beta-x86_64-unknown-linux-gnu.tar.gz
######################################################################## 100.0%
extracting /root/rust/build/cache/2017-04-25/rustc-beta-x86_64-unknown-linux-gnu.tar.gz
downloading https://static.rust-lang.org/dist/2017-04-25/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
######################################################################## 100.0%
extracting /root/rust/build/cache/2017-04-25/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
error: failed to read `/root/rust/src/tools/rust-installer/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
Build completed unsuccessfully in 0:00:56

Then, running

 git submodule update --init
./x.py build && sudo ./x.py dist --install

gives:

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. Note that if this
      does not work you should run a normal build first
      before running a command like `sudo make install`
error: failed to load source for a dependency on `gcc`

Caused by:
  Unable to update registry https://github.com/rust-lang/crates.io-index

Caused by:
  failed to update replaced source `registry https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to read root of directory source: /root/rust/src/vendor

To learn more, run the command again with --verbose.
Build completed unsuccessfully in 0:00:00

/root/rust/src/vendor doesn't exist

Activity

est31

est31 commented on May 16, 2017

@est31
Member

Dupe of #40108

sylvestre

sylvestre commented on May 16, 2017

@sylvestre
ContributorAuthor

the second part of my bug is a dupe, not the first one ( error: failed to read /root/rust/src/tools/rust-installer/Cargo.toml )

cuviper

cuviper commented on May 16, 2017

@cuviper
Member

Ugh -- I added rust-installer to the main workspace, but that means bootstrap can't build at all when the workspace is incomplete, so we never get the chance to automatically update submodules.

@alexcrichton any suggestions?

alexcrichton

alexcrichton commented on May 16, 2017

@alexcrichton
Member

Bah this actually isn't the first time we've hit this bug, I should have caught this in review!

@cuviper I think the solution is to move the submodule logic to the python x.py script instead of rustbuild itself, and that's currently happening as part of #40291, but if it happens ahead of that I think that'd also be ok!

cuviper

cuviper commented on May 16, 2017

@cuviper
Member

You linked the #40291 issue twice -- is there a different number where the submodule logic is changing?

alexcrichton

alexcrichton commented on May 16, 2017

@alexcrichton
Member

Oops sorry about that, the second link was intended to be #41639

alexcrichton

alexcrichton commented on May 20, 2017

@alexcrichton
Member

#41639 has landed, so closing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @cuviper@alexcrichton@sylvestre@est31

        Issue actions

          Install is failing on a Debian sid on failed to read `/root/rust/src/tools/rust-installer/Cargo.toml` · Issue #42030 · rust-lang/rust