MinGW building with Python 2.4

M

mrstephengross

Ok, I know there are already a million posts on this group about
getting Python to build with MinGW. I've been through many of them, and
have still not found a good comprehensive way to accomplish this.

I've got Cygwin 5.1 with GCC 3.3.3 on it. I'm using Python 2.4.

Note: You invoke the mingwin compiler *indirectly*, by running gcc with
the -mno-cygwin option.

So first of all, I tried exporting CC='gcc -mno-cygwin', configuring,
and making. You end up getting file-not-found errors, because some of
the include files aren't present for mingw.

Next: I tried pymingw: didn't work :(

Any ideas?

Thanks in advance,
--Steve ([email protected])
 
D

David Fraser

mrstephengross said:
Ok, I know there are already a million posts on this group about
getting Python to build with MinGW. I've been through many of them, and
have still not found a good comprehensive way to accomplish this.

I've got Cygwin 5.1 with GCC 3.3.3 on it. I'm using Python 2.4.

Note: You invoke the mingwin compiler *indirectly*, by running gcc with
the -mno-cygwin option.

So first of all, I tried exporting CC='gcc -mno-cygwin', configuring,
and making. You end up getting file-not-found errors, because some of
the include files aren't present for mingw.

Next: I tried pymingw: didn't work :(

Any ideas?

Since the only official way to do this is pymingw, you should at least
give feedback of the steps you followed, and what didn't work

David
 
M

mrstephengross

Since the only official way to do this is pymingw, you should at
least
give feedback of the steps you followed, and what didn't work

(1) I have Cygwin 5.1 with GCC 3.3.1 on it.
(2) I unzipped Python 2.4.
(3) I unzipped pyMinGW-24-0064.zip into that directory, overwriting the
appropriate files.
(4) I went into the [Python]/MinGW directory and ran 'make -f
python24.mak all'.
(5) Here are the results:

make -f pythoncore.mak
make[1]: Entering directory
`/home/Administrator/sgross/Python-2.4/MinGW'
gcc.exe -c ../Modules/_bisectmodule.c -o ../Modules/_bisectmodule.o
-I"../Include" -I"../PC" -I"../Python" -Wall -s -DNDEBUG
-DPy_BUILD_CORE -DPy_ENABLE_SHARED -O2
In file included from ../Include/Python.h:82,
from ../Modules/_bisectmodule.c:6:
.../Include/intobject.h:41: error: parse error before
"PyInt_AsUnsignedLongLongMask"
.../Include/intobject.h:41: warning: type defaults to `int' in
declaration of `PyInt_AsUnsignedLongLongMask'
.../Include/intobject.h:41: warning: data definition has no type or
storage class
In file included from ../Include/Python.h:84,
from ../Modules/_bisectmodule.c:6:
.../Include/longobject.h:37: warning: parameter names (without types) in
function declaration
.../Include/longobject.h:39: error: parse error before
"PyLong_AsLongLong"
.../Include/longobject.h:39: warning: type defaults to `int' in
declaration of `PyLong_AsLongLong'
.../Include/longobject.h:39: warning: data definition has no type or
storage class
.../Include/longobject.h:40: error: parse error before
"PyLong_AsUnsignedLongLong"
.../Include/longobject.h:40: warning: type defaults to `int' in
declaration of `PyLong_AsUnsignedLongLong'
.../Include/longobject.h:40: warning: data definition has no type or
storage class
.../Include/longobject.h:41: error: parse error before
"PyLong_AsUnsignedLongLongMask"
.../Include/longobject.h:41: warning: type defaults to `int' in
declaration of `PyLong_AsUnsignedLongLongMask'
.../Include/longobject.h:41: warning: data definition has no type or
storage class
make[1]: *** [../Modules/_bisectmodule.o] Error 1
make[1]: Leaving directory
`/home/Administrator/sgross/Python-2.4/MinGW'
make: *** [pythoncore] Error 2

Any ideas?

Thanks in advance,
--Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top