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

Compilation error with Python 3.8a3 #1286

Closed
zopyx opened this issue May 2, 2019 · 8 comments
Closed

Compilation error with Python 3.8a3 #1286

zopyx opened this issue May 2, 2019 · 8 comments

Comments

@zopyx
Copy link

zopyx commented May 2, 2019

    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Izmq/utils -Izmq/backend/cython -Izmq/devices -c build/temp.linux-x86_64-3.8/scratch/vers.c -o build/temp.linux-x86_64-3.8/scratch/vers.o
    gcc -pthread build/temp.linux-x86_64-3.8/scratch/vers.o -lzmq -lrt -o build/temp.linux-x86_64-3.8/scratch/vers
        ZMQ version detected: 4.1.6
    Warning: Detected ZMQ version: 4.1.6, but pyzmq targets ZMQ 4.3.1.
    Warning: libzmq features and fixes introduced after 4.1.6 will be unavailable.
    ************************************************
    ************************************************
    building 'zmq.backend.cython._device' extension
    creating build/temp.linux-x86_64-3.8/zmq
    creating build/temp.linux-x86_64-3.8/zmq/backend
    creating build/temp.linux-x86_64-3.8/zmq/backend/cython
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DHAVE_SYS_UN_H=1 -Izmq/utils -Izmq/backend/cython -Izmq/devices -I/home/ajung/src/pp.server/include -I/home/ajung/.pyenv/versions/3.8-dev/include/python3.8 -c zmq/backend/cython/_device.c -o build/temp.linux-x86_64-3.8/zmq/backend/cython/_device.o
    zmq/backend/cython/_device.c: In function ‘__Pyx_InitCachedConstants’:
    zmq/backend/cython/_device.c:2670:89: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
       __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_zmq_backend_cython__device_pyx, __pyx_n_s_device, 36, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 36, __pyx_L1_error)
                                                                                             ^
    zmq/backend/cython/_device.c:314:37: note: in definition of macro ‘__Pyx_PyCode_New’
               PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
                                         ^~~~
    In file included from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/compile.h:5:0,
                     from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/Python.h:137,
                     from zmq/backend/cython/_device.c:4:
    /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject * {aka struct _object *}’
     PyAPI_FUNC(PyCodeObject *) PyCode_New(
                                ^~~~~~~~~~
    zmq/backend/cython/_device.c:2670:259: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
       __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_zmq_backend_cython__device_pyx, __pyx_n_s_device, 36, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 36, __pyx_L1_error)
                                                                                                                                                                                                                                                                       ^
    zmq/backend/cython/_device.c:314:72: note: in definition of macro ‘__Pyx_PyCode_New’
               PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
                                                                            ^~~~~
    In file included from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/compile.h:5:0,
                     from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/Python.h:137,
                     from zmq/backend/cython/_device.c:4:
    /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/code.h:105:28: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
     PyAPI_FUNC(PyCodeObject *) PyCode_New(
                                ^~~~~~~~~~
    zmq/backend/cython/_device.c:2670:263: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
       __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_zmq_backend_cython__device_pyx, __pyx_n_s_device, 36, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 36, __pyx_L1_error)
                                                                                                                                                                                                                                                                           ^
    zmq/backend/cython/_device.c:314:79: note: in definition of macro ‘__Pyx_PyCode_New’
               PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
                                                                                   ^~~~
    In file included from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/compile.h:5:0,
                     from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/Python.h:137,
                     from zmq/backend/cython/_device.c:4:
    /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject * {aka struct _object *}’
     PyAPI_FUNC(PyCodeObject *) PyCode_New(
                                ^~~~~~~~~~
    zmq/backend/cython/_device.c:314:11: error: too few arguments to function ‘PyCode_New’
               PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
               ^
    zmq/backend/cython/_device.c:2670:33: note: in expansion of macro ‘__Pyx_PyCode_New’
       __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_zmq_backend_cython__device_pyx, __pyx_n_s_device, 36, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 36, __pyx_L1_error)
                                     ^~~~~~~~~~~~~~~~
    In file included from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/compile.h:5:0,
                     from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/Python.h:137,
                     from zmq/backend/cython/_device.c:4:
    /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/code.h:105:28: note: declared here
     PyAPI_FUNC(PyCodeObject *) PyCode_New(
                                ^~~~~~~~~~
    zmq/backend/cython/_device.c:2685:89: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
       __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_zmq_backend_cython__device_pyx, __pyx_n_s_proxy, 68, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 68, __pyx_L1_error)
                                                                                             ^
    zmq/backend/cython/_device.c:314:37: note: in definition of macro ‘__Pyx_PyCode_New’
               PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
                                         ^~~~
    In file included from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/compile.h:5:0,
                     from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/Python.h:137,
                     from zmq/backend/cython/_device.c:4:
    /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject * {aka struct _object *}’
     PyAPI_FUNC(PyCodeObject *) PyCode_New(
                                ^~~~~~~~~~
    zmq/backend/cython/_device.c:2685:260: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
       __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_zmq_backend_cython__device_pyx, __pyx_n_s_proxy, 68, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 68, __pyx_L1_error)
                                                                                                                                                                                                                                                                        ^
    zmq/backend/cython/_device.c:314:72: note: in definition of macro ‘__Pyx_PyCode_New’
               PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
                                                                            ^~~~~
    In file included from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/compile.h:5:0,
                     from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/Python.h:137,
                     from zmq/backend/cython/_device.c:4:
    /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/code.h:105:28: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
     PyAPI_FUNC(PyCodeObject *) PyCode_New(
                                ^~~~~~~~~~
    zmq/backend/cython/_device.c:2685:264: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
       __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_zmq_backend_cython__device_pyx, __pyx_n_s_proxy, 68, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 68, __pyx_L1_error)
                                                                                                                                                                                                                                                                            ^
    zmq/backend/cython/_device.c:314:79: note: in definition of macro ‘__Pyx_PyCode_New’
               PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
                                                                                   ^~~~
    In file included from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/compile.h:5:0,
                     from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/Python.h:137,
                     from zmq/backend/cython/_device.c:4:
    /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject * {aka struct _object *}’
     PyAPI_FUNC(PyCodeObject *) PyCode_New(
                                ^~~~~~~~~~
    zmq/backend/cython/_device.c:314:11: error: too few arguments to function ‘PyCode_New’
               PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
               ^
    zmq/backend/cython/_device.c:2685:33: note: in expansion of macro ‘__Pyx_PyCode_New’
       __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_zmq_backend_cython__device_pyx, __pyx_n_s_proxy, 68, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 68, __pyx_L1_error)
                                     ^~~~~~~~~~~~~~~~
    In file included from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/compile.h:5:0,
                     from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/Python.h:137,
                     from zmq/backend/cython/_device.c:4:
    /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/code.h:105:28: note: declared here
     PyAPI_FUNC(PyCodeObject *) PyCode_New(
                                ^~~~~~~~~~
    zmq/backend/cython/_device.c: In function ‘__Pyx_CreateCodeObjectForTraceback’:
    zmq/backend/cython/_device.c:4999:9: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
             __pyx_empty_bytes, /*PyObject *code,*/
             ^
    zmq/backend/cython/_device.c:314:37: note: in definition of macro ‘__Pyx_PyCode_New’
               PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
                                         ^~~~
    In file included from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/compile.h:5:0,
                     from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/Python.h:137,
                     from zmq/backend/cython/_device.c:4:
    /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject * {aka struct _object *}’
     PyAPI_FUNC(PyCodeObject *) PyCode_New(
                                ^~~~~~~~~~
    zmq/backend/cython/_device.c:5007:9: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
             py_line,
             ^
    zmq/backend/cython/_device.c:314:72: note: in definition of macro ‘__Pyx_PyCode_New’
               PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
                                                                            ^~~~~
    In file included from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/compile.h:5:0,
                     from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/Python.h:137,
                     from zmq/backend/cython/_device.c:4:
    /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/code.h:105:28: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
     PyAPI_FUNC(PyCodeObject *) PyCode_New(
                                ^~~~~~~~~~
    zmq/backend/cython/_device.c:5008:9: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
             __pyx_empty_bytes  /*PyObject *lnotab*/
             ^
    zmq/backend/cython/_device.c:314:79: note: in definition of macro ‘__Pyx_PyCode_New’
               PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
                                                                                   ^~~~
    In file included from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/compile.h:5:0,
                     from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/Python.h:137,
                     from zmq/backend/cython/_device.c:4:
    /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject * {aka struct _object *}’
     PyAPI_FUNC(PyCodeObject *) PyCode_New(
                                ^~~~~~~~~~
    zmq/backend/cython/_device.c:314:11: error: too few arguments to function ‘PyCode_New’
               PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
               ^
    zmq/backend/cython/_device.c:4993:15: note: in expansion of macro ‘__Pyx_PyCode_New’
         py_code = __Pyx_PyCode_New(
                   ^~~~~~~~~~~~~~~~
    In file included from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/compile.h:5:0,
                     from /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/Python.h:137,
                     from zmq/backend/cython/_device.c:4:
    /home/ajung/.pyenv/versions/3.8-dev/include/python3.8/code.h:105:28: note: declared here
     PyAPI_FUNC(PyCodeObject *) PyCode_New(
                                ^~~~~~~~~~
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/home/ajung/src/pp.server/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-8tu1dg0v/pyzmq/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-o0ss2ngz/install-record.txt --single-version-externally-managed --compile --install-headers /home/ajung/src/pp.server/include/site/python3.8/pyzmq" failed with error code 1 in /tmp/pip-install-8tu1dg0v/pyzmq/
You are using pip version 19.0.3, however version 19.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

@jtpio
Copy link

jtpio commented May 3, 2019

Are you using the latest CPython?

It looks like it might be related to the new PEP 570 - Positional-Only Parameters

@zopyx
Copy link
Author

zopyx commented May 3, 2019

As written: Python 3.8a3

@minrk
Copy link
Member

minrk commented May 7, 2019

What's pip list?

There is this Cython issue: cython/cython#2938 which has been fixed in master, but not released. We may need to rebuild sources with Cython >= 0.29.8 when it is released. Interestingly, when I install CPython 3.8.0a3 from conda-forge (on mac), I can pip install pyzmq just fine. Not sure why that would be different. How did you install Python and on what OS?

@hroncok
Copy link
Contributor

hroncok commented May 14, 2019

This started on 3.8.0a4 for me where positional only arguments were added.

@minrk
Copy link
Member

minrk commented May 14, 2019

Thanks. I'll make a bugfix release with Cython 0.29.8 once it's out. If someone notices that Cython's been released with the fix and I haven't made a release, feel free to ping here again.

@slav0nic
Copy link

slav0nic commented Jul 1, 2019

@minrk Cython 0.29.11 is already available

@tirkarthi
Copy link
Contributor

See also CPython repo discussion : python/cpython#13959

@minrk
Copy link
Member

minrk commented Jul 2, 2019

Forgot to close this. 18.0.2 is out last week and is built with Cython 0.29.10 and should build on Python 3.8.

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

6 participants