MinGW building with Python 2.4

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mrstephengross

    #1

    MinGW building with Python 2.4

    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 (mrstephengross @hotmail.com)

  • David Fraser

    #2
    Re: MinGW building with Python 2.4

    mrstephengross wrote:[color=blue]
    > 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?[/color]

    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

    Comment

    • mrstephengross

      #3
      Re: MinGW building with Python 2.4

      > Since the only official way to do this is pymingw, you should at
      least[color=blue]
      > give feedback of the steps you followed, and what didn't work[/color]

      (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_SHAR ED -O2
      In file included from ../Include/Python.h:82,
      from ../Modules/_bisectmodule.c :6:
      .../Include/intobject.h:41: error: parse error before
      "PyInt_AsUnsign edLongLongMask"
      .../Include/intobject.h:41: warning: type defaults to `int' in
      declaration of `PyInt_AsUnsign edLongLongMask'
      .../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_AsLongL ong"
      .../Include/longobject.h:39 : warning: type defaults to `int' in
      declaration of `PyLong_AsLongL ong'
      .../Include/longobject.h:39 : warning: data definition has no type or
      storage class
      .../Include/longobject.h:40 : error: parse error before
      "PyLong_AsUnsig nedLongLong"
      .../Include/longobject.h:40 : warning: type defaults to `int' in
      declaration of `PyLong_AsUnsig nedLongLong'
      .../Include/longobject.h:40 : warning: data definition has no type or
      storage class
      .../Include/longobject.h:41 : error: parse error before
      "PyLong_AsUnsig nedLongLongMask "
      .../Include/longobject.h:41 : warning: type defaults to `int' in
      declaration of `PyLong_AsUnsig nedLongLongMask '
      .../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

      Comment

      Working...