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

Does not build under Python 3.9 #105

Closed
slhck opened this issue Jun 23, 2021 · 9 comments
Closed

Does not build under Python 3.9 #105

slhck opened this issue Jun 23, 2021 · 9 comments

Comments

@slhck
Copy link

slhck commented Jun 23, 2021

I cannot install this under Ubuntu 20.04 with Python 3.9.5 and GCC 10.

Full log:

➜ pip3 install pypcap
Collecting pypcap
  Using cached pypcap-1.2.3.tar.gz (136 kB)
Using legacy 'setup.py install' for pypcap, since package 'wheel' is not installed.
Installing collected packages: pypcap
    Running setup.py install for pypcap ... error
    ERROR: Command errored out with exit status 1:
     command: /home/werner/.pyenv/versions/3.9.5/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-exianpev/pypcap_321f6c32eb6949a9a23735b976d9b5ae/setup.py'"'"'; __file__='"'"'/tmp/pip-install-exianpev/pypcap_321f6c32eb6949a9a23735b976d9b5ae/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vy2e98f7/install-record.txt --single-version-externally-managed --compile --install-headers /home/werner/.pyenv/versions/3.9.5/include/python3.9/pypcap
         cwd: /tmp/pip-install-exianpev/pypcap_321f6c32eb6949a9a23735b976d9b5ae/
    Complete output (166 lines):
    Found pcap headers in /usr/include/pcap.h
    Found libraries in /usr/lib/x86_64-linux-gnu/libpcap.a
    found pcap_get_tstamp_precision function
    found pcap_setdirection
    found pcap_setnonblock
    found pcap_compile_nopcap function
    /home/werner/.pyenv/versions/3.9.5/lib/python3.9/site-packages/setuptools/dist.py:642: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
      warnings.warn(
    running install
    running build
    running build_ext
    building 'pcap' extension
    creating build
    creating build/temp.linux-x86_64-3.9
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DHAVE_PCAP_TSTAMP_PRECISION=1 -DHAVE_PCAP_SETDIRECTION=1 -DHAVE_PCAP_SETNONBLOCK=1 -DHAVE_PCAP_COMPILE_NOPCAP=1 -I/usr/include -I/home/werner/.pyenv/versions/3.9.5/include/python3.9 -c pcap.c -o build/temp.linux-x86_64-3.9/pcap.o
    pcap.c: In function ‘__pyx_pf_4pcap_3bpf_2filter’:
    pcap.c:3065:3: warning: ‘PyObject_AsCharBuffer’ is deprecated [-Wdeprecated-declarations]
     3065 |   __pyx_t_1 = ((PyObject_AsCharBuffer(__pyx_v_buf, ((char const **)(&__pyx_v_p)), (&__pyx_v_n)) < 0) != 0);
          |   ^~~~~~~~~
    In file included from /home/werner/.pyenv/versions/3.9.5/include/python3.9/Python.h:151,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.5/include/python3.9/abstract.h:326:17: note: declared here
      326 | PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj,
          |                 ^~~~~~~~~~~~~~~~~~~~~
    pcap.c: In function ‘__Pyx_modinit_type_init_code’:
    pcap.c:22411:36: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    22411 |   __pyx_type_4pcap_pcap_handler_ctx.tp_print = 0;
          |                                    ^
    pcap.c:22419:23: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    22419 |   __pyx_type_4pcap_bpf.tp_print = 0;
          |                       ^
    pcap.c:22427:24: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    22427 |   __pyx_type_4pcap_pcap.tp_print = 0;
          |                        ^
    pcap.c:22437:25: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    22437 |   __pyx_type___pyx_array.tp_print = 0;
          |                         ^
    pcap.c:22442:31: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    22442 |   __pyx_type___pyx_MemviewEnum.tp_print = 0;
          |                               ^
    pcap.c:22457:30: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    22457 |   __pyx_type___pyx_memoryview.tp_print = 0;
          |                              ^
    pcap.c:22470:35: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    22470 |   __pyx_type___pyx_memoryviewslice.tp_print = 0;
          |                                   ^
    pcap.c: In function ‘__Pyx_ParseOptionalKeywords’:
    pcap.c:24116:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24116 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /home/werner/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c:24116:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
    24116 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /home/werner/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
      580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
          |                                             ^~~~~~~~~~~~~~~~~~~
    pcap.c:24116:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24116 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /home/werner/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c:24116:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24116 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /home/werner/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c:24116:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
    24116 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /home/werner/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
      580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
          |                                             ^~~~~~~~~~~~~~~~~~~
    pcap.c:24116:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24116 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /home/werner/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c:24132:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24132 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /home/werner/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c:24132:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
    24132 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /home/werner/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
      580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
          |                                             ^~~~~~~~~~~~~~~~~~~
    pcap.c:24132:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24132 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /home/werner/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c:24132:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24132 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /home/werner/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c:24132:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
    24132 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /home/werner/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
      580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
          |                                             ^~~~~~~~~~~~~~~~~~~
    pcap.c:24132:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24132 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /home/werner/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c: In function ‘__Pyx_decode_c_string’:
    pcap.c:25062:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
    25062 |         return PyUnicode_FromUnicode(NULL, 0);
          |         ^~~~~~
    In file included from /home/werner/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here
      551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
          |                                          ^~~~~~~~~~~~~~~~~~~~~
    error: command '/usr/bin/gcc' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/werner/.pyenv/versions/3.9.5/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-exianpev/pypcap_321f6c32eb6949a9a23735b976d9b5ae/setup.py'"'"'; __file__='"'"'/tmp/pip-install-exianpev/pypcap_321f6c32eb6949a9a23735b976d9b5ae/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vy2e98f7/install-record.txt --single-version-externally-managed --compile --install-headers /home/werner/.pyenv/versions/3.9.5/include/python3.9/pypcap Check the logs for full command output.

GCC:

➜ gcc --version
gcc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@slhck
Copy link
Author

slhck commented Jun 23, 2021

Seems to be related to implementation of PEP 590.

This tp_print function should probably not have been used since Python 3.x.

@TinkeringEngr
Copy link

Same issue for M1 MacOS Big Sur :(

Any chance this will ever be fixed?

@dcgrigsby
Copy link

I was able to build the extension from source on Windows, though there shouldn't be anything Windows specific about this, by regenerating the pcap.c file with cython. From the the source directory, run "cython pcap.pyx" and then "python setup.py install" and it should work.

Because the extension generates its C code using Cython, this will re-generate the C code. Using a newer version of Cython will generate C code that does not include tp_print. It should then build.

@gvashishtha
Copy link

Confirmed that @dcgrigsby 's fix works on Mac OS Big Sur 11.6.1

In a fresh conda environment:

# clone this GitHub repo
pip3 install Cython
cd pypcap
cython pcap.pyx
python3 setup.py install

@ruokid
Copy link

ruokid commented Jun 1, 2022

@dcgrigsby @gvashishtha , it works for me

@slhck
Copy link
Author

slhck commented Sep 5, 2022

Should be closed by #102

@slhck slhck closed this as completed Sep 5, 2022
@slhck
Copy link
Author

slhck commented Sep 5, 2022

Actually I am still getting a build error with Git master under Python 3.9.7, when installing from source:

  Running command git clone -q https://github.com/pynetwork/pypcap.git /tmp/pip-req-build-9uto4ga0
  ERROR: Command errored out with exit status 1:
   command: /home/werner/.pyenv/versions/3.9.7/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-9uto4ga0/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-9uto4ga0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-q7sfdn98
       cwd: /tmp/pip-req-build-9uto4ga0/
  Complete output (166 lines):
  Found pcap headers in /usr/include/pcap.h
  Found libraries in /usr/local/lib/libpcap.a
  found pcap_get_tstamp_precision function
  found pcap_setdirection
  found pcap_setnonblock
  found pcap_compile_nopcap function
  /home/werner/.pyenv/versions/3.9.7/lib/python3.9/site-packages/setuptools/dist.py:697: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
    warnings.warn(
  running bdist_wheel
  running build
  running build_ext
  building 'pcap' extension
  creating build
  creating build/temp.linux-x86_64-3.9
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DHAVE_PCAP_TSTAMP_PRECISION=1 -DHAVE_PCAP_SETDIRECTION=1 -DHAVE_PCAP_SETNONBLOCK=1 -DHAVE_PCAP_COMPILE_NOPCAP=1 -I/usr/include -I/home/werner/.pyenv/versions/3.9.7/include/python3.9 -c pcap.c -o build/temp.linux-x86_64-3.9/pcap.o
  pcap.c: In function ‘__pyx_pf_4pcap_3bpf_2filter’:
  pcap.c:3069:3: warning: ‘PyObject_AsCharBuffer’ is deprecated [-Wdeprecated-declarations]
   3069 |   __pyx_t_1 = ((PyObject_AsCharBuffer(__pyx_v_buf, ((char const **)(&__pyx_v_p)), (&__pyx_v_n)) < 0) != 0);
        |   ^~~~~~~~~
  In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:160,
                   from pcap.c:4:
  /home/werner/.pyenv/versions/3.9.7/include/python3.9/abstract.h:326:17: note: declared here
    326 | PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj,
        |                 ^~~~~~~~~~~~~~~~~~~~~
  pcap.c: In function ‘__Pyx_modinit_type_init_code’:
  pcap.c:22445:36: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  22445 |   __pyx_type_4pcap_pcap_handler_ctx.tp_print = 0;
        |                                    ^
  pcap.c:22453:23: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  22453 |   __pyx_type_4pcap_bpf.tp_print = 0;
        |                       ^
  pcap.c:22461:24: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  22461 |   __pyx_type_4pcap_pcap.tp_print = 0;
        |                        ^
  pcap.c:22471:25: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  22471 |   __pyx_type___pyx_array.tp_print = 0;
        |                         ^
  pcap.c:22476:31: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  22476 |   __pyx_type___pyx_MemviewEnum.tp_print = 0;
        |                               ^
  pcap.c:22491:30: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  22491 |   __pyx_type___pyx_memoryview.tp_print = 0;
        |                              ^
  pcap.c:22504:35: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  22504 |   __pyx_type___pyx_memoryviewslice.tp_print = 0;
        |                                   ^
  pcap.c: In function ‘__Pyx_ParseOptionalKeywords’:
  pcap.c:24150:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  24150 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                   from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                   from pcap.c:4:
  /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pcap.c:24150:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  24150 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                   from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                   from pcap.c:4:
  /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  pcap.c:24150:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  24150 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                   from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                   from pcap.c:4:
  /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pcap.c:24150:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  24150 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                   from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                   from pcap.c:4:
  /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pcap.c:24150:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  24150 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                   from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                   from pcap.c:4:
  /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  pcap.c:24150:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  24150 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                   from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                   from pcap.c:4:
  /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pcap.c:24166:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  24166 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                   from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                   from pcap.c:4:
  /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pcap.c:24166:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  24166 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                   from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                   from pcap.c:4:
  /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  pcap.c:24166:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  24166 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                   from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                   from pcap.c:4:
  /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pcap.c:24166:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  24166 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                   from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                   from pcap.c:4:
  /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pcap.c:24166:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  24166 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                   from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                   from pcap.c:4:
  /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  pcap.c:24166:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  24166 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                   from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                   from pcap.c:4:
  /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pcap.c: In function ‘__Pyx_decode_c_string’:
  pcap.c:25096:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
  25096 |         return PyUnicode_FromUnicode(NULL, 0);
        |         ^~~~~~
  In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                   from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                   from pcap.c:4:
  /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here
    551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
        |                                          ^~~~~~~~~~~~~~~~~~~~~
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for pypcap
    ERROR: Command errored out with exit status 1:
     command: /home/werner/.pyenv/versions/3.9.7/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-9uto4ga0/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-9uto4ga0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-3nsbojqs/install-record.txt --single-version-externally-managed --compile --install-headers /home/werner/.pyenv/versions/3.9.7/include/python3.9/pypcap
         cwd: /tmp/pip-req-build-9uto4ga0/
    Complete output (166 lines):
    Found pcap headers in /usr/include/pcap.h
    Found libraries in /usr/local/lib/libpcap.a
    found pcap_get_tstamp_precision function
    found pcap_setdirection
    found pcap_setnonblock
    found pcap_compile_nopcap function
    /home/werner/.pyenv/versions/3.9.7/lib/python3.9/site-packages/setuptools/dist.py:697: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
      warnings.warn(
    running install
    running build
    running build_ext
    building 'pcap' extension
    creating build
    creating build/temp.linux-x86_64-3.9
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DHAVE_PCAP_TSTAMP_PRECISION=1 -DHAVE_PCAP_SETDIRECTION=1 -DHAVE_PCAP_SETNONBLOCK=1 -DHAVE_PCAP_COMPILE_NOPCAP=1 -I/usr/include -I/home/werner/.pyenv/versions/3.9.7/include/python3.9 -c pcap.c -o build/temp.linux-x86_64-3.9/pcap.o
    pcap.c: In function ‘__pyx_pf_4pcap_3bpf_2filter’:
    pcap.c:3069:3: warning: ‘PyObject_AsCharBuffer’ is deprecated [-Wdeprecated-declarations]
     3069 |   __pyx_t_1 = ((PyObject_AsCharBuffer(__pyx_v_buf, ((char const **)(&__pyx_v_p)), (&__pyx_v_n)) < 0) != 0);
          |   ^~~~~~~~~
    In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:160,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.7/include/python3.9/abstract.h:326:17: note: declared here
      326 | PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj,
          |                 ^~~~~~~~~~~~~~~~~~~~~
    pcap.c: In function ‘__Pyx_modinit_type_init_code’:
    pcap.c:22445:36: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    22445 |   __pyx_type_4pcap_pcap_handler_ctx.tp_print = 0;
          |                                    ^
    pcap.c:22453:23: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    22453 |   __pyx_type_4pcap_bpf.tp_print = 0;
          |                       ^
    pcap.c:22461:24: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    22461 |   __pyx_type_4pcap_pcap.tp_print = 0;
          |                        ^
    pcap.c:22471:25: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    22471 |   __pyx_type___pyx_array.tp_print = 0;
          |                         ^
    pcap.c:22476:31: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    22476 |   __pyx_type___pyx_MemviewEnum.tp_print = 0;
          |                               ^
    pcap.c:22491:30: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    22491 |   __pyx_type___pyx_memoryview.tp_print = 0;
          |                              ^
    pcap.c:22504:35: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    22504 |   __pyx_type___pyx_memoryviewslice.tp_print = 0;
          |                                   ^
    pcap.c: In function ‘__Pyx_ParseOptionalKeywords’:
    pcap.c:24150:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24150 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c:24150:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
    24150 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
      580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
          |                                             ^~~~~~~~~~~~~~~~~~~
    pcap.c:24150:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24150 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c:24150:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24150 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c:24150:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
    24150 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
      580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
          |                                             ^~~~~~~~~~~~~~~~~~~
    pcap.c:24150:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24150 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c:24166:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24166 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c:24166:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
    24166 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
      580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
          |                                             ^~~~~~~~~~~~~~~~~~~
    pcap.c:24166:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24166 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c:24166:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24166 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c:24166:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
    24166 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
      580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
          |                                             ^~~~~~~~~~~~~~~~~~~
    pcap.c:24166:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    24166 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pcap.c: In function ‘__Pyx_decode_c_string’:
    pcap.c:25096:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
    25096 |         return PyUnicode_FromUnicode(NULL, 0);
          |         ^~~~~~
    In file included from /home/werner/.pyenv/versions/3.9.7/include/python3.9/unicodeobject.h:1026,
                     from /home/werner/.pyenv/versions/3.9.7/include/python3.9/Python.h:106,
                     from pcap.c:4:
    /home/werner/.pyenv/versions/3.9.7/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here
      551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
          |                                          ^~~~~~~~~~~~~~~~~~~~~
    error: command '/usr/bin/gcc' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/werner/.pyenv/versions/3.9.7/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-9uto4ga0/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-9uto4ga0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-3nsbojqs/install-record.txt --single-version-externally-managed --compile --install-headers /home/werner/.pyenv/versions/3.9.7/include/python3.9/pypcap Check the logs for full command output.
WARNING: You are using pip version 21.2.3; however, version 22.2.2 is available.
You should consider upgrading via the '/home/werner/.pyenv/versions/3.9.7/bin/python3.9 -m pip install --upgrade pip' command.

@hellais – any idea?

This is specifying git+https://github.com/pynetwork/pypcap.git as a requirement for pip install.

➜ /usr/bin/gcc --version
gcc (Ubuntu 11.1.0-1ubuntu1~20.04) 11.1.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@slhck slhck reopened this Sep 5, 2022
@slhck slhck changed the title Does not build under Python 3.9.5 Does not build under Python 3.9 Sep 5, 2022
@hellais
Copy link
Member

hellais commented Sep 12, 2022

I just merged the fix into master and release 1.3.0 which includes the fixes for it.

Feel free to re-open the issue if the problem is still there.

Thanks for testing this!

@hellais hellais closed this as completed Sep 12, 2022
@slhck
Copy link
Author

slhck commented Sep 12, 2022

I still cannot install due to #104 — but these immediate errors seem to indeed have been fixed!

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