Skip to content
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

gh-119538: Add missing build dependencies #125998

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

Meiye-lj
Copy link

@Meiye-lj Meiye-lj commented Oct 26, 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.

Issue: #119538

@bedevere-app
Copy link

bedevere-app bot commented Oct 26, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@erlend-aasland
Copy link
Contributor

Thanks for the PR. I'm a little puzzled why you closed your previous PR and opened a new (and pretty much identical) PR without addressing my previous review remarks.

@Meiye-lj
Copy link
Author

Thanks for the PR. I'm a little puzzled why you closed your previous PR and opened a new (and pretty much identical) PR without addressing my previous review remarks.

I made the mistake of clicking discard commit when updating my repository, which caused the previous PR to be automatically closed. I'm sorry about this. Also, I've updated the code based on your previous comments.


Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c $(srcdir)/Modules/posixmodule.h
Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c $(srcdir)/Modules/posixmodule.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 all these pycore_emscripten_trampoline.h dependencies? Can you elaborate?

Copy link
Author

Choose a reason for hiding this comment

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

I traced the build of Modules/posixmodule.o and found that Make calls pycore_emscripten_trampoline.h, which I can of course remove.

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 all the pycore_emscripten_trampoline.h deps; they are only relevant for that particular build config, and we need a better way to do those anyway.

Makefile.pre.in Outdated
@@ -1293,6 +1297,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/pycore_uop_metadata.h \
$(srcdir)/Include/internal/pycore_warnings.h \
$(srcdir)/Include/internal/pycore_weakref.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.

As I mentioned in my previous review, this should be a dependency of ceval_gil.o (and not ceval.o, as it currently is). IOW:

  • I don't think it is right to include it in PYTHON_HEADERS
  • I think we should remove condvar.h from the ceval.o target
  • I think we need a separate target for ceval_gil.o

Copy link
Author

Choose a reason for hiding this comment

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

If we declare ceval_gil.o as a separate target, what line should it go on?

Copy link
Contributor

Choose a reason for hiding this comment

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

It should be near the ceval.o target.

Copy link
Author

Choose a reason for hiding this comment

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

I already updated the PR. Could you add a label “skip news”?

Makefile.pre.in Outdated
$(srcdir)/Objects/mimalloc/stats.c \
$(srcdir)/Objects/mimalloc/page-queue.c \
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make sure you add lines so the list is still alphabetically sorted. Moreover, page-queue.c is already a dependency of the page.o subtarget; I think we should remove that target, as page.c is #included in the source, not compiled as a separate source file.

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

IO_H= Modules/_io/_iomodule.h
IO_H= Modules/_io/_iomodule.h \
Copy link
Contributor

@erlend-aasland erlend-aasland Oct 26, 2024

Choose a reason for hiding this comment

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

Please add a line break first, similar to how it's done with IO_OBJS below.

@bedevere-app

This comment was marked as outdated.

@bedevere-app

This comment was marked as outdated.

@bedevere-app

This comment was marked as outdated.

@bedevere-app

This comment was marked as duplicate.

@bedevere-app

This comment was marked as outdated.

@bedevere-app

This comment was marked as duplicate.

@bedevere-app

This comment was marked as duplicate.

@bedevere-app

This comment was marked as duplicate.

@erlend-aasland
Copy link
Contributor

FYI, @Meiye-lj, we discourage force-pushes, as those does not play well with the review and CI experience. Instead of rebasing, please use git fetch --all && git pull --no-ff -m "sync with main" main when synchronizing your branch with the main branch. See also the devguide.

@Meiye-lj
Copy link
Author

FYI, @Meiye-lj, we discourage force-pushes, as those does not play well with the review and CI experience. Instead of rebasing, please use git fetch --all && git pull --no-ff -m "sync with main" main when synchronizing your branch with the main branch. See also the devguide.

Thank you, I noticed.

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.

2 participants