FAQ
Hello all,

recently I compiled Python with MinGW gcc under Windows.
If there are some interest, you can look at log of process at

http://uucode.com/texts/python-mingw/python-mingw.html

In short, about compiling with MinGW gcc:

* it is possible;
* result works;
* you must not do it unless you know for sure that you must do it;
* you must have a good knowledge of C and of debugging;
* in most cases all you need is to compile an extension module.

--
Oleg

Search Discussions

  • Ames Andreas (MPA/DF) at Dec 1, 2003 at 8:33 pm
    Hi Oleg,

    usenet at xmlhack.ru (Oleg A. Paraschenko) writes:
    recently I compiled Python with MinGW gcc under Windows.
    If there are some interest, you can look at log of process at

    http://uucode.com/texts/python-mingw/python-mingw.html

    In short, about compiling with MinGW gcc:

    * it is possible;
    * result works;
    * you must not do it unless you know for sure that you must do it;
    * you must have a good knowledge of C and of debugging;
    * in most cases all you need is to compile an extension module.
    I've recently taken a slitely different way to accomplish a native
    mingw32 build. You can get a patch from

    https://sourceforge.net/tracker/?funcÞtail&aid„1454&group_idT70&at
    id05470

    As I haven't used msys yet and my real goal was to build a
    mingw32-python on linux (without the adventures of installing VC6
    under wine, which reportedly works either). Thus it had to be a
    crosscompile, but you should be able to use cygwin (but you must edit
    xbuild-py.sh to do so and you must --build and --host on cygwin too,
    I've started the crossbuild on cygwin).

    The build still has quite a few 'rough edges' ;-):

    1) The resource files (*.rc) are not yet compiled/linked in. Given
    that they are rather simple I wouldn't expect significant
    difficulties using windres. There would need to happen some
    changes to Makefile.pre.in though.

    2) pythonw.exe is not yet built. Similar changes as above needed.

    3) I couldn't yet convince scons that it would be a good idea to have
    a build directory seperate from the source tree. I have tried both
    the BuildDir function and the build_dir parameter to the
    SConscrript function but to no avail. It could either be a bug in
    scons or my own inability. As this was my first scons-script, I
    guess it's the latter. Some scons knowledgeable person might be
    able to fix this within seconds.

    Before you get a useful environment you must copy the Lib/
    subdirectory from source- to the buildtree as well as all the *.pyd
    files from <source>/Modules and <source>/PC to <build>/DLLs or
    something. Note that running the testcases from a samba-share isn't
    good because the tests use filenames with an '@' sign which samba
    doesn't seem to like. You might be better off copying the complete
    buildtree to a native windows partition (if you build from linux
    anyway).

    The patch applies to 2.3.2 because I have no easy way to access the
    cvs repository. If there was interest in a native mingw32-python I
    would like to help to solve the above issues (and others I haven't
    found yet). But it doesn't appear that there is much interest in
    this, so I'd guess you can take the above as a toy project.


    cheers,

    andreas
  • Bengt Richter at Dec 1, 2003 at 10:10 pm

    On Mon, 1 Dec 2003 21:33:47 +0100, "Ames Andreas (MPA/DF)" wrote:
    Hi Oleg,

    usenet at xmlhack.ru (Oleg A. Paraschenko) writes:
    recently I compiled Python with MinGW gcc under Windows.
    If there are some interest, you can look at log of process at

    http://uucode.com/texts/python-mingw/python-mingw.html

    In short, about compiling with MinGW gcc:

    * it is possible;
    * result works;
    * you must not do it unless you know for sure that you must do it;
    * you must have a good knowledge of C and of debugging;
    * in most cases all you need is to compile an extension module.
    I've recently taken a slitely different way to accomplish a native
    mingw32 build. You can get a patch from

    https://sourceforge.net/tracker/?func=detail&aid=841454&group_id=54>70&at
    id=305470
    All I get from the above (after s/3D//g) is "An error occured[sic] in the logger."

    Can you post another recipe for getting there?

    Regards,
    Bengt Richter
  • Ames Andreas (MPA/DF) at Dec 2, 2003 at 11:51 am
    Hi,

    bokr at oz.net (Bengt Richter) writes:
    All I get from the above (after s/3D//g) is "An error occured[sic]
    in the logger."
    sorry, it seems I don't know enough about the magic secrets of
    sourceforge urls. Just go to the python patch tracker and choose
    patch with id 841454 ('Cross building python for mingw32').


    cheers,

    andreas
  • Paul Moore at Dec 2, 2003 at 3:44 pm

    "Ames Andreas (MPA/DF)" <Andreas.Ames at tenovis.com> writes:

    Hi,

    bokr at oz.net (Bengt Richter) writes:
    All I get from the above (after s/3D//g) is "An error occured[sic]
    in the logger."
    sorry, it seems I don't know enough about the magic secrets of
    sourceforge urls. Just go to the python patch tracker and choose
    patch with id 841454 ('Cross building python for mingw32').
    python.org has a SF redirector - this works:

    http://www.python.org/sf/841454

    Paul.
    --
    This signature intentionally left blank
  • Bengt Richter at Dec 2, 2003 at 7:00 pm

    On Tue, 02 Dec 2003 15:44:31 +0000, Paul Moore wrote:
    "Ames Andreas (MPA/DF)" <Andreas.Ames at tenovis.com> writes:
    Hi,

    bokr at oz.net (Bengt Richter) writes:
    All I get from the above (after s/3D//g) is "An error occured[sic]
    in the logger."
    sorry, it seems I don't know enough about the magic secrets of
    sourceforge urls. Just go to the python patch tracker and choose
    patch with id 841454 ('Cross building python for mingw32').
    python.org has a SF redirector - this works:

    http://www.python.org/sf/841454
    Thanks, both. I guess I could have been less lazy ;-)

    Regards,
    Bengt Richter

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedDec 1, '03 at 7:10p
activeDec 2, '03 at 7:00p
posts6
users4
websitepython.org

People

Translate

site design / logo © 2022 Grokbase