Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931838 - dev-lang/python-3.13.0_beta1_p1: USE=jit broken with libcxx
Summary: dev-lang/python-3.13.0_beta1_p1: USE=jit broken with libcxx
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-05-12 22:26 UTC by Jonas Rakebrandt
Modified: 2024-06-18 11:07 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch that allows version suffixes (libcxx.patch,401 bytes, patch)
2024-05-12 22:30 UTC, Jonas Rakebrandt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Rakebrandt 2024-05-12 22:26:56 UTC
The build fails with

> Traceback (most recent call last):
>   File "/var/tmp/portage/dev-lang/python-3.13.0_beta1_p1/work/Python-3.13.0b1/Tools/jit/_targets.py", line 164, in _compile
>     await _llvm.run("clang", args_ll, echo=self.verbose)
>   File "/var/tmp/portage/dev-lang/python-3.13.0_beta1_p1/work/Python-3.13.0b1/Tools/jit/_llvm.py", line 99, in run
>     raise RuntimeError(f"Can't find {tool}-{_LLVM_VERSION}!")
> RuntimeError: Can't find clang-18!

because the _LLVM_VERSION_PATTERN regex at https://github.com/python/cpython/blob/v3.13.0b1/Tools/jit/_llvm.py#L12 doesn't allow the +suffix.

Reproducible: Always

Steps to Reproduce:
1. Try building >=python-3.13 with USE=jit on a LLVM+libcxx system
Actual Results:  
Build fails due to mismatched version string

Expected Results:  
Build should succeed (and does when patching the _LLVM_VERSION_PATTERN)
Comment 1 Jonas Rakebrandt 2024-05-12 22:30:47 UTC
Created attachment 892841 [details, diff]
patch that allows version suffixes
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-16 06:30:55 UTC
Sorry, we missed this. Could you send it upstream as a PR?
Comment 3 Jonas Rakebrandt 2024-06-16 21:16:39 UTC
Just sent a slightly modified patch upstream.
This is the accompanying issue:
https://github.com/python/cpython/issues/120602
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-17 00:55:37 UTC
Thank you!
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-06-17 02:44:18 UTC
Ah, thanks.  I'll try to remember to include this patch in the next patch series bump (we're working on one).
Comment 6 Larry the Git Cow gentoo-dev 2024-06-18 11:07:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9f10a98dd7325b83a8c76184dcefe0183b22238

commit a9f10a98dd7325b83a8c76184dcefe0183b22238
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-06-18 09:32:31 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-06-18 11:07:40 +0000

    dev-lang/python: Backport more patches as 3.13.0_beta2_p8
    
    This introduces a cleaner GENTOO_CPYTHON_BUILD approach to removing
    system site-packages.  Effectively, we no longer need to workaround
    sandbox violations, nor presence of docutils.
    
    Also including a build fix for suffixed LLVM versions.
    
    Closes: https://bugs.gentoo.org/931838
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-lang/python/Manifest                      |   1 +
 dev-lang/python/python-3.13.0_beta2_p8.ebuild | 659 ++++++++++++++++++++++++++
 2 files changed, 660 insertions(+)