Skip to content

x.py fails all downloads that use a tempdir with snap curl #107722

Closed
@tharunsuresh-code

Description

@tharunsuresh-code

Hey everyone,

First time setting up Rust for development in my local system. OS version - Kubuntu 22.10
I installed curl using snap then ran the setup script x as follows:

 $ ./x.py setup

It resulted in the following error message -

downloading https://static.rust-lang.org/dist/2023-01-25/rust-std-beta-x86_64-unknown-linux-gnu.tar.xz
################################################################################################################################################################################# 100.0%
invalid checksum:
    found:    e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    expected: 1f95934a853b0ce1f4bc50ac86b1ae74a34acbae8a64903faf6f7ba63e49051b
Traceback (most recent call last):
  File "/media/d_drive/My_files/Visual Studio Code/github/rust/./x.py", line 29, in <module>
    bootstrap.main()
  File "/media/d_drive/My_files/Visual Studio Code/github/rust/src/bootstrap/bootstrap.py", line 939, in main
    bootstrap(args)
  File "/media/d_drive/My_files/Visual Studio Code/github/rust/src/bootstrap/bootstrap.py", line 904, in bootstrap
    build.download_toolchain()
  File "/media/d_drive/My_files/Visual Studio Code/github/rust/src/bootstrap/bootstrap.py", line 433, in download_toolchain
    self._download_component_helper(filename, pattern, tarball_suffix)
  File "/media/d_drive/My_files/Visual Studio Code/github/rust/src/bootstrap/bootstrap.py", line 465, in _download_component_helper
    get(
  File "/media/d_drive/My_files/Visual Studio Code/github/rust/src/bootstrap/bootstrap.py", line 51, in get
    raise RuntimeError("failed verification")
RuntimeError: failed verification

This is primarily due to the "tmp" folder location of curl installed through snap being "/tmp/snap-private-tmp/snap.curl/tmp" which is not the path that x.py is looking for. Alternatively installing curl using "apt install curl", I was able to get x.py setup to run properly.

A message on Zulip discussing this -> https://rust-lang.zulipchat.com/#narrow/stream/122652-new-members/topic/frozendroid/near/285039893
An existing issue #86708

I would like to ask if we can elegantly instruct new users about this issue and guide them in a better way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions