[Python-3.8.0~a4] error: ‘PyGC_Head’ {aka ‘struct <anonymous>’} has no member named ‘gc’

Issue #125 resolved
sagitter created an issue

Hi all.

In case you plan using Python-3.8, this is a build of petsc4py-3.11.0 made in advance in view of a Python stack updating in Fedora:

mpicc -pthread -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 -O3 -fPIC -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 -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 -DPETSC_DIR=/usr -I/usr/include/openmpi-x86_64 -I/usr/include/openmpi-x86_64/hypre -I/usr/lib64/gfortran/modules/openmpi/petsc -I/usr/include/openmpi-x86_64/petsc -I/usr/include -Isrc/include -I/usr/lib64/python3.8/site-packages/numpy/core/include -I/usr/include/python3.8 -c src/PETSc.c -o build/temp.linux-x86_64-3.8/src/PETSc.o
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c: In function ‘__pyx_f_8petsc4py_5PETSc_tp_traverse’:
src/petsc4py.PETSc.c:75545:37: error: ‘PyGC_Head’ {aka ‘struct &lt;anonymous&gt;’} has no member named ‘gc’
75545 |   __pyx_t_2 = ((_Py_AS_GC(__pyx_v_d)-&gt;gc.gc_refs == 0) != 0);
      |                                     ^~
src/petsc4py.PETSc.c:75557:25: error: ‘PyGC_Head’ {aka ‘struct &lt;anonymous&gt;’} has no member named ‘gc’
75557 |     _Py_AS_GC(__pyx_v_d)-&gt;gc.gc_refs = 1;
      |                         ^~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c: In function ‘__Pyx_InitCachedConstants’:
src/petsc4py.PETSc.c:293895:90: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
293895 |   __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_init, 7, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(1, 7, __pyx_L1_error)
       |                                                                                          ^~~~~~~~~~~~~~~~~
       |                                                                                          |
       |                                                                                          PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:37: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                     ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:293895:246: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
293895 |   __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_init, 7, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(1, 7, __pyx_L1_error)
       |                                                                                                                                                                                                                                                      ^
       |                                                                                                                                                                                                                                                      |
       |                                                                                                                                                                                                                                                      int
src/petsc4py.PETSc.c:314:72: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                        ^~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:293895:249: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
293895 |   __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_init, 7, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(1, 7, __pyx_L1_error)
       |                                                                                                                                                                                                                                                         ^~~~~~~~~~~~~~~~~
       |                                                                                                                                                                                                                                                         |
       |                                                                                                                                                                                                                                                         PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:79: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                               ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:314:11: error: too few arguments to function ‘PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |           ^~~~~~~~~~
src/petsc4py.PETSc.c:293895:34: note: in expansion of macro ‘__Pyx_PyCode_New’
293895 |   __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_init, 7, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(1, 7, __pyx_L1_error)
       |                                  ^~~~~~~~~~~~~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: declared here
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:293907:90: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
293907 |   __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_nonzero_2, 11, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(1, 11, __pyx_L1_error)
       |                                                                                          ^~~~~~~~~~~~~~~~~
       |                                                                                          |
       |                                                                                          PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:37: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                     ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:293907:251: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
293907 |   __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_nonzero_2, 11, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(1, 11, __pyx_L1_error)
       |                                                                                                                                                                                                                                                           ^~
       |                                                                                                                                                                                                                                                           |
       |                                                                                                                                                                                                                                                           int
src/petsc4py.PETSc.c:314:72: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                        ^~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:293907:255: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
293907 |   __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_nonzero_2, 11, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(1, 11, __pyx_L1_error)
       |                                                                                                                                                                                                                                                               ^~~~~~~~~~~~~~~~~
       |                                                                                                                                                                                                                                                               |
       |                                                                                                                                                                                                                                                               PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:79: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                               ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:314:11: error: too few arguments to function ‘PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |           ^~~~~~~~~~
src/petsc4py.PETSc.c:293907:34: note: in expansion of macro ‘__Pyx_PyCode_New’
293907 |   __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_nonzero_2, 11, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(1, 11, __pyx_L1_error)
       |                                  ^~~~~~~~~~~~~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: declared here
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:293919:90: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
293919 |   __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_repr, 15, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(1, 15, __pyx_L1_error)
       |                                                                                          ^~~~~~~~~~~~~~~~~
       |                                                                                          |
       |                                                                                          PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:37: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                     ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:293919:246: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
293919 |   __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_repr, 15, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(1, 15, __pyx_L1_error)
       |                                                                                                                                                                                                                                                      ^~
       |                                                                                                                                                                                                                                                      |
       |                                                                                                                                                                                                                                                      int
