'gcc' failed with exit status 1

J

JR

Hello All,

I was hoping I could get some help with this issue with getting Cython
to work. Earlier I had an issue that said "unable to find
vcvarsall.bat" and it turns out there is an active bug report that
covers that issue (I have a 64 bit windows system). I still hadn't
installed 3.1.2, so I did that tonight and now I have the issue below.
Any thoughts on what I am doing wrong?



Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\James>cd C:\Python31

C:\Python31>python setup.py build_ext --inplace
running build_ext
cythoning hello.pyx to hello.c

Error converting Pyrex file to C:
------------------------------------------------------------
....
def say_hello_to(name):
^
------------------------------------------------------------

C:\Python31\hello.pyx:1:23: Unrecognized character
building 'hello' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python31\include -
IC:\Pytho
n31\PC -c hello.c -o build\temp.win-amd64-3.1\Release\hello.o
hello.c:1:2: #error Do not use this file, it is the result of a failed
Cython co
mpilation.
error: command 'gcc' failed with exit status 1

C:\Python31>
 
S

Stefan Behnel

JR, 24.03.2010 03:51:
I was hoping I could get some help with this issue with getting Cython
to work. Earlier I had an issue that said "unable to find
vcvarsall.bat" and it turns out there is an active bug report that
covers that issue (I have a 64 bit windows system). I still hadn't
installed 3.1.2, so I did that tonight and now I have the issue below.
Any thoughts on what I am doing wrong?


Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\James>cd C:\Python31

C:\Python31>python setup.py build_ext --inplace
running build_ext
cythoning hello.pyx to hello.c

Error converting Pyrex file to C:

Given that you're on Windows, this looks like a known bug in Cython:

http://trac.cython.org/cython_trac/ticket/520

This is due to the lack of universal newline support in the codecs module,
which has been fixed in the new Py2.6+ 'io' module. A patch for Cython that
switches to the new 'io' module and works around this issue in older Python
versions is available:

http://hg.cython.org/cython-devel/raw-rev/751bdd38b55c

That being said, the simplest way to work around this issue is to switch to
Unix line endings in your source file. Most editors support this without
problems.

Stefan
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top