rgerganov / ggtag

programmable e-paper tag with RFID
https://ggtag.io/
GNU General Public License v3.0
290 stars 24 forks source link

python examples: "Failed building wheel for ggwave" #29

Open franalbani opened 2 months ago

franalbani commented 2 months ago

Doing venv/bin/pip install -r requirements.txt:

Building wheels for collected packages: ggwave
  Building wheel for ggwave (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for ggwave (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [464 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'ggwave' extension
      creating build
      creating build/temp.linux-x86_64-cpython-312
      creating build/temp.linux-x86_64-cpython-312/ggwave
      creating build/temp.linux-x86_64-cpython-312/ggwave/src
      gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -Iggwave/include -Iggwave/include/ggwave -I/home/fran/src/ggtag/venv/include -I/usr/include/python3.12 -c ggwave.bycython.cpp -o build/temp.linux-x86_64-cpython-312/ggwave.bycython.o -O3 -std=c++11
      ggwave.bycython.cpp: In function ‘PyObject* __pyx_pf_6ggwave_2init(PyObject*, PyObject*)’:
      ggwave.bycython.cpp:1006:65: warning: ‘PyDictObject::ma_version_tag’ is deprecated [-Wdeprecated-declarations]
       1006 | #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
            |                                                                 ^~~~~~~~~~~~~~
      ggwave.bycython.cpp:889:43: note: in definition of macro ‘likely’

[... similar output suppressed...] 

      ggwave.bycython.cpp:6806:55: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
       6806 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
            |                                                       ^~~~~~~~
      ggwave.bycython.cpp: In function ‘Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*)’:
      ggwave.bycython.cpp:7235:47: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
       7235 |     const digit* digits = ((PyLongObject*)b)->ob_digit;
            |                                               ^~~~~~~~
      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: Failed building wheel for ggwave
Failed to build ggwave
ERROR: Could not build wheels for ggwave, which is required to install pyproject.toml-based projects
rgerganov commented 2 months ago

You need to install Python development headers. On Ubuntu this is done with apt install python3-dev

franalbani commented 2 months ago

You need to install Python development headers. On Ubuntu this is done with apt install python3-dev

In Arch linux the headers are included in the python package, which I already had.