Skip to content

scripts/bootstrap-prefix: fix >=python-3.14 - #43

Closed
plxty wants to merge 2 commits into
gentoo:masterfrom
plxty:fix-bootstrap-python3_14
Closed

scripts/bootstrap-prefix: fix >=python-3.14#43
plxty wants to merge 2 commits into
gentoo:masterfrom
plxty:fix-bootstrap-python3_14

Conversation

@plxty

@plxty plxty commented Jun 15, 2026

Copy link
Copy Markdown

Recently Gentoo makes the python3_14 the default target, which breaks the stage3 bootstraping, because Python 3.14 makes zstd part of stdlib, and building zstd requires meson with Python, so circular dependencies here:

stage3.log: * Error: circular dependencies:
stage3.log-
stage3.log-(app-arch/zstd-1.5.7-r1:0/1::gentoo, ebuild scheduled for merge) depends on
stage3.log- (dev-build/meson-format-array-0:0/0::gentoo, ebuild scheduled for merge) (buildtime)
stage3.log-  (dev-lang/python-3.14.4_p1:3.14/3.14::gentoo, ebuild scheduled for merge) (runtime)
stage3.log-   (app-arch/zstd-1.5.7-r1:0/1::gentoo, ebuild scheduled for merge) (buildtime_slot_op)

Here is just a proposed fix way with USE=build flag to break the zstd requirements with Python (as ztrawhcse in IRC says) in stage3, and it works. But however, we need to patch all of the >=dev-lang/python-3.14 packages in upstream Gentoo ebuilds, so I think we may need to have more considerations?

P.S. I'm not sure whether to submit patches to Gentoo ebuilds :/

plxty added 2 commits June 15, 2026 14:36
Signed-off-by: Zigit Zo <byte@kei.network>
Signed-off-by: Zigit Zo <byte@kei.network>
@thesamesam

Copy link
Copy Markdown
Member

The other side of this is gentoo/gentoo#46407

cc @eli-schwartz @bartoldeman

@eli-schwartz

Copy link
Copy Markdown
Member

Yes, thanks, this seems broadly correct.

Also oops, I guess there were two people who independently discovered the same issue... I was under the mistaken impression that @bartoldeman was the person I suggested USE=build to, but apparently not...

bartoldeman added a commit to ComputeCanada/gentoo that referenced this pull request Jun 15, 2026
Gentoo prefix bootstrap needs to compile Python without support for
zstd initially to avoid a circular dependency:
python->zstd->meson->python

Explicity setting USE=build now this chain.

This is only needed for 3.14+, as older versions don't depend on
zstd.

gentoo/prefix#43
is needed to actually set USE=build when emerging python

Closes: https://bugs.gentoo.org/977378

Signed-off-by: Bart Oldeman <bart.oldeman@calculquebec.ca>
@plxty

plxty commented Jun 16, 2026

Copy link
Copy Markdown
Author

Aha, there seems still quite a number of the prefix users ;) Hasn't look the PR list in gentoo/gentoo before...

Anyhow, the other PR seems much better and thoroughly discussed, so I'm leaving the PR alone and close.

@plxty plxty closed this Jun 16, 2026
@eli-schwartz

Copy link
Copy Markdown
Member

This PR is still needed to ensure that USE=build is set inside the Prefix bootstrap. :)

@plxty

plxty commented Jun 16, 2026

Copy link
Copy Markdown
Author

I saw what @grobian says we need a USE=build for the whole stage3 bootstrap? I'm uncertain about that as I don't really know the details what prefix stage3 does and what it may impacts, maybe I'll do some try first :O

@grobian

grobian commented Jun 16, 2026

Copy link
Copy Markdown
Member

If we first get the Python changes merged, it's much easier to reason about the bootstrap flags :)

@bartoldeman

Copy link
Copy Markdown
Contributor

I'd be in favour of first getting the bug fixed minimally, then to attempt uniform flags.

So I'd reopen this, but put the build use flag in python-3.14.5.ebuild in alphabetical order to be more consistent with gentoo/gentoo#46407

gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Jun 16, 2026
Gentoo prefix bootstrap needs to compile Python without support for
zstd initially to avoid a circular dependency:
python->zstd->meson->python

Explicity setting USE=build now this chain.

This is only needed for 3.14+, as older versions don't depend on
zstd.

gentoo/prefix#43
is needed to actually set USE=build when emerging python

Closes: https://bugs.gentoo.org/977378
Signed-off-by: Bart Oldeman <bart.oldeman@calculquebec.ca>
Part-of: #46407
Closes: #46407
Signed-off-by: Michał Górny <mgorny@gentoo.org>
@grobian

grobian commented Jun 17, 2026

Copy link
Copy Markdown
Member

I went with this
https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=cc7618cf03a00f4ee1b3b0437cdc4dc7bc37500a

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants