8000 gh-119538: Add missing build dependencies by Meiye-lj · Pull Request #125389 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-119538: Add mis 8000 sing build dependencies #125389

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

Closed
wants to merge 0 commits into from
Closed

Conversation

Meiye-lj
Copy link
@Meiye-lj Meiye-lj commented Oct 13, 2024

This PR fixes an issue in the Makefile.pre.in of Cpython. Specifically, previously, any modifications of files like Objects/mimalloc/alloc-override.c would not trigger a rebuild of Objects/obmalloc.o. The PR fixes this by including them as additional dependencies. This addresses #120096 and #119538. #119538 and #119647 resolve some missing dependency errors, this PR further fixes missing dependency errors.

@bedevere-app

This comment was marked as outdated.

@bedevere-app

This comment was marked as outdated.

@rruuaanng

This comment was marked as outdated.

@rruuaanng

This comment was marked as outdated.

@Meiye-lj Meiye-lj changed the title Fixing missing build dependencies in Makefile.pre.in gh-120096: Fixing missing build dependencies in Makefile.pre.in Oct 13, 2024
@bedevere-app

This comment was marked as outdated.

@erlend-aasland erlend-aasland changed the title gh-120096: Fixing missing build dependencies in Makefile.pre.in gh-119538: Addd missing build dependencies Oct 14, 2024
@erlend-aasland erlend-aasland changed the title gh-119538: Addd missing build dependencies gh-119538: Add missing build dependencies Oct 14, 2024
@erlend-aasland erlend-aasland added skip news needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Oct 14, 2024
Copy link
Contributor
@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

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

Thanks for taking this on!

Makefile.pre.in Outdated
Copy link
Contributor
@erlend-aasland erlend-aasland Oct 14, 2024

Choose a reason for hiding this comment

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

I'd prefer if we can keep lists of build dependencies sorted alphabetically.

Copy link
Contributor

Choose a reason for hiding this comment

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

Again, please address this.

Makefile.pre.in Outdated
@@ -346,7 +346,7 @@ MODULE_OBJS= \
Modules/main.o \
Modules/gcmodule.o

IO_H= Modules/_io/_iomodule.h
IO_H= Modules/_io/_iomodule.h Include/internal/pycore_emscripten_trampoline.h
Copy link
Member

Choose a reason for hiding this comment

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

Can we split this on multiple lines?

Makefile.pre.in Outdated
@@ -1577,9 +1582,9 @@ FROZEN_FILES_OUT = \
Python/frozen_modules/frozen_only.h
# End FROZEN_FILES_OUT

Programs/_freeze_module.o: Programs/_freeze_module.c Makefile
Programs/_freeze_module.o: Programs/_freeze_module.c Makefile Include/floatobject.h Include/bytesobject.h Include/compile.h Include/pytypedefs.h Include/cpython/monitoring.h Include/cpython/abstract.h Include/cpython/setobject.h Include/intrcheck.h Include/cpython/odictobject.h Include/cpython/object.h Include/longobject.h Include/bltinmodule.h Include/internal/pycore_lock.h Include/cpython/classobject.h Include/typeslots.h Include/cpython/descrobject.h Include/pymem.h Include/pyerrors.h Include/cpython/initconfig.h Include/warnings.h Include/cpython/ceval.h Include/abstract.h Include/cpython/warnings.h Include/cpython/fileutils.h Include/complexobject.h Include/memoryobject.h Include/cpython/longobject.h Include/cpython/pyhash.h Include/import.h Include/pyhash.h Include/cpython/pylifecycle.h Include/cpython/cellobject.h Include/cpython/listobject.h Include/pyatomic.h Include/genericaliasobject.h Include/iterobject.h Include/pylifecycle.h Include/traceback.h Include/cpython/pymem.h Include/cpython/pystate.h Include/enumobject.h Include/pyport.h Include/cpython/memoryobject.h Include/cpython/code.h Include/Python.h Include/dictobject.h Include/objimpl.h Include/cpython/tracemalloc.h Include/cpython/methodobject.h Include/pymacconfig.h Include/cpython/pyctype.h Include/pythread.h Include/pystats.h Include/weakrefobject.h Include/cpython/objimpl.h Include/structseq.h Include/cpython/pyfpe.h Include/cpython/critical_section.h Include/pystrtod.h Include/cpython/bytesobject.h Include/unicodeobject.h Include/modsupport.h Include/tupleobject.h Include/cpython/import.h Include/cpython/genobject.h Include/object.h Include/lock.h Include/pymath.h Include/internal/pycore_hashtable.h Include/rangeobject.h Include/cpython/pythread.h Include/pystrcmp.h Include/codecs.h Include/boolobject.h Include/exports.h Include/osmodule.h Include/pymacro.h Include/pystate.h Include/cpython/pytime.h Include/cpython/funcobject.h Include/cpython/lock.h Include/moduleobject.h Include/fileobject.h Include/cpython/tupleobject.h Include/cpython/weakrefobject.h Include/cpython/pyatomic.h Include/cpython/unicodeobject.h Include/listobject.h Include/internal/pycore_import.h Include/monitoring.h Include/cpython/sysmodule.h Include/cpython/traceback.h Include/patchlevel.h Include/pycapsule.h Include/pythonrun.h Include/sliceobject.h Include/sysmodule.h Include/cpython/pyframe.h Include/internal/pycore_fileutils.h Include/cpython/longintrepr.h Include/cpython/pythonrun.h pyconfig.h Include/cpython/picklebufobject.h Include/cpython/compile.h Include/fileutils.h Include/marshal.h Include/cpython/floatobject.h Include/ceval.h Include/cpython/pydebug.h Include/cpython/fileobject.h Include/bytearrayobject.h Include/cpython/modsupport.h Include/descrobject.h Include/pyframe.h Include/cpython/bytearrayobject.h Include/methodobject.h Include/critical_section.h Include/cpython/complexobject.h Include/cpython/dictobject.h Include/cpython/pyatomic_gcc.h Include/cpython/pyerrors.h Include/cpython/context.h Include/refcount.h Include/setobject.h Include/pybuffer.h
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we use $(srcdir)/Include instead of Include directly? (and same remark on the ordering)

