-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
llvm: update lldb python test #192626
base: master
Are you sure you want to change the base?
llvm: update lldb python test #192626
Conversation
I can do the same for llvm@16 in either this PR, or make a separate one. |
homebrew-core/Formula/l/llvm.rb Lines 53 to 55 in db82446
|
Depends on which one you consider correct. lldb will pick up python3.13 when that becomes the default (did a quick Google and couldn’t figure out how to override), which doesn’t match python3.12 required by the formula |
The lldb module is only built for a single Python version - it shouldn't be changing dynamically and needs to match the $ ls -d $(brew --prefix llvm)/libexec/python*
/opt/homebrew/opt/llvm/libexec/python3.12 It seems to work correctly on macOS at least: $ $(brew --prefix llvm)/bin/lldb --print-script-interpreter-info
{"executable":"/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/bin/python3.12","language":"python","lldb-pythonpath":"/opt/homebrew/Cellar/llvm/18.1.8/libexec/python3.12/site-packages","prefix":"/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12"} |
Yes, ok on macOS. Any other way to solve this on linux? 2024-10-01T12:26:39.8287536Z �[34m==>�[0m �[1mpython3.12 -c 'import pathlib, sys; print(pathlib.Path(sys.prefix).resolve())'�[0m
2024-10-01T12:26:39.8288263Z �[34m==>�[0m �[1m/home/linuxbrew/.linuxbrew/Cellar/llvm/19.1.0/bin/lldb�[0m
2024-10-01T12:26:39.8288929Z Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
2024-10-01T12:26:39.8289311Z
2024-10-01T12:26:39.8289501Z now exiting InteractiveConsole...
2024-10-01T12:26:39.8289848Z �[31mError:�[0m llvm: failed
2024-10-01T12:26:39.8299421Z ##[error]llvm: failed
2024-10-01T12:26:39.8305796Z An exception occurred within a child process:
2024-10-01T12:26:39.8364087Z Minitest::Assertion: Expected /\/home\/linuxbrew\/\.linuxbrew\/Cellar\/python@3\.12\/3\.12\.6_1\n/ to match "(lldb) script\n>>> /home/linuxbrew/.linuxbrew\n>>> ".
2024-10-01T12:26:39.8366380Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/minitest-5.25.1/lib/minitest/assertions.rb:176:in `assert'
2024-10-01T12:26:39.8368251Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/minitest-5.25.1/lib/minitest/assertions.rb:291:in `assert_match'
2024-10-01T12:26:39.8369934Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/l/llvm.rb:715:in `block in <class:Llvm>'
2024-10-01T12:26:39.8371192Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2813:in `block (3 levels) in run_test'
2024-10-01T12:26:39.8372731Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/kernel.rb:536:in `with_env'
2024-10-01T12:26:39.8374012Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2812:in `block (2 levels) in run_test'
2024-10-01T12:26:39.8375053Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1199:in `with_logging'
2024-10-01T12:26:39.8375961Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2811:in `block in run_test'
2024-10-01T12:26:39.8376803Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:75:in `block in run'
2024-10-01T12:26:39.8377563Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:75:in `chdir'
2024-10-01T12:26:39.8378254Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:75:in `run'
2024-10-01T12:26:39.8378983Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:3129:in `mktemp'
2024-10-01T12:26:39.8379768Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2805:in `run_test'
2024-10-01T12:26:39.8380556Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/test.rb:48:in `block in <main>'
2024-10-01T12:26:39.8381738Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.5/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout'
2024-10-01T12:26:39.8383297Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.5/lib/ruby/3.3.0/timeout.rb:41:in `handle_timeout'
2024-10-01T12:26:39.8384782Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.5/lib/ruby/3.3.0/timeout.rb:195:in `timeout'
2024-10-01T12:26:39.8385730Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/test.rb:52:in `<main>' |
Seems to more be a bug in our sitecustomize (though will require rebuilding LLVM when that's fixed): # macOS
$ python3.12 -c 'import sys; print(sys.prefix)'
/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12 # Linux
$ python3.12 -c 'import sys; print(sys.prefix)'
/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.12.6 On Linux this is causing it to use $ lldb --print-script-interpreter-info
{"executable":"/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.12.6/bin/python3.12","language":"python","lldb-pythonpath":"/home/linuxbrew/.linuxbrew/Cellar/llvm/19.1.0/libexec/python3.12/site-packages","prefix":"/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.12.6"} |
Ok, close and fix in another PR? (I don't know how to fix the sitecustomize problem) |
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?The lldb python test assumes that python3 points to the same python as lldb uses. When python3.12 gets demoted to altinstall in #182840, breaks the test.