cross compile Python to Linux-ARM

Tino Wildenhain tino at wildenhain.de
Thu Mar 19 13:56:43 EDT 2009


jefm wrote:
> Hi,
> We are looking to use Python on an embedded Linux ARM system.
> What I gather from googling the subject is that it is not that
> straight forward (a fair amount of patching & hacking).
> Nobody out there that has done it claims it is easy, which makes me
> worried.

Yes unfortunately its quite difficult. Been there, stopped at some
point. But for arm however you have some chances, see below.

> I haven't seen a description on porting Python 2.6 or 3.0 yet. Is it
> much different than for the earlier versions (the latest I have seem
> is Python 2.5).
> 
> Does it matter whether Python is cross compiled to Linux 2.4 or Linux
> 2.6 ?
> 
> Can anyone point to a howto they know works well ?
> 
> What are the chances of an 'officially' supported ARM-Linux Python
> distribution ?
> (or is it safer to wait for industrial spec Intel Atom boards to avoid
> the cross compilation altogether ?

Easier for sure.

> What would it take for the Linux version of Python to be easily cross
> compiled (i.e. would the Linux-Python maintainers be willing to
> include and maintain cross-compilation specific functions) ?

Either throw the automake stuff away or correct it accordingly
to support target platforms different from build platform.

> Let's say we can get it done.
> How is the performance and stability of a working Python on an
> embedded ARM-Linux system ?

Its working quite nice on my Psion 5MX installed via debian
packages. So I believe you should be able to work from
debian source packages since they are cross compiles as far
as I know.

> Does cross compiling Python automatically include the standard Python
> library, or is that yet another adventure ?

The standard lib is in python mostly so no worries. The only problematic
part can be various C extensions like zlib, curses, pthreads ... which
are all optional anyway.

Regards
Tino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3241 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20090319/6be1a22d/attachment-0001.bin>


More information about the Python-list mailing list