CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
64 lines
2.2 KiB
Markdown
64 lines
2.2 KiB
Markdown
# Caveats
|
|
|
|
(python_caveat)=
|
|
|
|
## Python
|
|
|
|
LLDB has a powerful scripting interface which is accessible through Python.
|
|
Python is available either from within LLDB through a (interactive) script
|
|
interpreter, or as a Python module which you can import from the Python
|
|
interpreter.
|
|
|
|
To make this possible, LLDB links against the Python shared library. Linking
|
|
against Python comes with some constraints to be aware of.
|
|
|
|
1. It is not possible to build and link LLDB against a Python 3 library and
|
|
use it from Python 2 and vice versa.
|
|
2. It is not possible to build and link LLDB against one distribution on
|
|
Python and use it through an interpreter coming from another distribution.
|
|
For example, on macOS, if you build and link against Python from
|
|
python.org, you cannot import the lldb module from the Python interpreter
|
|
installed with Homebrew.
|
|
3. To use third party Python packages from inside LLDB, you need to install
|
|
them using a utility (such as `pip`) from the same Python distribution as
|
|
the one used to build and link LLDB.
|
|
|
|
The previous considerations are especially important during development, but
|
|
apply to binary distributions of LLDB as well.
|
|
|
|
### LLDB in Xcode on macOS
|
|
|
|
Users of lldb in Xcode on macOS commonly run into these issues when they
|
|
install Python, often unknowingly as a dependency pulled in by Homebrew or
|
|
other package managers. The problem is the symlinks that get created in
|
|
`/usr/local/bin`, which comes before `/usr/bin` in your path. You can use
|
|
`which python3` to check to what it resolves.
|
|
|
|
To be sure you use the Python that matches with the lldb in Xcode use `xcrun`
|
|
or use the absolute path to the shims in `/usr/bin`.
|
|
|
|
```
|
|
$ xcrun python3
|
|
$ /usr/bin/python3
|
|
```
|
|
|
|
Similarly, to install packages and be able to use them from within lldb, you'll
|
|
need to install them with the matching `pip3`.
|
|
|
|
```
|
|
$ xcrun pip3
|
|
$ /usr/bin/pip3
|
|
```
|
|
|
|
The same is true for Python 2. Although Python 2 comes with the operating
|
|
system rather than Xcode, you can still use `xcrun` to launch the system
|
|
variant.
|
|
|
|
```
|
|
$ xcrun python
|
|
$ /usr/bin/python
|
|
```
|
|
|
|
Keep in mind that Python 2 is deprecated and no longer maintained. Future
|
|
versions of macOS will not include Python 2.7.
|