473,395 Members | 2,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Cross Compiler for Python?

Up to now, I have been innocently using the vanilla python
that comes with the Linux distribution (Suse in my case).

For the past few days, I have been playing with a little
device called an eBox - it is basically a 486 with 128Mb
memory, and a 1Gig pcmcia flash drive.

We want to try to use this as an industrial controller, so
I want to load python onto it.

So I downloaded the sources, and got them into the box,
over its ethernet connection.

Then I got stymied - the configure script will not run,
because the "distribution" has no C compiler - it is
basically a kernel, and Busybox, with precious little else.

So I googled, and I found mobile python, and portable python,
both aimed at windows. - no good to me.

Adding "embedded" to the Google string is also useless,
as it basically brings up instances of embedding the
interpreter into another app, not for small processors.

So how does one do a compile of python on one machine
aimed at another one? - All I want is a vanilla installation
with the stuff in all the usual places. And just to make matters
interesting, the two Linux boxes I have available are both
64 bit dual core animals, one Intel, one AMD...

I don't need much more than the interpreter, sys, os, sockets
and ctypes.

Alternatively, where can one find a set of binaries for
32 bit Linux?

Looking for some sane advice please.

- Hendrik

Jul 7 '08 #1
2 1420
Hendrik van Rooyen wrote:
Up to now, I have been innocently using the vanilla python
that comes with the Linux distribution (Suse in my case).

For the past few days, I have been playing with a little
device called an eBox - it is basically a 486 with 128Mb
memory, and a 1Gig pcmcia flash drive.

We want to try to use this as an industrial controller, so
I want to load python onto it.

So I downloaded the sources, and got them into the box,
over its ethernet connection.

Then I got stymied - the configure script will not run,
because the "distribution" has no C compiler - it is
basically a kernel, and Busybox, with precious little else.

So I googled, and I found mobile python, and portable python,
both aimed at windows. - no good to me.

Adding "embedded" to the Google string is also useless,
as it basically brings up instances of embedding the
interpreter into another app, not for small processors.

So how does one do a compile of python on one machine
aimed at another one? - All I want is a vanilla installation
with the stuff in all the usual places. And just to make matters
interesting, the two Linux boxes I have available are both
64 bit dual core animals, one Intel, one AMD...

I don't need much more than the interpreter, sys, os, sockets
and ctypes.

Alternatively, where can one find a set of binaries for
32 bit Linux?

Looking for some sane advice please.
Look at the gumstix project, they do have a cross-compiled python in there.
You should be able to get an idea on how to do that yourself.

It involves (or at least did back then) a bit of trickery as the
build-process of python uses the freshly created interpreter to pre-compile
modules. But it is possible.

Diez
Jul 7 '08 #2
On Mon, 7 Jul 2008 10:15:59 +0200, Hendrik van Rooyen <ma**@microcorp.co.zawrote:
Up to now, I have been innocently using the vanilla python
that comes with the Linux distribution (Suse in my case).

For the past few days, I have been playing with a little
device called an eBox - it is basically a 486 with 128Mb
memory, and a 1Gig pcmcia flash drive.

We want to try to use this as an industrial controller, so
I want to load python onto it.

So I downloaded the sources, and got them into the box,
over its ethernet connection.

Then I got stymied - the configure script will not run,
because the "distribution" has no C compiler - it is
basically a kernel, and Busybox, with precious little else.
....

This is a special case of a more general, non-Python problem which you
will have to address if you want to build an industrial controller.

If your target has no C compiler[1], you have to set up a cross-compiling
environment. I'd be surprised if the eBox doesn't come with
documentation covering this.

If there are special procedures and requirements for cross-compiling
Python (someone else indicated there are), I guess the Python
installation notes must cover this in a general way.

/Jorgen

[1] Or even if it has one. It is much more convenient to build in your
normal work environment where you have plenty of disk, CPU and RAM,
a good text editor, version control, Perl ...

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.se R'lyeh wgah'nagl fhtagn!
Jul 7 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: logistix | last post by:
PyXR 0.9.3- Cross-Referenced HTML from Python Source PyXR generates HTML pages from python source files. It also generates cross-referenced hyperlinks and integrates with the Python Library...
4
by: Jonathan P. | last post by:
....that would be for desktop-based apps, games, 3d graphics, and multimedia. ....thanks to APIs and bindings like Pygame, PyOpenGL, PyGtk and PyGtkGLExt. A summary of a lengthy post on the...
1
by: Timur Safin | last post by:
Hi All, Sorry if it is offtopic here, I wasn't able to find any more relevant group... I'm slowly approaching AMD64 build for our product (as my personal fun project). And after I ran that...
1
by: Doug Crawford | last post by:
Has anyone successfully compiled python 2.4 to run under linux powerpc 604? I have the ELINOS cross compile environemnt working, but always run into problems when executing make. Unfortunately, my...
1
by: Han-Wen Nienhuys | last post by:
Hello, I have a small patch for Python SVN that makes it possible to cross-compile python on Unix to various other Unix targets. I have successfully built a binary for FreeBSD on Linux. The...
1
by: Otacon22 | last post by:
Hi all, I want to create a robot with a router board based on processor atheros 2.6, called "fonera". I have installed a version of linux, Openwrt and python and i want to use it for some...
3
by: Squat'n Dive | last post by:
Does anyone have an idea why -fno-strict-aliasing is turned off when cross compiling? in configure generated for 2.4.4: case $GCC in yes) # Python violates C99 rules, by casting between...
0
by: Hendrik van Rooyen | last post by:
Jorgen Grahn wrote: The eBox comes with a non free (both as in beer and speech) distribution, without even a root password, and tied to the mac address in the hardware so that it can only run...
5
by: Hartmut Goebel | last post by:
Hi, has anybody used McMillan Installer, PyInstall or py2exe cross-platform? I have a Windows partition with Python installed there, so this would "only" required working on a different...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.