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: Makefile appears broken - touching header causes no build
Type: behavior Stage:
Components: Build Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: vinay.sajip
Priority: high Keywords:

Created on 2019-09-24 17:56 by vinay.sajip, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg353105 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2019-09-24 17:56
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.
msg353106 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2019-09-24 17:58
Problem also seems to occur in 3.8 and 3.7.
History
Date User Action Args
2022-04-11 14:59:20adminsetgithub: 82445
2019-09-24 17:58:39vinay.sajipsetmessages: + msg353106
versions: + Python 3.7, Python 3.8
2019-09-24 17:56:57vinay.sajipcreate