Skip to content

Conversation

@xSetech
Copy link
Contributor

@xSetech xSetech commented Nov 7, 2025

The python() method was hardcoded to return /usr/bin/python3 on macOS, ignoring the build.python config option. This change respects the config while maintaining the system Python as the default.

The `python()` method was hardcoded to return `/usr/bin/python3` on
macOS, ignoring the `build.python` config option. This change respects
the config while maintaining the system Python as the default.
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 7, 2025
@xSetech xSetech marked this pull request as ready for review November 7, 2025 08:24
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 7, 2025
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 7, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 7, 2025

r? @clubby789

rustbot has assigned @clubby789.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@xSetech
Copy link
Contributor Author

xSetech commented Nov 7, 2025

I've tested the default is set locally (x86_64-apple-darwin), but it'd be great if a CI job on an *-apple-darwin worker could also confirm.

Comment on lines +1528 to +1532
// LLDB tests require the Python version the LLDB plugin was built for.
// On macOS, the system Python/LLDB are compatible. Many users install
// Homebrew Python but not Homebrew LLVM, so default to system Python.
// Can be overridden via `build.python` for custom LLVM installations.
self.config.python.as_deref().unwrap_or_else(|| Path::new("/usr/bin/python3"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: can you also update the doc on bootstrap.example.toml for build.python?

rust/bootstrap.example.toml

Lines 322 to 326 in c90bcb9

# Python interpreter to use for various tasks throughout the build, notably
# rustdoc tests, the lldb python interpreter, and some dist bits and pieces.
#
# Defaults to the Python interpreter used to execute x.py.
#build.python = "python"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wording is adjusted, please take a look. rustbot also suggested I modify src/bootstrap/src/utils/change_tracker.rs. I'll add a note there too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, an info-level advisory is indeed wise.

@jieyouxu
Copy link
Member

jieyouxu commented Nov 7, 2025

@bors try jobs=aarch64-apple

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 7, 2025
bootstrap: respect `build.python` on macOS

try-job: aarch64-apple
Comment on lines 1526 to 1539
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both branches are now much more similar than before your change, which makes me wonder where the difference went. Or maybe the default is good for most non-Windows systems generally?

Copy link
Member

@jieyouxu jieyouxu Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR actually makes them more consistent, in that now for *-apple-darwin vs non *-apple-darwin targets we both first try to use an explicitly configured build.python, then we try our luck of discovering an environmental Python. Or in the case of *-apple-darwin, the matter of "environmental python" is currently still hijacked due to lldb reasons cf. #148361 #123621 #134682.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which I agree is good, but makes me think perhaps we can go even further then? "/usr/bin/python3/ is a good default on many (most?) linux systems.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I don't have build.python set and bootstrap still works for me on Linux, so some other place also sets a default python?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that would work for all cases, and I would prefer to keep the scope of this PR focused. I think we'd be open for a follow-up PR, though I cannot say I know for sure /usr/bin/python3 is universally valid. For instance, picking up a python3 from PATH is also a reasonable choice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I don't have build.python set and bootstrap still works for me on Linux, so some other place also sets a default python?

It's ultimately set here:
https://github.com/rust-lang/rust/blob/1.91.0/src/bootstrap/src/core/sanity.rs#L166

Note that BOOTSTRAP_PYTHON is the interpreter invoking bootstrap.py, which is itself called by x.py. x.py can actually choose a different Python than what it's invoked with, e.g. switching from Python 2 if it finds a Python 3 install:
https://github.com/rust-lang/rust/blob/1.91.0/x.py#L18

build.python should be available to override all of that guesswork, except it (and all of the indirection) were ignored by a hardcoded value on macOS. This PR fixes that particular issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @xSetech! So that makes me think finding the right python is already happening in sanity.rs, except it would fail is the PATH does not have "/usr/bin/" at higher priority than some other path that contains a python install. What does your path look like?

@rustbot
Copy link
Collaborator

rustbot commented Nov 7, 2025

This PR modifies bootstrap.example.toml.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@jieyouxu jieyouxu self-assigned this Nov 7, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @xSetech! I'll r+ once the try job comes back.

View changes since this review

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [debuginfo-lldb] tests/debuginfo/zst-interferes-with-prologue.rs ... FAILED

failures:

---- [debuginfo-lldb] tests/debuginfo/basic-types-globals-metadata.rs stdout ----
NOTE: compiletest thinks it is using LLDB version 1500
------python3.14 stdout------------------------------

------python3.14 stderr------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)

------------------------------------------

error: Error while running LLDB
status: exit status: 1
command: PYTHONPATH="/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python" PYTHONUNBUFFERED="1" "/opt/homebrew/opt/python@3.14/bin/python3.14" "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/basic-types-globals-metadata.lldb/a" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/basic-types-globals-metadata.lldb/basic-types-globals-metadata.debugger.script"
stdout: none
--- stderr -------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)
------------------------------------------

