Error building 1.0b2 for Python 2.7 on Windows 7 (64 bit)

378 views
Skip to first unread message

toadslabs

unread,
May 12, 2012, 3:16:03 AM5/12/12
to gevent: coroutine-based Python network library
I did not find posted binaries for gevent 1.0b2 for Python2.7 on
Windows 64bit. I have attempted to build them with Visual Studio 2008
and the latest cython but ran into some issues that I was hoping to
get some help on.

1) I installed the gnu core utilities for windows and made sure they
were available on my path.
2) I am attempting to build with the following command from the root
of the gevent source tree:

python setup.py build bdist_wininst --user-access-control=auto

3) I initially encountered this error:

running build_ext
c:\Python27\python.exe util/cythonpp.py -o gevent.core.c gevent/
core.ppyx
Running cython -o gevent.core.c gevent/core.pyx # !EV_CHILD_ENABLE
&& !EV_USE_S
IGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)
Traceback (most recent call last):
File "util/cythonpp.py", line 797, in <module>
process_filename(filename, options.output_file)
File "util/cythonpp.py", line 82, in process_filename
atomic_write(pyx_filename, py_banner + value)
File "util/cythonpp.py", line 517, in atomic_write
os.rename(tmpname, filename)
WindowsError: [Error 183] Cannot create a file when that file already
exists
make: *** [gevent/gevent.core.c] Error 1

I was able to get around it by replacing the os.rename command with
shutil.move.

4) The build gets further but I get the following error:

Generating gevent.core.c
Saving gevent/core.pyx
echo >> gevent.core.c
echo '#include "callbacks.c"' >> gevent.core.c
mv gevent.core.* gevent/
cython -o gevent.ares.c gevent/ares.pyx
mv gevent.ares.* gevent/
cython -o gevent._semaphore.c gevent/_semaphore.pyx
mv gevent._semaphore.* gevent/
cython -o gevent._util.c gevent/_util.pyx
mv gevent._util.* gevent/
building 'gevent.core' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\gevent
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN
\amd64\cl.exe /c /nolog
o /Ox /MD /W3 /GS- /DNDEBUG -DFD_SETSIZE=1024 -D_WIN32=1 -
DLIBEV_EMBED=1 -DEV_CO
MMON= -DEV_CHECK_ENABLE=0 -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -
DEV_PERIODI
C_ENABLE=0 -DCARES_STATICLIB= -DCARES_EMBED=1 -DEV_STANDALONE=1 -
Ilibev -IC:\Pyt
hon27\include -IC:\Python27\PC /Tcgevent/gevent.core.c /Fobuild
\temp.win-amd64-2
.7\Release\gevent/gevent.core.obj
gevent.core.c
libev\ev.c(751) : warning C4244: 'function' : conversion from
'uint64_t' to 'uin
t32_t', possible loss of data
libev\ev.c(787) : warning C4244: 'function' : conversion from
'uint64_t' to 'uin
t32_t', possible loss of data
libev\ev.c(827) : warning C4244: 'function' : conversion from
'uint64_t' to 'uin
t32_t', possible loss of data
libev\ev.c(871) : warning C4244: 'function' : conversion from
'uint64_t' to 'uin
t32_t', possible loss of data
c:\users\guest\code\lib\gevent1.0\libev\ev_win32.c(124) : warning
C4244: 'functi
on' : conversion from 'SOCKET' to 'long', possible loss of data
c:\users\guest\code\lib\gevent1.0\libev\ev_win32.c(125) : warning
C4244: 'functi
on' : conversion from 'SOCKET' to 'long', possible loss of data
libev\ev.c(1514) : warning C4101: 'arg' : unreferenced local variable
libev\ev.c(1708) : warning C4244: '=' : conversion from '__int64' to
'int', poss
ible loss of data
libev\ev.c(1881) : warning C4133: '=' : incompatible types - from
'WSABUF *' to
'CHAR *'
c:\users\guest\code\lib\gevent1.0\libev\ev_select.c(200) : warning
C4244: 'initi
alizing' : conversion from 'ev_tstamp' to 'unsigned long', possible
loss of data

gevent/gevent.core.c(26729) : warning C4133: 'function' : incompatible
types - f
rom 'ev_statdata *' to 'stat *'
gevent/gevent.core.c(26808) : warning C4133: 'function' : incompatible
types - f
rom 'ev_statdata *' to 'stat *'
gevent/gevent.core.c(39052) : error C2061: syntax error : identifier
'is'
gevent/gevent.core.c(39052) : error C2059: syntax error : ';'
gevent/gevent.core.c(39052) : error C2143: syntax error : missing '{'
before '.'

gevent/gevent.core.c(39052) : error C2059: syntax error : '.'
gevent/gevent.core.c(39053) : error C2015: too many characters in
constant
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
\BIN\amd64
\cl.exe"' failed with exit status 2

This is all being run from the Visual Studio 2008 Win64 Command
Prompt. Any help on getting around this error would be appreciated.

Denis Bilenko

unread,
May 12, 2012, 5:59:28 AM5/12/12
to gev...@googlegroups.com
On Sat, May 12, 2012 at 11:16 AM, toadslabs <toad...@gmail.com> wrote:
> I did not find posted binaries for gevent 1.0b2 for Python2.7 on
> Windows 64bit.  I have attempted to build them with Visual Studio 2008
> and the latest cython but ran into some issues that I was hoping to
> get some help on.

You don't need cython and cythonpp.py if you got the source tarball
from http://gevent.googlecode.com/files/gevent-1.0b2.tar.gz

Can you get that and try to build it?

toadslabs

unread,
May 12, 2012, 10:23:35 PM5/12/12
to gevent: coroutine-based Python network library
That worked flawlessly. Thanks for the help, Denis. I have posted
the binary in case it could be helpful to anyone else.

http://dl.dropbox.com/u/2908161/gevent-1.0b2.win-amd64-py2.7.exe

On May 12, 2:59 am, Denis Bilenko <denis.bile...@gmail.com> wrote:
> On Sat, May 12, 2012 at 11:16 AM, toadslabs <toadsl...@gmail.com> wrote:
> > I did not find posted binaries for gevent 1.0b2 for Python2.7 on
> > Windows 64bit.  I have attempted to build them with Visual Studio 2008
> > and the latest cython but ran into some issues that I was hoping to
> > get some help on.
>
> You don't need cython and cythonpp.py if you got the source tarball
> fromhttp://gevent.googlecode.com/files/gevent-1.0b2.tar.gz

非狐外传

unread,
Apr 4, 2013, 10:56:24 AM4/4/13
to gev...@googlegroups.com
ha, Thank for this version for amd64. I just to find it for my win7-64.

Today, gevet 1.0rc2 is OK. Can you rebuild the latest version ??
Reply all
Reply to author
Forward
0 new messages