Python: -mno -cygwin

i'm trying to learn a lot of python on windows and that includes installing several packages, however everytime i invoke python setup.py install i have a problem with -mno -cygwin for gcc.

i've have read already a lot of articles and it seems they want that these individual packages to wait for the fix on their own builds.

can anyone just provide me a gcc version that i can install that still supports -mno -cygwin so i can go on studying the areas i would like to focus?

gracias!

preguntado el 10 de marzo de 12 a las 08:03

The deprecated -mno-cygwin option was removed in gcc 4.7.0. See esta pregunta para más detalles. -

2 Respuestas

I had this problem too, and this is a bug in the Python code. The only way I found to fix it was to edit the file C:\Python27\Lib\distutils\cygwinccompiler.py.

In this file you must remove every occurence of -mno-cygwin.

The same goes for GCC installed through MinGW.

respondido 10 mar '12, 11:03

Just to clarify this, there should only be four occurrences of it, in Mingw32CCompiler.__init__. Fix should be reliable. - Brianmearns

I had the same problem which has been fixed by replacing instances of the string "-mno-cygwin" with "" in the C:\Python27\Lib\distutils\cygwinccompiler.py

es decir,

Código original:

    self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
                         compiler_so='gcc -mno-cygwin -mdll -O -Wall',
                         compiler_cxx='g++ -mno-cygwin -O -Wall',
                         linker_exe='gcc -mno-cygwin',
                         linker_so='%s -mno-cygwin %s %s'
                                    % (self.linker_dll, shared_option,
                                       entry_point))

Código actualizado:

    self.set_executables(compiler='gcc "" -O -Wall',
                         compiler_so='gcc "" -mdll -O -Wall',
                         compiler_cxx='g++ "" -O -Wall',
                         linker_exe='gcc ""',
                         linker_so='%s "" %s %s'
                                    % (self.linker_dll, shared_option,
                                       entry_point))

What version GCC compiler do you use? You will not get this issue if you use GCC 3.4.4 otherwise you need to replace "-mno-cygwin" string with empty quotes as mentioned above especially for GCC 4.3.7.

Respondido el 24 de enero de 14 a las 10:01

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.