---- [debuginfo-lldb] tests/debuginfo/basic-types-globals-metadata.rs stdout end ----
---- [debuginfo-lldb] tests/debuginfo/associated-types.rs stdout ----
NOTE: compiletest thinks it is using LLDB version 1500
------python3.14 stdout------------------------------

------python3.14 stderr------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)

------------------------------------------

error: Error while running LLDB
status: exit status: 1
command: PYTHONPATH="/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python" PYTHONUNBUFFERED="1" "/opt/homebrew/opt/python@3.14/bin/python3.14" "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/associated-types.lldb/a" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/associated-types.lldb/associated-types.debugger.script"
stdout: none
--- stderr -------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)
------------------------------------------

---- [debuginfo-lldb] tests/debuginfo/associated-types.rs stdout end ----
---- [debuginfo-lldb] tests/debuginfo/basic-types-globals.rs#no-lto stdout ----
NOTE: compiletest thinks it is using LLDB version 1500
------python3.14 stdout------------------------------

------python3.14 stderr------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)

------------------------------------------

error in revision `no-lto`: Error while running LLDB
status: exit status: 1
command: PYTHONPATH="/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python" PYTHONUNBUFFERED="1" "/opt/homebrew/opt/python@3.14/bin/python3.14" "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/basic-types-globals.no-lto.lldb/a" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/basic-types-globals.no-lto.lldb/basic-types-globals.debugger.script"
stdout: none
--- stderr -------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)
------------------------------------------

---- [debuginfo-lldb] tests/debuginfo/basic-types-globals.rs#no-lto stdout end ----
---- [debuginfo-lldb] tests/debuginfo/basic-types-metadata.rs stdout ----
NOTE: compiletest thinks it is using LLDB version 1500
------python3.14 stdout------------------------------

------python3.14 stderr------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)

------------------------------------------

error: Error while running LLDB
status: exit status: 1
command: PYTHONPATH="/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python" PYTHONUNBUFFERED="1" "/opt/homebrew/opt/python@3.14/bin/python3.14" "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/basic-types-metadata.lldb/a" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/basic-types-metadata.lldb/basic-types-metadata.debugger.script"
stdout: none
--- stderr -------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)
------------------------------------------

---- [debuginfo-lldb] tests/debuginfo/basic-types-metadata.rs stdout end ----
---- [debuginfo-lldb] tests/debuginfo/basic-types-mut-globals.rs stdout ----
NOTE: compiletest thinks it is using LLDB version 1500
------python3.14 stdout------------------------------

------python3.14 stderr------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)

------------------------------------------

error: Error while running LLDB
status: exit status: 1
command: PYTHONPATH="/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python" PYTHONUNBUFFERED="1" "/opt/homebrew/opt/python@3.14/bin/python3.14" "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/basic-types-mut-globals.lldb/a" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/basic-types-mut-globals.lldb/basic-types-mut-globals.debugger.script"
stdout: none
--- stderr -------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)
------------------------------------------

---- [debuginfo-lldb] tests/debuginfo/basic-types-mut-globals.rs stdout end ----
---- [debuginfo-lldb] tests/debuginfo/basic-types.rs stdout ----
NOTE: compiletest thinks it is using LLDB version 1500
------python3.14 stdout------------------------------

------python3.14 stderr------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)

------------------------------------------

error: Error while running LLDB
status: exit status: 1
command: PYTHONPATH="/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python" PYTHONUNBUFFERED="1" "/opt/homebrew/opt/python@3.14/bin/python3.14" "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/basic-types.lldb/a" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/basic-types.lldb/basic-types.debugger.script"
stdout: none
--- stderr -------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)
------------------------------------------

---- [debuginfo-lldb] tests/debuginfo/basic-types.rs stdout end ----
---- [debuginfo-lldb] tests/debuginfo/borrowed-basic.rs stdout ----
NOTE: compiletest thinks it is using LLDB version 1500
------python3.14 stdout------------------------------

------python3.14 stderr------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)

------------------------------------------

