classification
Title: Cross-compiling python:3.5.x fails with "Parser/pgen: Parser/pgen: cannot execute binary file"
Type: compile error Stage:
Components: Cross-Build Versions: Python 3.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: Alex.Willmer, Peter L2, yan12125
Priority: normal Keywords: patch

Created on 2016-04-29 16:29 by Peter L2, last changed 2016-04-29 19:30 by Peter L2. This issue is now closed.

Files
File name Uploaded Description Edit
python-3.5-crosscompile.patch Peter L2, 2016-04-29 16:34 A patch for python-3.5.x to enable cross-compiling
Messages (5)
msg264508 - (view) Author: Peter L (Peter L2) Date: 2016-04-29 16:29
Cross-compiling python-3.5.x fails with "Parser/pgen: Parser/pgen: cannot execute binary file" (CBUILD="x86_64-pc-linux-gnu" and CHOST="armv7a-hardfloat-linux-gnueabi").

python-3.5.x requires "pgen" and "_freeze_importlib" to be compiled and executed at build time. Otherwise, it fails with "Parser/pgen: Parser/pgen: cannot execute binary file".
msg264510 - (view) Author: Peter L (Peter L2) Date: 2016-04-29 16:34
Originally posted:
https://bugs.gentoo.org/show_bug.cgi?id=581304
msg264512 - (view) Author: Chih-Hsuan Yen (yan12125) * Date: 2016-04-29 18:07
You may need this patch: https://hg.python.org/cpython/rev/0f7a299c6d50
msg264515 - (view) Author: Peter L (Peter L2) Date: 2016-04-29 19:13
Hmmm.  Solves half the problem. Still fails when trying to run "_freeze_importlib".

This works though:
https://hg.python.org/cpython/rev/66e40df31fac
msg264517 - (view) Author: Peter L (Peter L2) Date: 2016-04-29 19:30
Gonna close it since it seems to be related to

http://bugs.python.org/issue22359

and solved with

https://hg.python.org/cpython/rev/66e40df31fac
History
Date User Action Args
2016-04-29 19:30:20Peter L2setstatus: open -> closed
resolution: duplicate
messages: + msg264517
2016-04-29 19:13:39Peter L2setmessages: + msg264515
2016-04-29 18:07:20yan12125setnosy: + yan12125
messages: + msg264512
2016-04-29 16:34:40Peter L2setfiles: + python-3.5-crosscompile.patch
keywords: + patch
messages: + msg264510
2016-04-29 16:29:35Peter L2create