[Python-Dev] Bug in build system for cross-platform builds

Xavier de Gaye xdegaye at gmail.com
Mon Mar 14 12:34:31 EDT 2016


On 03/14/2016 02:26 PM, R. David Murray wrote:
 >
 > The repo-timestamp problem is addressed by the 'make touch' target.
 >
 > And yes, checking in these platform-independent artifacts is very
 > intentional: less to build, fewer external dependencies in the build
 > process...you don't need to *have* python to *build* python, which you
 > would have to if they were not checked in.


Changeset c2a53aa27cad [1] was commited in issue 22359 [2] to remove incorrect
uses of recursive make.  The changeset added executable binaries as
prerequisites to the existing rules (Python/importlib.h and $(GRAMMAR_H)).
This broke cross-compilation:
* the executables do not exist and must be cross-compiled
* then the Python/importlib.h or $(GRAMMAR_H) target recipes must be run since
   the prerequisites are newer
* but the executables cannot run on the build system

Actually the files need not be re-generated as their timestamps have been
setup for that purpose with 'make touch'. So a solution to the problem
introduced by this changeset when cross-compiling could be to remove the
binaries as prerequisites of these rules and include the recipe of their
corresponding rules, the one used to build the executable, into the recipes of
the original rule.  Also IMHO the Programs/_freeze_importlib.c can be used
instead of Programs/_freeze_importlib.o as a prerequisite in the
Python/importlib.h rule.

[1] https://hg.python.org/cpython/rev/c2a53aa27cad/
[2] http://bugs.python.org/issue22359

Xavier


More information about the Python-Dev mailing list