Re: Python on mips

Neil Schemenauer <[email protected]> Fri, 2 Sep 2005 08:39:27 -0600
Newsgroups gmane.comp.python.compiler
Message-ID <[email protected]>
On Fri, Sep 02, 2005 at 04:14:53PM +0530, inpreet wrote:
> I was trying to build python package for mips instruction set
> processor. First of all is it possible to crozz compile pythone
> package. I am getting errors while doing so....

There's no need to cross-compile (assuming you have a compiler on
your MIPS machine).  Builting on the MIPS machine would be easiest.

> **************ERROR*******************
> Parser/pgen ./Grammar/Grammar ./Include/graminit.h ./Python/graminit.c
> Parser/pgen: Parser/pgen: cannot execute binary file

The Parser/pgen needs to be built with the host compiler, not the
cross compiler.  Maybe:

    $ rm Parser/pgen
    $ make CC=<host cc> Parser/pgen

and then:

    $ make

You will still run into trouble because the newly built Python will
to executed to build modules.  The Python build scripts are really
not designed for cross-compiling.

  Neil