crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 274 forks source link

CI: build issue of vmprof on py 3.10 #1949

Closed oberstet closed 2 years ago

oberstet commented 2 years ago
(cpy310_4) (base) oberstet@intel-nuci7:~$ python -V
Python 3.10.0
(cpy310_4) (base) oberstet@intel-nuci7:~$ pip install vmprof
...
      gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/oberstet/cpy310_4/include -I/home/oberstet/cpy310/include/python3.10 -c src/vmp_stack.c -o build/temp.linux-x86_64-3.10/src/vmp_stack.o -Wno-unused -DVMPROF_LINUX=1 -DVMPROF_UNIX=1 -I src/ -I src/libbacktrace
      In file included from /home/oberstet/cpy310/include/python3.10/bytesobject.h:62,
                       from /home/oberstet/cpy310/include/python3.10/Python.h:95,
                       from src/vmprof.h:6,
                       from src/vmp_stack.h:3,
                       from src/vmp_stack.c:1:
      src/vmp_stack.c: In function ‘_write_python_stack_entry’:
      src/vmp_stack.c:102:47: error: ‘PyCodeObject’ {aka ‘struct PyCodeObject’} has no member named ‘co_lnotab’
        102 |         lnotab = PyStr_AS_STRING(frame->f_code->co_lnotab);
            |                                               ^~
      /home/oberstet/cpy310/include/python3.10/cpython/bytesobject.h:33:53: note: in definition of macro ‘PyBytes_AS_STRING’
         33 |                                 (((PyBytesObject *)(op))->ob_sval))
            |                                                     ^~
      src/vmp_stack.c:102:18: note: in expansion of macro ‘PyStr_AS_STRING’
        102 |         lnotab = PyStr_AS_STRING(frame->f_code->co_lnotab);
            |                  ^~~~~~~~~~~~~~~
      In file included from /home/oberstet/cpy310/include/python3.10/Python.h:87,
                       from src/vmprof.h:6,
                       from src/vmp_stack.h:3,
                       from src/vmp_stack.c:1:
      src/vmp_stack.c:108:52: error: ‘PyCodeObject’ {aka ‘struct PyCodeObject’} has no member named ‘co_lnotab’
        108 |             len = (int)PyStr_GET_SIZE(frame->f_code->co_lnotab);
            |                                                    ^~
      /home/oberstet/cpy310/include/python3.10/object.h:121:47: note: in definition of macro ‘_PyVarObject_CAST’
        121 | #define _PyVarObject_CAST(op) ((PyVarObject*)(op))
            |                                               ^~
      /home/oberstet/cpy310/include/python3.10/cpython/bytesobject.h:34:58: note: in expansion of macro ‘Py_SIZE’
         34 | #define PyBytes_GET_SIZE(op)  (assert(PyBytes_Check(op)),Py_SIZE(op))
            |                                                          ^~~~~~~
      src/compat.h:8:30: note: in expansion of macro ‘PyBytes_GET_SIZE’
          8 |       #define PyStr_GET_SIZE PyBytes_GET_SIZE
            |                              ^~~~~~~~~~~~~~~~
      src/vmp_stack.c:108:24: note: in expansion of macro ‘PyStr_GET_SIZE’
        108 |             len = (int)PyStr_GET_SIZE(frame->f_code->co_lnotab);
            |                        ^~~~~~~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> vmprof

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
om26er commented 2 years ago

The solution for this one is to build vmprof from source, until the upstream decides to release a new version (unlikely, given the project seems stale)

oberstet commented 2 years ago

duplicate of https://github.com/crossbario/crossbar/issues/1896