@rruuaanng

This comment was marked as duplicate.

Makefile.pre.in Outdated
8000
$(srcdir)/Python/ceval_macros.h \
$(srcdir)/Python/condvar.h \
$(srcdir)/Python/generated_cases.c.h \
$(srcdir)/Python/executor_cases.c.h \
$(srcdir)/Python/opcode_targets.h
$(srcdir)/Python/opcode_targets.h
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove trailing whitespace (goes for all PR)

Copy link
Contributor

Choose a reason for hiding this comment

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

Again, please address this.

Copy link
Contributor
@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

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

Please address my previous remarks in addition to my new review comments.

Makefile.pre.in Outdated
@@ -1293,6 +1297,8 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/pycore_uop_metadata.h \
$(srcdir)/Include/internal/pycore_warnings.h \
$(srcdir)/Include/internal/pycore_weakref.h \
$(srcdir)/Modules/_testcapi/parts.h \
$(srcdir)/Python/condvar.h \
Copy link
Contributor

Choose a reason for hiding this comment

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

condvar.h is a dependency of thread.c and ceval_gil.c; the former seems to be handled correctly in the Makefile, but the latter is all wrong1. This should be fixed. Perhaps ceval_gil.o should get its own explicit list of dependencies.

Footnotes

  1. moreover, there are two Python/ceval.o targets (!)

Makefile.pre.in Outdated
@@ -1293,6 +1297,8 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/pycore_uop_metadata.h \
$(srcdir)/Include/internal/pycore_warnings.h \
$(srcdir)/Include/internal/pycore_weakref.h \
$(srcdir)/Modules/_testcapi/parts.h \
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not look right to me; parts.h should only be relevant to the _testcapi extension module, and already is a dependency of that extension module:

MODULE__TESTCAPI_DEPS=$(srcdir)/Modules/_testcapi/parts.h $(srcdir)/Modules/_testcapi/util.h

Makefile.pre.in Outdated
@@ -1754,23 +1760,23 @@ Programs/python.o: $(srcdir)/Programs/python.c
Programs/_testembed.o: $(srcdir)/Programs/_testembed.c Programs/test_frozenmain.h $(PYTHON_HEADERS)
$(CC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c

Modules/_sre/sre.o: $(srcdir)/Modules/_sre/sre.c $(srcdir)/Modules/_sre/sre.h $(srcdir)/Modules/_sre/sre_constants.h $(srcdir)/Modules/_sre/sre_lib.h
Modules/_sre/sre.o: $(srcdir)/Modules/_sre/sre.c $(srcdir)/Modules/_sre/sre.h $(srcdir)/Modules/_sre/sre_constants.h $(srcdir)/Modules/_sre/sre_lib.h $(srcdir)/Modules/_sre/sre_targets.h $(srcdir)/Include/internal/pycore_emscripten_trampoline.h
Copy link
Contributor

Choose a reason for hiding this comment

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

Why pycore_emscripten_trampoline.h? Ditto for L1765, L1771, L1779, L1795, and all the other occurrences.

Copy link
Author

Choose a reason for hiding this comment

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

Sorry for the mishap that caused the PR to be CLOSED, I resubmitted a new PR and addressed the issue you raised.

@bedevere-app
Copy link
bedevere-app bot commented Oct 25, 2024

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

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

Successfully merging this pull request may close these issues.

4 participants
0