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 <1473534121.66.0.287629200488.issue28066@psf.upfronthosting.co.za>
In-reply-to
Content
For CloudABI (https://mail.python.org/pipermail/python-dev/2016-July/145708.html) 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:

https://github.com/openwrt/packages/blob/master/lang/python3/patches/013-make-freeze-import-lib-into-an-override-able-var.patch

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 Makefile.pre.in to make cross compilation work for us.
History
Date User Action Args
2016-09-10 19:02:01EdSchoutensetrecipients: + EdSchouten
2016-09-10 19:02:01EdSchoutensetmessageid: <1473534121.66.0.287629200488.issue28066@psf.upfronthosting.co.za>
2016-09-10 19:02:01EdSchoutenlinkissue28066 messages
2016-09-10 19:02:01EdSchoutencreate