error: Error while running LLDB
status: exit status: 1
command: PYTHONPATH="/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python" PYTHONUNBUFFERED="1" "/opt/homebrew/opt/python@3.14/bin/python3.14" "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/borrowed-basic.lldb/a" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/borrowed-basic.lldb/borrowed-basic.debugger.script"
stdout: none
--- stderr -------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)
------------------------------------------

---- [debuginfo-lldb] tests/debuginfo/borrowed-basic.rs stdout end ----
---- [debuginfo-lldb] tests/debuginfo/borrowed-c-style-enum.rs stdout ----
NOTE: compiletest thinks it is using LLDB version 1500
------python3.14 stdout------------------------------

------python3.14 stderr------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)

------------------------------------------

error: Error while running LLDB
status: exit status: 1
command: PYTHONPATH="/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python" PYTHONUNBUFFERED="1" "/opt/homebrew/opt/python@3.14/bin/python3.14" "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/borrowed-c-style-enum.lldb/a" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/borrowed-c-style-enum.lldb/borrowed-c-style-enum.debugger.script"
stdout: none
--- stderr -------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)
------------------------------------------

---- [debuginfo-lldb] tests/debuginfo/borrowed-c-style-enum.rs stdout end ----
---- [debuginfo-lldb] tests/debuginfo/borrowed-tuple.rs stdout ----
NOTE: compiletest thinks it is using LLDB version 1500
------python3.14 stdout------------------------------

------python3.14 stderr------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)

------------------------------------------

error: Error while running LLDB
status: exit status: 1
command: PYTHONPATH="/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python" PYTHONUNBUFFERED="1" "/opt/homebrew/opt/python@3.14/bin/python3.14" "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/borrowed-tuple.lldb/a" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/borrowed-tuple.lldb/borrowed-tuple.debugger.script"
stdout: none
--- stderr -------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)
------------------------------------------

---- [debuginfo-lldb] tests/debuginfo/borrowed-tuple.rs stdout end ----
---- [debuginfo-lldb] tests/debuginfo/borrowed-struct.rs stdout ----
NOTE: compiletest thinks it is using LLDB version 1500
------python3.14 stdout------------------------------

------python3.14 stderr------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)

------------------------------------------

error: Error while running LLDB
status: exit status: 1
command: PYTHONPATH="/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python" PYTHONUNBUFFERED="1" "/opt/homebrew/opt/python@3.14/bin/python3.14" "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/borrowed-struct.lldb/a" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/borrowed-struct.lldb/borrowed-struct.debugger.script"
stdout: none
--- stderr -------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)
------------------------------------------

---- [debuginfo-lldb] tests/debuginfo/borrowed-struct.rs stdout end ----
---- [debuginfo-lldb] tests/debuginfo/borrowed-unique-basic.rs stdout ----
NOTE: compiletest thinks it is using LLDB version 1500
------python3.14 stdout------------------------------

------python3.14 stderr------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)

------------------------------------------

error: Error while running LLDB
status: exit status: 1
command: PYTHONPATH="/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python" PYTHONUNBUFFERED="1" "/opt/homebrew/opt/python@3.14/bin/python3.14" "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/borrowed-unique-basic.lldb/a" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/borrowed-unique-basic.lldb/borrowed-unique-basic.debugger.script"
stdout: none
--- stderr -------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)
------------------------------------------

---- [debuginfo-lldb] tests/debuginfo/borrowed-unique-basic.rs stdout end ----
---- [debuginfo-lldb] tests/debuginfo/box.rs stdout ----
NOTE: compiletest thinks it is using LLDB version 1500
------python3.14 stdout------------------------------

------python3.14 stderr------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py", line 17, in <module>
    import lldb
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 42, in <module>
    from . import _lldb
ImportError: cannot import name '_lldb' from partially initialized module 'lldb' (most likely due to a circular import) (/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py)

------------------------------------------

error: Error while running LLDB
status: exit status: 1
command: PYTHONPATH="/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python" PYTHONUNBUFFERED="1" "/opt/homebrew/opt/python@3.14/bin/python3.14" "/Users/runner/work/rust/rust/src/etc/lldb_batchmode.py" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/box.lldb/a" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/debuginfo/box.lldb/box.debugger.script"
stdout: none
--- stderr -------------------------------
Traceback (most recent call last):
  File "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

@rust-bors
Copy link

rust-bors bot commented Nov 7, 2025

💔 Test for 37f35bb failed: CI. Failed jobs:

@jieyouxu
Copy link
Member

jieyouxu commented Nov 7, 2025

Curious, I'll take a look tmrw at how they are wired together 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants