Skip to content

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

Closed
@Walther

Description

@Walther

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."

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