[Distutils] Complling on IRIX OS

Michel Sanner sanner@scripps.edu
Tue, 1 Feb 2000 09:36:34 -0800

On Feb 1,  8:57am, Greg Ward wrote:
> Subject: Re: [Distutils] Complling on IRIX OS
> On 27 January 2000, Curtis Jensen said:
> > To install on an IRIX OS, sometimes we need to compile with the -o32
> > flag.  I can't seem to find how to do this with distutils.  Any ideas?
> Hmmm... I just checked the source, and it looks like there is no way to
> do this right now.  ;-( Why do you need to?  The Distutils default -- in
> fact, its *only* behaviour for now -- is to compile extensions the same
> way you compiled Python itself.  I'm a bit fuzzy on the various 32/64
> options for the IRIX 6+ compiler, but I expect you'd have a hard time
> loading .so's compiled one way into an executable compiled another way.
> What exactly are you trying to accomplish here -- better performance,
> ability to run on more platforms (ie. 32- and 64-bit IRIX), or what?

Greg, sgi has created a real mess. They have 3 ABIs (Application Binary

IRIX supports three ABIs:

     o32  The old 32-bit ABI which was standard on IRIX 5 systems.

     n64  The 64-bit ABI which was introduced on IRIX 6.0 systems.

     n32  The new high performance 32-bit ABI which was introduced on IRIX

Of course objects using a given ABI cannot be mixed. As long as one compiles
extensions on an SGI running the same OS as the one the Python interpreter has
been compiled on AND one uses default compilation flags everything works fine.
Unfortunately this is not the always the case. I compile everything by
explicitly specifying -o32 -mips2 in the compilation flags and -o32 in the
LDFLAGS. This ensures maximum portability between various SGI configurations.

Are you saying that it would difficult to specify at build time that I want
these flags to be added to CPFLAGS and LDFLAGS ? or is the problem to find out
"automatically" whether the Python interpreter running disutil was built o32
n32 or n64 ?
For the second option, one could simple execute a "file" unix-command on the
python binary to find out about the ABI.




>>>>>>>>>> AREA CODE CHANGE <<<<<<<<< we are now 858 !!!!!!!

Michel F. Sanner Ph.D.                   The Scripps Research Institute
Assistant Professor			Department of Molecular Biology
					  10550 North Torrey Pines Road
Tel. (858) 784-2341				     La Jolla, CA 92037
Fax. (858) 784-2860
sanner@scripps.edu                        http://www.scripps.edu/sanner