Skip to content

'event' extension fails to build (OSX and Linux) #14

Closed
grncdr opened this Issue Mar 22, 2012 · 5 comments

2 participants

@grncdr
grncdr commented Mar 22, 2012

When trying to install haigha 0.4.1 on OSX or Arch Linux, python 2.7 the event extension fails to build with the following output

Arch Linux

python --version
Python 2.7.2
found system libevent for linux2

running install

running build

running build_ext

building 'event' extension

creating build

creating build/temp.linux-i686-2.7

gcc -pthread -fno-strict-aliasing -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DNDEBUG -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include -I/usr/include/python2.7 -c event.c -o build/temp.linux-i686-2.7/event.o

event.c: In function ‘__pyx_pf_5event_11bufferevent_read’:

event.c:4137:87: error: dereferencing pointer to incomplete type

event.c:4149:99: error: dereferencing pointer to incomplete type

event.c:4177:109: error: dereferencing pointer to incomplete type

event.c: In function ‘__pyx_pf_5event_11bufferevent_write’:

event.c:4247:3: warning: passing argument 2 of ‘PyObject_AsCharBuffer’ from incompatible pointer type [enabled by default]

/usr/include/python2.7/abstract.h:476:22: note: expected ‘const char **’ but argument is of type ‘char **’

event.c: In function ‘__pyx_pf_5event_dns_resolve_reverse’:

event.c:5307:3: warning: passing argument 1 of ‘evdns_resolve_reverse’ from incompatible pointer type [enabled by default]

/usr/include/event2/dns_compat.h:220:5: note: expected ‘const struct in_addr *’ but argument is of type ‘char *’

event.c: In function ‘__pyx_pf_5event_dns_resolve_reverse_ipv6’:

event.c:5463:3: warning: passing argument 1 of ‘evdns_resolve_reverse’ from incompatible pointer type [enabled by default]

/usr/include/event2/dns_compat.h:220:5: note: expected ‘const struct in_addr *’ but argument is of type ‘char *’

event.c: In function ‘__pyx_f_5event___path_handler’:

event.c:6607:24: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]

event.c:6630:23: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]

event.c:6653:16: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]

error: command 'gcc' failed with exit status 1

OSX

python --version
Python 2.7.1
found installed libevent in /usr/local/lib

running install

running build

running build_ext

building 'event' extension

llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/usr/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c event.c -o build/temp.macosx-10.7-intel-2.7/event.o

event.c: In function '__pyx_pf_5event_5event_add':

event.c:2069: warning: implicit conversion shortens 64-bit value into a 32-bit value

event.c:2076: warning: implicit conversion shortens 64-bit value into a 32-bit value

event.c: In function '__pyx_pf_5event_11bufferevent_read':

event.c:4137: error: dereferencing pointer to incomplete type

event.c:4149: error: dereferencing pointer to incomplete type

event.c:4177: error: dereferencing pointer to incomplete type

event.c: In function '__pyx_pf_5event_11bufferevent_write':

event.c:4247: warning: passing argument 2 of 'PyObject_AsCharBuffer' from incompatible pointer type

event.c:4247: warning: passing argument 3 of 'PyObject_AsCharBuffer' from incompatible pointer type

event.c: In function '__pyx_pf_5event_dns_resolve_reverse':

event.c:5307: warning: passing argument 1 of 'evdns_resolve_reverse' from incompatible pointer type

event.c: In function '__pyx_pf_5event_dns_resolve_reverse_ipv6':

event.c:5463: warning: passing argument 1 of 'evdns_resolve_reverse' from incompatible pointer type

event.c: In function '__pyx_pf_5event_12__wsgi_input_read':

event.c:6320: warning: pointer targets in passing argument 1 of 'PyString_FromStringAndSize' differ in signedness

event.c: In function '__pyx_f_5event___path_handler':

event.c:6607: warning: assignment discards qualifiers from pointer target type

event.c:6630: warning: assignment discards qualifiers from pointer target type

event.c:6653: warning: assignment discards qualifiers from pointer target type

event.c: In function '__pyx_pf_5event_5event___simple_callback':

event.c:1689: warning: implicit conversion shortens 64-bit value into a 32-bit value

event.c: In function '__pyx_pf_5event_5event_add':

event.c:2069: warning: implicit conversion shortens 64-bit value into a 32-bit value

event.c:2076: warning: implicit conversion shortens 64-bit value into a 32-bit value

event.c: In function '__pyx_pf_5event_11bufferevent_read':

event.c:4137: error: dereferencing pointer to incomplete type

event.c:4149: error: dereferencing pointer to incomplete type

event.c:4177: error: dereferencing pointer to incomplete type

event.c: In function '__pyx_pf_5event_11bufferevent_write':

event.c:4247: warning: passing argument 2 of 'PyObject_AsCharBuffer' from incompatible pointer type

event.c:4247: warning: passing argument 3 of 'PyObject_AsCharBuffer' from incompatible pointer type

event.c: In function '__pyx_f_5event___evdns_callback':

event.c:4536: warning: cast from pointer to integer of different size

event.c: In function '__pyx_pf_5event_dns_resolve_ipv4':

event.c:4995: warning: cast to pointer from integer of different size

event.c: In function '__pyx_pf_5event_dns_resolve_ipv6':

event.c:5151: warning: cast to pointer from integer of different size

event.c: In function '__pyx_pf_5event_dns_resolve_reverse':

event.c:5307: warning: cast to pointer from integer of different size

event.c:5307: warning: passing argument 1 of 'evdns_resolve_reverse' from incompatible pointer type

event.c: In function '__pyx_pf_5event_dns_resolve_reverse_ipv6':

event.c:5463: warning: cast to pointer from integer of different size

event.c:5463: warning: passing argument 1 of 'evdns_resolve_reverse' from incompatible pointer type

event.c: In function '__pyx_pf_5event_12__wsgi_input_read':

event.c:6320: warning: pointer targets in passing argument 1 of 'PyString_FromStringAndSize' differ in signedness

event.c: In function '__pyx_f_5event___path_handler':

event.c:6607: warning: assignment discards qualifiers from pointer target type

event.c:6630: warning: assignment discards qualifiers from pointer target type

event.c:6653: warning: assignment discards qualifiers from pointer target type

lipo: can't open input file: /var/folders/qv/z4k1qngx15g9bytkl9wlbbvm0000gp/T//cc7gb8Jl.out (No such file or directory)

error: command 'llvm-gcc-4.2' failed with exit status 1
@awestendorf awestendorf was assigned Mar 22, 2012
@awestendorf
Agora Games member

There's a ticket in our branch of py-event that covers some problems compiling it on the Mac.

The first step we'll take is to remove it as a fixed requirement of haigha, because the gevent transport is the preferred for general purpose applications. I'll also be adding support for synchronous transports soon, so the fixed dependencies list should be short by default.

I'm tracking that in #10

@grncdr
grncdr commented Mar 22, 2012

Excellent, I found haigha because I was looking for lib that played nicely with gevent. If one were to take the approach suggested in issue 10, and remove py-eventsocket from requirements.txt is it possible to use haigha with gevent and not install py-event?

@awestendorf
Agora Games member

Not yet, I need to fix the imports in the connection module too. I'm trying to schedule this fix as soon as possible.

@awestendorf
Agora Games member

This afternoon opened up and I released the fix in 0.4.2

4e92c02

@grncdr
grncdr commented Mar 26, 2012

cool, I will give this a closer look in the next couple of days :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.