-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Debuginfo tests sometimes run with the wrong Python version on MacOS #123621
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
Comments
@rustbot label -needs-triage |
FWIW compiletest's |
I think this should fix the issue:
|
That indeed points to the homebrew version for me, any idea where python is getting launched? I wonder if it is getting invoked as I think what may actually be a better solution here is to grab the output from
I can dig into this a bit, just haven't had the chance to look yet.
That directory doesn't exist for me, I think it is only for the full xcode install but I only have CLI tools. However, setting |
Actually, this doesn't print the version when not in a TTY. I'm just going to ask on the LLVM forum what the best way to do this is. |
I think that's the problem...It's probably worth a try to download full Xcode and also check this:
After doing that, if the defaults still use HomeBrew, you can temporarily delete everything from HomeBrew (that's related to this issue) and reinstall after using the command (as that would probably make system one as default)... |
This is the command to install only CLI tools. Full xcode wouldn't make a difference in which paths get selected here.
The default executable choice comes from The issue here seems to be that bootstrap is unintentionally making a bad executable choice somewhere, since it seems you can't assume anything about the LLDB python version. I do have I asked if there is a way to get a better version requirement here https://discourse.llvm.org/t/how-do-you-get-the-python-version-required-for-lldb/78228. For reference, looks like we launch here https://github.com/rust-lang/rust/blob/master/src/tools/compiletest/src/runtest.rs#L1519-L1540. |
I am also putting the locations for my machine here for ref: > which lldb
/usr/bin/lldb > which python3
/opt/homebrew/bin/python3 > lldb -P
/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python |
Running
./x t tests/debuginfo
on my system configuration creates a lot of errors like this:I have the following system configuration:
Homebrew provides the default python3 and lldb in
PATH
, with python 3.12.2. There is also the CLI tools versions, which are available viaxcrun
or at/usr/bin
, with python version 3.9.6. This should be a pretty common configuration._lldb.cpython-312-darwin.so
exists in/opt/homebrew/Cellar/llvm/17.0.6_1/libexec/python3.12/site-packages/lldb/
, but based on some poking around it seems like this is trying to get run with python 3.9. This makes me think thatlldb_python_dir
incompiletest
is not choosing a version that aligns with the LLDB version/path imported bysrc/etc/lldb_batchmode.py
.Some discussion at https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/.E2.9C.94.20MacOS.20_lldb.20python.20error.20for.20debugifo.20tests
@rustbot label +A-testsuite +O-macos +T-bootstrap
The text was updated successfully, but these errors were encountered: