[issue28266] setup.py uses build Python's configuration when cross-compiling

2016-09-25 Thread Rouslan Korneychuk
Rouslan Korneychuk added the comment: > The problem is: setting PYTHON_FOR_BUILD manually breaks cross-compiling. > Please remove it, add python3.6 to $PATH and cross-compiling should be OK. I see. > For the problem of libffi: since issue27976 using bundled libffi is > deprec

[issue28266] setup.py uses build Python's configuration when cross-compiling

2016-09-25 Thread Rouslan Korneychuk
Rouslan Korneychuk added the comment: I just tried compiling 3.6 unmodified for Android and it failed when trying to build libffi. The error message included these two lines: configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. so 3.6b1 is

[issue28266] setup.py uses build Python's configuration when cross-compiling

2016-09-24 Thread Rouslan Korneychuk
Rouslan Korneychuk added the comment: Here is an updated patch for 3.6b1. I was able to compile Python with the changes, natively (x86_64 linux) and for ARM, using an Android "isolated toolchain." However, with the ARM build, a file named _sysconfigdata_m_linux_x86_64-linux-gnu.py e

[issue28266] setup.py uses build Python's configuration when cross-compiling

2016-09-24 Thread Rouslan Korneychuk
New submission from Rouslan Korneychuk: When building Python, the setup.py script will use values from sysconfig, even when cross compiling. When cross compiling, the interpreter that runs setup.py is configured for the build system, not the host system, so the wrong values are used. This