Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x.py build: error: XZ support is required to download LLVM #81026

Closed
Walther opened this issue Jan 15, 2021 · 9 comments
Closed

x.py build: error: XZ support is required to download LLVM #81026

Walther opened this issue Jan 15, 2021 · 9 comments

Comments

@Walther
Copy link

Walther commented Jan 15, 2021

Steps:

./x.py build
Updating only changed submodules
Submodules updated in 0.14 seconds
error: XZ support is required to download LLVM
help: consider disabling `download-ci-llvm` or using python3
Build completed unsuccessfully in 0:00:00

Both python and python3 exist

which python
/usr/bin/python

which python3
/usr/bin/python3

Note:

rust/x.py

Line 1 in e38fb30

#!/usr/bin/env python

# Running the same command defaults to python 2 on the OS
/usr/bin/env python
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.

Environment: WSL2 Debian 10 buster

cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

uname -a
Linux matcha 4.4.0-19041-Microsoft #488-Microsoft Mon Sep 01 13:43:00 PST 2020 x86_64 GNU/Linux

Workaround:

python3 x.py build

Three thoughts:

  • Should x.py be smarter about python vs python3 detection & execution, to fix this without user action?
  • Should the error message be improved, in a way that helps a user to work around this? (for example, "python3 detected, edit x.py to use python3 instead" or other suggestion)
  • Should the contribution guide have an updated mention of python3 requirement? Currently: "Most notably, you will need Python 2 or 3 to run x.py."
@Walther
Copy link
Author

Walther commented Jan 15, 2021

Additional note: on a server with a Ubuntu 20.04 focal fossa installation, where python is not even present:

./x.py setup
/usr/bin/env: ‘python’: No such file or directory

which python
python not found

which python3
/usr/bin/python3
cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

@cuviper
Copy link
Member

cuviper commented Jan 15, 2021

See also #71818 and #80625 -- cc @jyn514

@Walther
Copy link
Author

Walther commented Jan 15, 2021

Ah my bad, was searching with the full error and didn't find those two. Closing as duplicate 👍

@Walther Walther closed this as completed Jan 15, 2021
@jyn514
Copy link
Member

jyn514 commented Jan 15, 2021

There is not a good way to fix #71818 (see https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/x.2Epy.20.2B.20download-ci-llvm.20-.3E.20explicit.20python3.20needed.3F/near/221414355 for more discussion). #80625 should be merged as soon as I rebase it.

@willus10245
Copy link

I'm getting this error, even when calling python3 ./x.py check

@jyn514
Copy link
Member

jyn514 commented May 19, 2021

@willus10245 it's unlikely it's the same error - can you open a new issue with the full output of x.py?

@willus10245
Copy link

The error is identical to the original post on this issue

$ python3 x.py check
Updating only changed submodules
Submodules updated in 0.06 seconds
error: XZ support is required to download LLVM
help: consider disabling `download-ci-llvm` or using python3
Build completed unsuccessfully in 0:00:00

@willus10245
Copy link

@jyn514 do you mean the contents of x.py?

@willus10245
Copy link

@jyn514 opened #85476

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants