[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 > deprecated. Please bui

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

2016-09-25 Thread Chi Hsuan Yen
Chi Hsuan Yen 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. For the problem of libffi: since issue27976 using bundled libffi is deprecated. Please build libffi outside CPyt

[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 still missin

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

2016-09-24 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: This is fixed two weeks ago. See issue28046. The relevant fix is at http://bugs.python.org/issue28046#msg275845. Xavier pushed it to default before the 3.6 branch is created. I guess it should already be in 3.6b1?? Current hg tip works for me: $ find build/21-

[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 ended up in

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

2016-09-24 Thread Zachary Ware
Zachary Ware added the comment: Could you try 3.6b1 and see if it works correctly for you? Cross-building support has changed significantly in 3.6. -- nosy: +doko, xdegaye, zach.ware ___ Python tracker ___

[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 patc