src/petsc4py.PETSc.c:314:72: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                        ^~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:293919:250: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
293919 |   __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_repr, 15, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(1, 15, __pyx_L1_error)
       |                                                                                                                                                                                                                                                          ^~~~~~~~~~~~~~~~~
       |                                                                                                                                                                                                                                                          |
       |                                                                                                                                                                                                                                                          PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:79: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                               ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:314:11: error: too few arguments to function ‘PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |           ^~~~~~~~~~
src/petsc4py.PETSc.c:293919:34: note: in expansion of macro ‘__Pyx_PyCode_New’
293919 |   __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_repr, 15, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(1, 15, __pyx_L1_error)
       |                                  ^~~~~~~~~~~~~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: declared here
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:293931:90: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
293931 |   __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_str, 18, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(1, 18, __pyx_L1_error)
       |                                                                                          ^~~~~~~~~~~~~~~~~
       |                                                                                          |
       |                                                                                          PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:37: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                     ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:293931:245: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
293931 |   __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_str, 18, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(1, 18, __pyx_L1_error)
       |                                                                                                                                                                                                                                                     ^~
       |                                                                                                                                                                                                                                                     |
       |                                                                                                                                                                                                                                                     int
src/petsc4py.PETSc.c:314:72: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                        ^~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:293931:249: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
293931 |   __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_str, 18, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(1, 18, __pyx_L1_error)
       |                                                                                                                                                                                                                                                         ^~~~~~~~~~~~~~~~~
       |                                                                                                                                                                                                                                                         |
       |                                                                                                                                                                                                                                                         PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:79: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                               ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:314:11: error: too few arguments to function ‘PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |           ^~~~~~~~~~
src/petsc4py.PETSc.c:293931:34: note: in expansion of macro ‘__Pyx_PyCode_New’
293931 |   __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Error_pyx, __pyx_n_s_str, 18, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(1, 18, __pyx_L1_error)
       |                                  ^~~~~~~~~~~~~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: declared here
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:294526:91: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
294526 |   __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_PETSc_pyx, __pyx_n_s_initialize, 427, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(11, 427, __pyx_L1_error)
       |                                                                                           ^~~~~~~~~~~~~~~~~
       |                                                                                           |
       |                                                                                           PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:37: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                     ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:294526:254: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
294526 |   __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_PETSc_pyx, __pyx_n_s_initialize, 427, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(11, 427, __pyx_L1_error)
       |                                                                                                                                                                                                                                                              ^~~
       |                                                                                                                                                                                                                                                              |
       |                                                                                                                                                                                                                                                              int
src/petsc4py.PETSc.c:314:72: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                        ^~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:294526:259: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
294526 |   __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_PETSc_pyx, __pyx_n_s_initialize, 427, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(11, 427, __pyx_L1_error)
       |                                                                                                                                                                                                                                                                   ^~~~~~~~~~~~~~~~~
       |                                                                                                                                                                                                                                                                   |
       |                                                                                                                                                                                                                                                                   PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:79: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                               ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:314:11: error: too few arguments to function ‘PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |           ^~~~~~~~~~
