This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: regen-importlib is causing build races against other regen-all targets in Makefile.pre.in
Type: Stage: resolved
Components: Build Versions: Python 3.8, Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: Alexander Kanavin, christian.heimes, vstinner
Priority: normal Keywords:

Created on 2018-03-15 16:46 by Alexander Kanavin, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg313894 - (view) Author: Alexander Kanavin (Alexander Kanavin) * Date: 2018-03-15 16:46
You can see here:

https://github.com/python/cpython/blob/master/Makefile.pre.in#L708

that regen-importlib is building a binary from .o files which are built from .c and .h files, which are, at the same time, regenerated by other regen- targets.

This does cause build errors in heavily parallelized builds, we've been seeing it regularly in Yocto Project lately:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=12596

I tried to see if I can easily correct target dependencies in the makefile, but couldn't figure it out. So, a workaround, for us, would be to issue 'make regen-importlib' ahead of other things:

    make regen-importlib
    make regen-all
msg407917 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-12-07 11:38
May I ask why you are running the regen-all target at all? A normal end-user build of CPython does not need make regen-all. It's only used for CI and internal development.
msg407918 - (view) Author: Alexander Kanavin (Alexander Kanavin) * Date: 2021-12-07 11:44
We have long ago updated to a much newer python and removed the workaround, so the whatever the issue was, it is completely obsolete. Thanks!
msg407921 - (view) Author: Alexander Kanavin (Alexander Kanavin) * Date: 2021-12-07 11:45
(removed both the workaround, and regen-all itself)
msg407925 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-12-07 11:56
Fantasic!
History
Date User Action Args
2022-04-11 14:58:58adminsetgithub: 77261
2021-12-07 11:56:49christian.heimessetmessages: + msg407925
2021-12-07 11:45:57Alexander Kanavinsetmessages: + msg407921
2021-12-07 11:44:05Alexander Kanavinsetstatus: open -> closed
resolution: works for me
messages: + msg407918

stage: resolved
2021-12-07 11:38:28christian.heimessetnosy: + christian.heimes
messages: + msg407917
2018-03-16 02:23:07ned.deilysetnosy: + vstinner
2018-03-15 16:46:10Alexander Kanavincreate