| Issue |
75963
|
| Summary |
[lit] Running lit with bazel fails for Python 3.11
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
fzakaria
|
I noticed that running llvm's lit is failing for Python 3.11 but passes for Python 3.10 -- I am not sure why but I wanted to capture my investigation.
Here is a script of me running lit with bazel on Python 3.10 successfully and then switching to Python 3.11 and failing.
```console
❯ python -V
Python 3.11.5
❯ which python
/usr/local/google/home/fmzakari/code/github.com/openxla/stablehlo/venv3.11/bin/python
❯ bazel run @llvm-project//llvm:lit
INFO: Analyzed target @llvm-project//llvm:lit (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target @llvm-project//llvm:lit up-to-date:
bazel-bin/external/llvm-project/llvm/lit
INFO: Elapsed time: 0.137s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/external/llvm-project/llvm/lit
Traceback (most recent call last):
File "/usr/local/google/home/fmzakari/.cache/bazel/_bazel_fmzakari/17bce12c4b47a4a2fc75249afee05177/execroot/stablehlo/bazel-out/k8-fastbuild/bin/external/llvm-project/llvm/lit.runfiles/llvm-project/llvm/utils/lit/lit.py", line 3, in <module>
from lit.main import main
ModuleNotFoundError: No module named 'lit'
❯ deactivate
❯ source venv310/bin/activate
❯ which python
/usr/local/google/home/fmzakari/code/github.com/openxla/stablehlo/venv310/bin/python
❯ python -V
Python 3.10.0
❯ bazel run @llvm-project//llvm:lit
INFO: Analyzed target @llvm-project//llvm:lit (1 packages loaded, 2 targets configured).
INFO: Found 1 target...
Target @llvm-project//llvm:lit up-to-date:
bazel-bin/external/llvm-project/llvm/lit
INFO: Elapsed time: 0.186s, Critical Path: 0.01s
INFO: 2 processes: 2 internal.
INFO: Build completed successfully, 2 total actions
INFO: Running command line: bazel-bin/external/llvm-project/llvm/lit
usage: lit [-h] [--version] [-j N] [--config-prefix NAME] [-D NAME=VAL] [-q] [-s] [-v] [-vv] [-a]
[-o PATH] [--no-progress-bar] [--show-excluded] [--show-skipped] [--show-unsupported]
[--show-pass] [--show-flakypass] [--show-xfail] [--gtest-sharding]
[--no-gtest-sharding] [--path PATH] [--vg] [--vg-leak] [--vg-arg ARG] [--time-tests]
[--no-execute] [--xunit-xml-output XUNIT_XML_OUTPUT]
[--resultdb-output RESULTDB_OUTPUT] [--time-trace-output TIME_TRACE_OUTPUT]
[--timeout MAXINDIVIDUALTESTTIME] [--max-failures MAX_FAILURES] [--allow-empty-runs]
[--per-test-coverage] [--ignore-fail] [--max-tests N] [--max-time N]
[--order {lexical,random,smart}] [--shuffle] [-i] [--filter REGEX] [--filter-out REGEX]
[--xfail LIST] [--xfail-not LIST] [--num-shards M] [--run-shard N] [--debug]
[--show-suites] [--show-tests] [--show-used-features]
TEST_PATH [TEST_PATH ...]
lit: error: the following arguments are required: TEST_PATH
```
We are using LLVM out of tree in https://github.com/openxla/stablehlo using `llvm_configure` starlark rule.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs