dankamongmen / notcurses

blingful character graphics/TUI library. definitely not curses.
https://nick-black.com/dankwiki/index.php/Notcurses
Other
3.61k stars 113 forks source link

python bindings build fails #2792

Open dmig opened 1 month ago

dmig commented 1 month ago
COLORTERM truecolor
GDM_LANG en_IE.UTF-8
LANG en_IE.UTF-8
TERM xterm-kitty
TERMINFO /usr/lib/kitty/terminfo

notcurses version git master f21c3be

Trying to build python bindings from the latest source. It seems, generated code is not preprocessed?

> python setup.py build
warning: pypandoc module not found, won't generate man pages
/usr/lib/python3.12/site-packages/setuptools/__init__.py:81: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
running build
running build_py
copying src/notcurses/__init__.py -> build/lib.linux-x86_64-cpython-312/notcurses
copying src/notcurses/build_notcurses.py -> build/lib.linux-x86_64-cpython-312/notcurses
copying src/notcurses/notcurses.py -> build/lib.linux-x86_64-cpython-312/notcurses
running egg_info
writing src/notcurses.egg-info/PKG-INFO
writing dependency_links to src/notcurses.egg-info/dependency_links.txt
writing requirements to src/notcurses.egg-info/requires.txt
writing top-level names to src/notcurses.egg-info/top_level.txt
reading manifest file 'src/notcurses.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.txt'
writing manifest file 'src/notcurses.egg-info/SOURCES.txt'
running build_ext
generating cffi module 'build/temp.linux-x86_64-cpython-312/_notcurses.c'
building '_notcurses' extension
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -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=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -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=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -I/usr/include/python3.12 -c build/temp.linux-x86_64-cpython-312/_notcurses.c -o build/temp.linux-x86_64-cpython-312/build/temp.linux-x86_64-cpython-312/_notcurses.o
build/temp.linux-x86_64-cpython-312/_notcurses.c: In function ‘_cffi_const_NCINPUT_MAX_EFF_TEXT_CODEPOINTS’:
build/temp.linux-x86_64-cpython-312/_notcurses.c:33222:12: error: ‘NCINPUT_MAX_EFF_TEXT_CODEPOINTS’ undeclared (first use in this function); did you mean ‘_cffi_const_NCINPUT_MAX_EFF_TEXT_CODEPOINTS’?
33222 |   int n = (NCINPUT_MAX_EFF_TEXT_CODEPOINTS) <= 0;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |            _cffi_const_NCINPUT_MAX_EFF_TEXT_CODEPOINTS
build/temp.linux-x86_64-cpython-312/_notcurses.c:33222:12: note: each undeclared identifier is reported only once for each function it appears in
build/temp.linux-x86_64-cpython-312/_notcurses.c: In function ‘_cffi_checkfld__ncinput’:
build/temp.linux-x86_64-cpython-312/_notcurses.c:34925:27: error: ‘ncinput’ has no member named ‘eff_text’
34925 |   { uint32_t(*tmp)[4] = &p->eff_text; (void)tmp; }
      |                           ^~
In file included from /usr/include/bits/socket.h:27,
                 from /usr/include/sys/socket.h:33,
                 from /usr/include/netinet/in.h:23,
                 from /usr/include/notcurses/ncport.h:14,
                 from /usr/include/notcurses/notcurses.h:15,
                 from /usr/include/notcurses/direct.h:4,
                 from build/temp.linux-x86_64-cpython-312/_notcurses.c:570:
build/temp.linux-x86_64-cpython-312/_notcurses.c: At top level:
build/temp.linux-x86_64-cpython-312/_notcurses.c:36225:17: error: ‘ncinput’ has no member named ‘eff_text’
36225 |   { "eff_text", offsetof(ncinput, eff_text),
      |                 ^~~~~~~~
build/temp.linux-x86_64-cpython-312/_notcurses.c:36226:38: error: ‘ncinput’ has no member named ‘eff_text’
36226 |                 sizeof(((ncinput *)0)->eff_text),
      |                                      ^~
error: command '/usr/bin/gcc' failed with exit code 1