Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.4 / Cython 0.23 build failure (ubuntu-14.04) #76

Open
vovanec opened this issue Aug 20, 2015 · 1 comment
Open

Python 3.4 / Cython 0.23 build failure (ubuntu-14.04) #76

vovanec opened this issue Aug 20, 2015 · 1 comment

Comments

@vovanec
Copy link

vovanec commented Aug 20, 2015

Hey Folks,

I'm having a build issue when trying to compile coro. Pretty sure I've seen this error before in other bug threads, as Mark said it is related to general Python 3 support. What is the progress on that? I'd really like to try shrapnel, but Python 3 is what we're using with all current projects.

vagrant@vagrant-ubuntu-trusty-64:~/shrapnel$ python3 setup.py build
detected NPN-capable OpenSSL
running build
running build_py
file backdoor.py (for module backdoor) not found
file coro_process.py (for module coro_process) not found
file coro_unittest.py (for module coro_unittest) not found
file backdoor.py (for module backdoor) not found
file coro_process.py (for module coro_process) not found
file coro_unittest.py (for module coro_unittest) not found
running build_ext
skipping 'coro/event_queue.cpp' Cython extension (up-to-date)
cythoning coro/_coro.pyx to coro/_coro.c

Error compiling Cython file:
------------------------------------------------------------
...
                    )
            else:
                raise ValueError ("not a valid IPv6 address")

    cdef parse_address_unix (self, bytes address, sockaddr_storage * sa, socklen_t * addr_len, bint resolve):
        cdef sockaddr_un * sun
            ^
------------------------------------------------------------

coro/socket.pyx:858:13: 'sockaddr_un' is not a type identifier

Error compiling Cython file:
------------------------------------------------------------
...

        :raises ValueError: The value could not be parsed.
        """
        cdef sockaddr_in * sin
        cdef sockaddr_in6 *sin6
        cdef sockaddr_un * sun
            ^
------------------------------------------------------------

coro/socket.pyx:888:13: 'sockaddr_un' is not a type identifier

Error compiling Cython file:
------------------------------------------------------------
...
            string for UNIX-domain sockets.  Returns None for unknown socket
            domains.
        """
        cdef sockaddr_in * sin
        cdef sockaddr_in6 *sin6
        cdef sockaddr_un * sun
            ^
------------------------------------------------------------

coro/socket.pyx:912:13: 'sockaddr_un' is not a type identifier

Error compiling Cython file:
------------------------------------------------------------
...
    cdef parse_address_unix (self, bytes address, sockaddr_storage * sa, socklen_t * addr_len, bint resolve):
        cdef sockaddr_un * sun
        # AF_UNIX
        # +1 to grab the NUL char
        l = len (address) + 1
        sun = <sockaddr_un *>sa
              ^
------------------------------------------------------------

coro/socket.pyx:862:15: 'sockaddr_un' is not a type identifier

Error compiling Cython file:
------------------------------------------------------------
...
        sun.sun_family = AF_UNIX
        IF UNAME_SYSNAME == "FreeBSD":
            sun.sun_len = sizeof (sockaddr_un)
        if (l < sizeof (sun.sun_path)):
            memcpy (<void *>sun.sun_path, <void*><char*>address, l)
            addr_len[0] = sizeof (sockaddr_un)
                                            ^
------------------------------------------------------------

coro/socket.pyx:868:45: undeclared name not builtin: sockaddr_un

Error compiling Cython file:
------------------------------------------------------------
...
            return (ascii_buf, ntohs(sin.sin_port))
        elif (<sockaddr_in6 *>sa).sin6_family == AF_INET6:
            sin6 = <sockaddr_in6 *> sa
            inet_ntop (AF_INET6, &(sin6.sin6_addr), ascii_buf, INET6_ADDRSTRLEN)
            return (ascii_buf, ntohs(sin6.sin6_port))
        elif (<sockaddr_un *>sa).sun_family == AF_UNIX:
              ^
------------------------------------------------------------

coro/socket.pyx:923:15: 'sockaddr_un' is not a type identifier

Error compiling Cython file:
------------------------------------------------------------
...
        elif (<sockaddr_in6 *>sa).sin6_family == AF_INET6:
            sin6 = <sockaddr_in6 *> sa
            inet_ntop (AF_INET6, &(sin6.sin6_addr), ascii_buf, INET6_ADDRSTRLEN)
            return (ascii_buf, ntohs(sin6.sin6_port))
        elif (<sockaddr_un *>sa).sun_family == AF_UNIX:
            sun = <sockaddr_un *>sa
                  ^
------------------------------------------------------------

coro/socket.pyx:924:19: 'sockaddr_un' is not a type identifier
building 'coro._coro' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/home/vagrant/shrapnel/. -I/home/vagrant/shrapnel/include -I/usr/include/python3.4m -c coro/_coro.c -o build/temp.linux-x86_64-3.4/coro/_coro.o -Wno-unused-function
coro/_coro.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
 #error Do not use this file, it is the result of a failed Cython compilation.
  ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
@cjrh
Copy link

cjrh commented Mar 28, 2016

Exactly the same error on py35, Cython 0.23, OS X 10.11.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants