Build bugs in Python 2.2.1?

Donn Cave donn at drizzle.com
Wed Aug 21 00:20:18 EDT 2002


Quoth "Mahrt, Dallas" <dallasm at aiinet.com>:
| One aspect of the build process that has been avoided in this discussion
| is the problems that the setup.py/distutils process causes for
| cross-compiling. Because the build process depends on the host
| and build targets to be the same, cross-compilation cannot happened
| with a './configure <opts>; make; make install'. This is because the
| built interpreter is used to execute the setup.py program. While I
| have devised a painful solution for this problem, several other
| problems occur during the module build process. Among them are
|
| 1) Cannot create shared library modules: Modules that are compiled
| as shared libraries are rejected since they cannot be loaded on this
| system.
|
| 2) Cannot compile the pure-Python modules since you cannot use the
| interpreter
|
| 3) While most files are installed using GNU's libtools, directories
| are created using a standard makedir. This complicates systems where
| the install program reroutes an install path to a staging are in order
| to create a ramdisk. 
|
| Example. Calling '$(INSTALL) foo.py /usr/lib/python2.2/foo.py' installs the
| program in /home/user/dev/project/staging/usr/lib/python2.2/foo.py
|
| These are simply the problems I have encountered thus far. I am
| hacking some quick fixes together to solve this problem but would
| welcome discussion on more permanent ways (via patches) that I could
| Modify this process to better enable cross-compilation.

Interesting point that might never have occurred to me.  Of course
it's a somewhat exotic requirement to most of us, but that just goes
to show what a narrow experience we really have.

For the first point, you just need to be able to control the parameters
to the compiler & linker, the usual cross-compile stuff?

The .pyc compilation stage can be done by a Python interpreter built
for the host platform, right?  That I have ever noticed, a .pyc file
comes out the same wherever it's built.  So for this you'd need two
interpreters, one built for the target and one built for the host.

As for install and mkdir, maybe you will find that it's easy enough
to fix this.  I actually work in a similar environment, where the
final installs are done from a staging area, and it has not been the
worst of my problems - most of the files are in lib/python2.1 and
include/python2.1, which I suppose I could rig with symbolic links
if I cared, and then there are just a couple of files in bin/ and man/.

Good luck!

	Donn Cave, donn at drizzle.com



More information about the Python-list mailing list