Comments (8)
@rustbot label -needs-triage
from rust.
FWIW compiletest's lldb_python_dir
is derived from the lldb -P
command propagated from bootstrap.
from rust.
I think this should fix the issue:
PYTHONPATH=`/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python`
from rust.
FWIW compiletest's
lldb_python_dir
is derived from thelldb -P
command propagated from bootstrap.
That indeed points to the homebrew version for me, any idea where python is getting launched? I wonder if it is getting invoked as /usr/bin/python3
rather than via path.
I think what may actually be a better solution here is to grab the output from lldb -P
and use the python version specified - so try to execute python3.12
directly before falling back to python3
.
$ lldb -P
3.12.2 (main, Feb 6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)]
/opt/homebrew/Cellar/llvm/17.0.6_1/libexec/python3.12/site-packages
I can dig into this a bit, just haven't had the chance to look yet.
I think this should fix the issue:
PYTHONPATH=`/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python`
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 PYTHONPATH
doesn't seem to work at all - running PYTHONPATH=/opt/homebrew/bin/python3.12 ./x t tests/debuginfo
still seems to load LLDB's module with 3.9.
from rust.
I think what may actually be a better solution here is to grab the output from
lldb -P
and use the python version specified - so try to executepython3.12
directly before falling back topython3
.
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.
from rust.
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 PYTHONPATH doesn't seem to work at all - running PYTHONPATH=/opt/homebrew/bin/python3.12 ./x t tests/debuginfo still seems to load LLDB's module with 3.9.
I think that's the problem...It's probably worth a try to download full Xcode and also check this:
xcode-select --install
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)...
from rust.
xcode-select --install
This is the command to install only CLI tools. Full xcode wouldn't make a difference in which paths get selected here.
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)...
The default executable choice comes from PATH
anyway and that can be adjusted (I am able to get this to work by doing so), no need to delete anything from homebrew to try that out. But I'm trying to find a solution that applies to more than just me, since having mixed versions isn't uncommon.
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 /opt/homebrew/opt/llvm/bin
which isn't a "necessity", but also not uncommon for anyone who uses LLVM tools like clang-tidy
clang-format
etc., and again it shouldn't really matter which versions are in PATH.
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.
from rust.
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
from rust.
Related Issues (20)
- tools depending on rustc crates can't build with `rust.download-rustc=true` and `llvm.download-ci-llvm=false` options HOT 3
- Intrinsics declared with wrong arg count ICE HOT 5
- compiletest: `run-rustfix` and `revisions` have broken interactions
- Greek question mark causes ICE HOT 2
- Lint against instantly-dangling pointers like `String::with_capacity(MAX_PATH).as_mut_ptr()` HOT 8
- `yield` without value from a `gen` block HOT 17
- Tracking Issue for stabilizing the sanitizers (e.g., AddressSanitizer, LeakSanitizer, MemorySanitizer, ThreadSanitizer) HOT 2
- Tracking issue for reviewing and moving sanitizers into a compiler crate (i.e., `rustc_sanitizers`) HOT 2
- New error on nightly 'overflow evaluating the requirement' HOT 1
- Codegen significantly worse when using u128 rather than two u64 HOT 3
- ICE: `No HirID for DefId(...)` with feature `generic_assert` HOT 3
- Nonsensical suggested type using chumsky select! (E0284) HOT 4
- Confusing error message on using `step_by` and `take` on infinite iterator
- ICE: kcfi: `expected item, found (root_crate)` HOT 1
- ICE: kcfi: `unexpected parent of trait or impl item or item not found: ForeignMod` HOT 1
- ICE: kcfi: `cannot get associated-item of DefKey..` HOT 3
- patterns: wrong tracking issue? HOT 20
- Tracking Issue for pattern types HOT 1
- Async closure internal compiler error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.