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

Makefile appears broken - touching header causes no build #82445

Closed
vsajip opened this issue Sep 24, 2019 · 4 comments
Closed

Makefile appears broken - touching header causes no build #82445

vsajip opened this issue Sep 24, 2019 · 4 comments
Labels
3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes build The build process and cross-build type-bug An unexpected behavior, bug, or error

Comments

@vsajip
Copy link
Member

vsajip commented Sep 24, 2019

BPO 38264
Nosy @vsajip

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2019-09-24.17:56:57.466>
labels = ['3.8', 'type-bug', '3.7', '3.9', 'build']
title = 'Makefile appears broken - touching header causes no build'
updated_at = <Date 2019-09-24.17:58:39.383>
user = 'https://github.com/vsajip'

bugs.python.org fields:

activity = <Date 2019-09-24.17:58:39.383>
actor = 'vinay.sajip'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Build']
creation = <Date 2019-09-24.17:56:57.466>
creator = 'vinay.sajip'
dependencies = []
files = []
hgrepos = []
issue_num = 38264
keywords = []
message_count = 2.0
messages = ['353105', '353106']
nosy_count = 1.0
nosy_names = ['vinay.sajip']
pr_nums = []
priority = 'high'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue38264'
versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

@vsajip
Copy link
Member Author

vsajip commented Sep 24, 2019

There appears to be a failure in the Makefile build logic. Steps to reproduce:

  1. Make a fresh build using "make clean && make"
  2. run "touch Modules/_io/_iomodule.h"
  3. Run "make" again.

Observed result: No related files get built.
Expected result: The directly including compilation units Modules/_io/{_iomodule,iobase,fileio,bufferedio,textio,bytesio,stringio}.o should be built. The compilation units which depend on these (e.g. Modules/textio.o) should also be built.

The problem appears to be related to Modules/makesetup, which adds rules to tbe Makefile. An example of a rule is

Modules/textio.o: $(srcdir)/Modules/_io/textio.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/textio.c -o Modules/textio.o

The problem here looks like the lack of a dependency between Modules/_io/textio.o and Modules/_io/textio.o - there is only a dependency on Modules/_io/textio.c, which wouldn't be rebuilt on a touch of Modules/_io/_iomodule.h.

@vsajip vsajip added 3.9 only security fixes build The build process and cross-build type-bug An unexpected behavior, bug, or error labels Sep 24, 2019
@vsajip
Copy link
Member Author

vsajip commented Sep 24, 2019

Problem also seems to occur in 3.8 and 3.7.

@vsajip vsajip added 3.7 (EOL) end of life 3.8 (EOL) end of life labels Sep 24, 2019
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@crazymerlyn
Copy link

Should this be closed? Looks like a duplicate of #89758 which has been fixed. I can't reproduce it on HEAD.

@itamaro
Copy link
Contributor

itamaro commented Sep 1, 2024

closing. please reopen (or submit a new issue) if the issue can be reproduced on main branch.

@itamaro itamaro closed this as completed Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes build The build process and cross-build type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants