Created attachment 1568403 [details] Full build log from COPR python-twisted-19.2.0-1.fc31 fails to build from source in Fedora rawhide with Python 3.8. The compilation failure is: gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -I/usr/include/python3.8 -c src/twisted/test/raiser.c -o build/temp.linux-x86_64-3.8/src/twisted/test/raiser.o BUILDSTDERR: src/twisted/test/raiser.c: In function ‘__Pyx_InitCachedConstants’: BUILDSTDERR: src/twisted/test/raiser.c:1140:89: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion] BUILDSTDERR: 1140 | __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_twisted_test_raiser_pyx, __pyx_n_s_raiseException, 17, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 17, __pyx_L1_error) BUILDSTDERR: | ^~~~~~~~~~~~~~~~~ BUILDSTDERR: | | BUILDSTDERR: | PyObject * {aka struct _object *} BUILDSTDERR: src/twisted/test/raiser.c:296:37: note: in definition of macro ‘__Pyx_PyCode_New’ BUILDSTDERR: 296 | PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) BUILDSTDERR: | ^~~~ BUILDSTDERR: In file included from /usr/include/python3.8/compile.h:5, BUILDSTDERR: from /usr/include/python3.8/Python.h:137, BUILDSTDERR: from src/twisted/test/raiser.c:4: BUILDSTDERR: /usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’} BUILDSTDERR: 105 | PyAPI_FUNC(PyCodeObject *) PyCode_New( BUILDSTDERR: | ^~~~~~~~~~ BUILDSTDERR: src/twisted/test/raiser.c:1140:269: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion] BUILDSTDERR: 1140 | __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_twisted_test_raiser_pyx, __pyx_n_s_raiseException, 17, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 17, __pyx_L1_error) BUILDSTDERR: | ^~ BUILDSTDERR: | | BUILDSTDERR: | int BUILDSTDERR: src/twisted/test/raiser.c:296:72: note: in definition of macro ‘__Pyx_PyCode_New’ BUILDSTDERR: 296 | PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) BUILDSTDERR: | ^~~~~ BUILDSTDERR: In file included from /usr/include/python3.8/compile.h:5, BUILDSTDERR: from /usr/include/python3.8/Python.h:137, BUILDSTDERR: from src/twisted/test/raiser.c:4: BUILDSTDERR: /usr/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’ BUILDSTDERR: 105 | PyAPI_FUNC(PyCodeObject *) PyCode_New( BUILDSTDERR: | ^~~~~~~~~~ BUILDSTDERR: src/twisted/test/raiser.c:1140:273: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion] BUILDSTDERR: 1140 | __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_twisted_test_raiser_pyx, __pyx_n_s_raiseException, 17, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 17, __pyx_L1_error) BUILDSTDERR: | ^~~~~~~~~~~~~~~~~ BUILDSTDERR: | | BUILDSTDERR: | PyObject * {aka struct _object *} BUILDSTDERR: src/twisted/test/raiser.c:296:79: note: in definition of macro ‘__Pyx_PyCode_New’ BUILDSTDERR: 296 | PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) BUILDSTDERR: | ^~~~ BUILDSTDERR: In file included from /usr/include/python3.8/compile.h:5, BUILDSTDERR: from /usr/include/python3.8/Python.h:137, BUILDSTDERR: from src/twisted/test/raiser.c:4: BUILDSTDERR: /usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’} BUILDSTDERR: 105 | PyAPI_FUNC(PyCodeObject *) PyCode_New( BUILDSTDERR: | ^~~~~~~~~~ BUILDSTDERR: src/twisted/test/raiser.c:296:11: error: too few arguments to function ‘PyCode_New’ BUILDSTDERR: 296 | PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) BUILDSTDERR: | ^~~~~~~~~~ BUILDSTDERR: src/twisted/test/raiser.c:1140:33: note: in expansion of macro ‘__Pyx_PyCode_New’ BUILDSTDERR: 1140 | __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_twisted_test_raiser_pyx, __pyx_n_s_raiseException, 17, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 17, __pyx_L1_error) BUILDSTDERR: | ^~~~~~~~~~~~~~~~ BUILDSTDERR: In file included from /usr/include/python3.8/compile.h:5, BUILDSTDERR: from /usr/include/python3.8/Python.h:137, BUILDSTDERR: from src/twisted/test/raiser.c:4: BUILDSTDERR: /usr/include/python3.8/code.h:105:28: note: declared here BUILDSTDERR: 105 | PyAPI_FUNC(PyCodeObject *) PyCode_New( BUILDSTDERR: | ^~~~~~~~~~ BUILDSTDERR: src/twisted/test/raiser.c: In function ‘__Pyx_CreateCodeObjectForTraceback’: BUILDSTDERR: src/twisted/test/raiser.c:2007:9: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion] BUILDSTDERR: 2007 | __pyx_empty_bytes, /*PyObject *code,*/ BUILDSTDERR: | ^~~~~~~~~~~~~~~~~ BUILDSTDERR: | | BUILDSTDERR: | PyObject * {aka struct _object *} BUILDSTDERR: src/twisted/test/raiser.c:296:37: note: in definition of macro ‘__Pyx_PyCode_New’ BUILDSTDERR: 296 | PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) BUILDSTDERR: | ^~~~ BUILDSTDERR: In file included from /usr/include/python3.8/compile.h:5, BUILDSTDERR: from /usr/include/python3.8/Python.h:137, BUILDSTDERR: from src/twisted/test/raiser.c:4: BUILDSTDERR: /usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’} BUILDSTDERR: 105 | PyAPI_FUNC(PyCodeObject *) PyCode_New( BUILDSTDERR: | ^~~~~~~~~~ BUILDSTDERR: src/twisted/test/raiser.c:2015:9: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion] BUILDSTDERR: 2015 | py_line, BUILDSTDERR: | ^~~~~~~ BUILDSTDERR: | | BUILDSTDERR: | int BUILDSTDERR: src/twisted/test/raiser.c:296:72: note: in definition of macro ‘__Pyx_PyCode_New’ BUILDSTDERR: 296 | PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) BUILDSTDERR: | ^~~~~ BUILDSTDERR: In file included from /usr/include/python3.8/compile.h:5, BUILDSTDERR: from /usr/include/python3.8/Python.h:137, BUILDSTDERR: from src/twisted/test/raiser.c:4: BUILDSTDERR: /usr/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’ BUILDSTDERR: 105 | PyAPI_FUNC(PyCodeObject *) PyCode_New( BUILDSTDERR: | ^~~~~~~~~~ BUILDSTDERR: src/twisted/test/raiser.c:2016:9: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion] BUILDSTDERR: 2016 | __pyx_empty_bytes /*PyObject *lnotab*/ BUILDSTDERR: | ^~~~~~~~~~~~~~~~~ BUILDSTDERR: | | BUILDSTDERR: | PyObject * {aka struct _object *} BUILDSTDERR: src/twisted/test/raiser.c:296:79: note: in definition of macro ‘__Pyx_PyCode_New’ BUILDSTDERR: 296 | PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) BUILDSTDERR: | ^~~~ BUILDSTDERR: In file included from /usr/include/python3.8/compile.h:5, BUILDSTDERR: from /usr/include/python3.8/Python.h:137, BUILDSTDERR: from src/twisted/test/raiser.c:4: BUILDSTDERR: /usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’} BUILDSTDERR: 105 | PyAPI_FUNC(PyCodeObject *) PyCode_New( BUILDSTDERR: | ^~~~~~~~~~ BUILDSTDERR: src/twisted/test/raiser.c:296:11: error: too few arguments to function ‘PyCode_New’ BUILDSTDERR: 296 | PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) BUILDSTDERR: | ^~~~~~~~~~ BUILDSTDERR: src/twisted/test/raiser.c:2001:15: note: in expansion of macro ‘__Pyx_PyCode_New’ BUILDSTDERR: 2001 | py_code = __Pyx_PyCode_New( BUILDSTDERR: | ^~~~~~~~~~~~~~~~ BUILDSTDERR: In file included from /usr/include/python3.8/compile.h:5, BUILDSTDERR: from /usr/include/python3.8/Python.h:137, BUILDSTDERR: from src/twisted/test/raiser.c:4: BUILDSTDERR: /usr/include/python3.8/code.h:105:28: note: declared here BUILDSTDERR: 105 | PyAPI_FUNC(PyCodeObject *) PyCode_New( BUILDSTDERR: | ^~~~~~~~~~ BUILDSTDERR: error: command 'gcc' failed with exit status 1 RPM build errors: BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.aIpoJw (%build) BUILDSTDERR: Bad exit status from /var/tmp/rpm-tmp.aIpoJw (%build) Child return code was: 1
This looks like a common problem after positional only arguments were introduced. See the Cython fix for reference: https://github.com/cython/cython/commit/d22678c700446636360d3fe97aef60f0cedef741
https://github.com/cython/cython/issues/2938
Oh, so this is Cython generated code? That fix should fix that but only if we regenerate the code. Currently, twisted doesn't seem to BR Cython at all.
Yes I've sent a patch upstream: https://twistedmatrix.com/trac/ticket/9640#comment:1 https://github.com/twisted/twisted/pull/1140 I'm rebuilding master with a patch. I've tested it with the Py 3.8 COPR and it works.
Fixed in python-twisted-19.2.0-2.fc31.
Yes, it builds. Thank you.