Embedding Python at the OS level - build problems

Donn Cave donn at drizzle.com
Wed May 26 02:24:34 EDT 2004


Quoth Phil Frost <indigo at bitglue.com>:
...
| I really have a swarm of questions. Among them are:
|
| - is there a better way to cross compile python?
| - is there anything I can do about the above error?

I have never cross compiled anything, but I find it kind of
troubling to hear that the compiler was finding include files
in /usr/include.  If they're missing in the target, it should
just fail to find them.

posixmodule is naturally one of the more difficult things to
build on a new platform.  If your problems are no worse than
I_PUSH is missing, you are in fat city.  socketmodule may also
be difficult, and if you have your own platform specific threading
API that will take some work.

| But most importantly:
|
| - is the posix module really required? At the moment, I'm interested in
|   only getting a minimal Python working, so anything that can be
|   disabled, should be. What things can I do to eliminate all features,
|   modules, and whatever that isn't required to build libpython2.3.a?

I don't think posixmodule is strictly required, but that brings
up another can of worms.  Python builds itself.  You build it
with posixmodule (cf. Modules/Setup) so it can run setup.py.
This is, of course, to run on your build host.  But of course
you need a to end up with different binary to run on your target
host.  I shouldn't worry, I'm sure people do this all the time,
it just sounds kind of hairy to me.

I know I'm not much help, but you should be able to find some
good technical discussion of minimal Python builds in the Google
archives of comp.lang.python.  It has definitely been done.

	Donn Cave, donn at drizzle.com



More information about the Python-list mailing list