[issue28542] document cross compilation

Martin Panter report at bugs.python.org
Fri Oct 28 23:26:08 EDT 2016


Martin Panter added the comment:

Thanks, this looks like a decent start. I’m not that familiar with cross-compiling Python, but here are a couple questions:

$(cd /path/to/source && pwd)/configure
Why do you use $(pwd) here? I have mainly seen relative paths used (my own experiments, and reports from others), so I don’t think you need to force an absolute path. The instructions further up already mention “../configure” from a subdirectory.

--prefix=$(cd ../install && pwd)
Won’t that embed the path of the install directory in e.g. sys.prefix or something? Can’t you use “DESTDIR=../install” instead?

I remember there are a bunch of extra things you have to manually configure to cross-compile. See e.g. revision 12a56a349af2 which asks for /dev/ptmx and /dev/ptc settings in a CONFIG_SITE file (although I have had success just adding them to the “configure” command line). Perhaps we could add something like

'''
configure --host=[. . .] \
    ac_cv_file__dev_ptmx=no \
    ac_cv_file__dev_ptc=no
. . .

If the target Python could use /dev/ptmx or /dev/ptc to implement os.openpty(), set the corresponding argument to "yes".
'''

I suspect some people cross compile 2.7, so it may be worth applying something like this to that branch.

----------
nosy: +martin.panter

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28542>
_______________________________________


More information about the Python-bugs-list mailing list