src/petsc4py.PETSc.c:294526:35: note: in expansion of macro ‘__Pyx_PyCode_New’
294526 |   __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_PETSc_pyx, __pyx_n_s_initialize, 427, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(11, 427, __pyx_L1_error)
       |                                   ^~~~~~~~~~~~~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: declared here
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:294535:91: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
294535 |   __pyx_codeobj__122 = (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_PETSc_PETSc_pyx, __pyx_n_s_finalize, 443, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(11, 443, __pyx_L1_error)
       |                                                                                           ^~~~~~~~~~~~~~~~~
       |                                                                                           |
       |                                                                                           PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:37: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                     ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:294535:253: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
294535 |   __pyx_codeobj__122 = (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_PETSc_PETSc_pyx, __pyx_n_s_finalize, 443, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(11, 443, __pyx_L1_error)
       |                                                                                                                                                                                                                                                             ^~~
       |                                                                                                                                                                                                                                                             |
       |                                                                                                                                                                                                                                                             int
src/petsc4py.PETSc.c:314:72: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                        ^~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:294535:258: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
294535 |   __pyx_codeobj__122 = (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_PETSc_PETSc_pyx, __pyx_n_s_finalize, 443, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(11, 443, __pyx_L1_error)
       |                                                                                                                                                                                                                                                                  ^~~~~~~~~~~~~~~~~
       |                                                                                                                                                                                                                                                                  |
       |                                                                                                                                                                                                                                                                  PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:79: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                               ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:314:11: error: too few arguments to function ‘PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |           ^~~~~~~~~~
src/petsc4py.PETSc.c:294535:35: note: in expansion of macro ‘__Pyx_PyCode_New’
294535 |   __pyx_codeobj__122 = (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_PETSc_PETSc_pyx, __pyx_n_s_finalize, 443, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(11, 443, __pyx_L1_error)
       |                                   ^~~~~~~~~~~~~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: declared here
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:294600:91: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
294600 |   __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(50, 1, __pyx_L1_error)
       |                                                                                           ^~~~~~~~~~~~~~~~~
       |                                                                                           |
       |                                                                                           PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:37: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                     ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:294600:258: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
294600 |   __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(50, 1, __pyx_L1_error)
       |                                                                                                                                                                                                                                                                  ^
       |                                                                                                                                                                                                                                                                  |
       |                                                                                                                                                                                                                                                                  int
src/petsc4py.PETSc.c:314:72: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                        ^~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:294600:261: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
294600 |   __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(50, 1, __pyx_L1_error)
       |                                                                                                                                                                                                                                                                     ^~~~~~~~~~~~~~~~~
       |                                                                                                                                                                                                                                                                     |
       |                                                                                                                                                                                                                                                                     PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:79: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                               ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:314:11: error: too few arguments to function ‘PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |           ^~~~~~~~~~
src/petsc4py.PETSc.c:294600:35: note: in expansion of macro ‘__Pyx_PyCode_New’
294600 |   __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(50, 1, __pyx_L1_error)
       |                                   ^~~~~~~~~~~~~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: declared here
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c: In function ‘__Pyx_CreateCodeObjectForTraceback’:
src/petsc4py.PETSc.c:311785:9: warning: passing argument 6 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
311785 |         __pyx_empty_bytes, /*PyObject *code,*/
       |         ^~~~~~~~~~~~~~~~~
       |         |
       |         PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:37: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                     ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:311793:9: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
311793 |         py_line,
       |         ^~~~~~~
       |         |
       |         int
src/petsc4py.PETSc.c:314:72: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                        ^~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:311794:9: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
311794 |         __pyx_empty_bytes  /*PyObject *lnotab*/
       |         ^~~~~~~~~~~~~~~~~
       |         |
       |         PyObject * {aka struct _object *}
src/petsc4py.PETSc.c:314:79: note: in definition of macro ‘__Pyx_PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                               ^~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/PETSc.c:4:
src/petsc4py.PETSc.c:314:11: error: too few arguments to function ‘PyCode_New’
  314 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |           ^~~~~~~~~~
src/petsc4py.PETSc.c:311779:15: note: in expansion of macro ‘__Pyx_PyCode_New’
311779 |     py_code = __Pyx_PyCode_New(
       |               ^~~~~~~~~~~~~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from src/petsc4py.PETSc.c:4,
                 from src/PETSc.c:4:
/usr/include/python3.8/code.h:105:28: note: declared here
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
/builddir/build/BUILD/petsc4py-3.11.0/petsc4py-openmpi/conf/baseconf.py:61: SyntaxWarning: invalid escape sequence \s
  flag, count = re.subn(&#39;-arch\s+\w+&#39;, &#39; &#39;, flag)
/builddir/build/BUILD/petsc4py-3.11.0/petsc4py-openmpi/conf/baseconf.py:711: SyntaxWarning: invalid escape sequence \s
  _variable_rx = _re.compile(&#34;([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)&#34;)
error: command &#39;mpicc&#39; failed with exit status 1

Comments (3)

  1. Lisandro Dalcin

    Try applying this patch 3fdca5e to the tarball sources. Also, you need to regenerate the C sources with most recent Cython, quick way (after you have Cython installed or in build-requires in rpm spec file) is to run python 3.8 conf/cythonize.py. Or just rm -f src/petsc4py.PETSc.c before building, setup.py will take care of running Cython.

  2. sagitter reporter

    Your patch works:

     /usr/bin/python3 conf/cythonize.py
    /usr/lib64/python3.8/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: include/petsc4py/PETSc.pxd
      tree = Parsing.p_module(s, pxd, full_module_name)
    /usr/lib64/python3.8/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /builddir/build/BUILD/petsc4py-3.11.0/petsc4py-openmpi/src/libpetsc4py/libpetsc4py.pyx
      tree = Parsing.p_module(s, pxd, full_module_name)
    

    Build log: https://copr-be.cloud.fedoraproject.org/results/sagitter/python3.8/fedora-rawhide-x86_64/00914901-petsc4py/builder-live.log

  3. Log in to comment