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.

Author EdSchouten
Recipients EdSchouten
Date 2016-09-10.19:02:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
For CloudABI ( we're providing packages containing a precompiled copy of Python. As we had to make some changes to importlib (namely to deal with directory file descriptors), we have to do a rebuild of importlib.h during the cross compilation process, using Programs/_freeze_importlib.

We've run into a couple of issues that require us to patch up the build system to make this work:

- First of all, Programs/_freeze_importlib is built using the compiler for the target. There is no way to override this. The OpenWRT folks have also run into this issue and have patched up the Makefile to add a $FREEZE_IMPORTLIB that allows you to use a different executable:

This patch is almost correct; it doesn't prevent _freeze_importlib from being built, which is needed in our case as it doesn't build cleanly on CloudABI.

- Second, if an out-of-tree build is performed, we need to make sure that Python/frozen.c imports the right copy of importlib.h. We must add -IPython to the compiler flags to realise.

Attached is a patch that contains the modifications that we've made to to make cross compilation work for us.
Date User Action Args
2016-09-10 19:02:01EdSchoutensetrecipients: + EdSchouten
2016-09-10 19:02:01EdSchoutensetmessageid: <>
2016-09-10 19:02:01EdSchoutenlinkissue28066 messages
2016-09-10 19:02:01EdSchoutencreate