You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: Ubuntu 22.04
OS architecture: amd64
Pyenv version: 2.3.36
Python version: 3.10.x
C Compiler information: gcc 11.4.0
I'm installing python 3.10.x (I've tried 3.10.12 and 3.10.14) on a more or less fresh Ubuntu 22 machine. Initially I hit the expected dependency errors detailed here, and installing the listed packages got around all but one of the errors.
The problem is that _curses fails to build, and so the installation eventually throws an error when trying to import it. I've attached the build logs and debug output.
Some relevant snippets:
Checking to make sure libncurses packages are installed (I initially tried the recommended libncursesw5 before trying the libncurses5 fallback):
❯ sudo apt-get install libncurses5 libncurses5-dev libncursesw5 libncursesw5-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libncurses5-dev is already the newest version (6.3-2ubuntu0.1).
libncursesw5-dev is already the newest version (6.3-2ubuntu0.1).
libncurses5 is already the newest version (6.3-2ubuntu0.1).
libncursesw5 is already the newest version (6.3-2ubuntu0.1).
From the build debug output:
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
building '_curses' extension
Errors thrown during installation when attempting to build _curses:
building '_curses' extension
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I/home/sboynton/.pyenv/versions/3.10.14/include -fPIC -DHAVE_NCURSESW=1 -I/usr/include/ncursesw -I./Include -I. -I/home/sboynton/.pyenv/versions/3.10.14/include -I/usr/include/x86_64-linux-gnu -I/usr/local/include -I/tmp/python-build.20240322105256.549130/Python-3.10.14/Include -I/tmp/python-build.20240322105256.549130/Python-3.10.14 -c /tmp/python-build.20240322105256.549130/Python-3.10.14/Modules/_cursesmodule.c -o build/temp.linux-x86_64-3.10/tmp/python-build.20240322105256.549130/Python-3.10.14/Modules/_cursesmodule.o -DPy_BUILD_CORE_MODULE
/tmp/python-build.20240322105256.549130/Python-3.10.14/Modules/_cursesmodule.c: In function ‘_curses_window_addch_impl’:
/tmp/python-build.20240322105256.549130/Python-3.10.14/Modules/_cursesmodule.c:760:9: error: implicit declaration of function ‘setcchar’; did you mean ‘getwchar’? [-Werror=implicit-function-declaration]
/tmp/python-build.20240322105256.549130/Python-3.10.14/Modules/_cursesmodule.c:762:19: error: implicit declaration of function ‘mvwadd_wch’; did you mean ‘mvwaddch’? [-Werror=implicit-function-declaration]
/tmp/python-build.20240322105256.549130/Python-3.10.14/Modules/_cursesmodule.c:764:19: error: implicit declaration of function ‘wadd_wch’; did you mean ‘waddch’? [-Werror=implicit-function-declaration]
/tmp/python-build.20240322105256.549130/Python-3.10.14/Modules/_cursesmodule.c: In function ‘_curses_window_addstr_impl’:
I appreciate any and all support. Apologies if this has been addressed somewhere else already, I searched up and down and couldn't find anything that quite matched this issue.
Googling says this error happens due to a lack of NCURSES_WIDECHAR macro, and is usually caused by a wrong include path. Seems like you have some leftovers from a non-unicode version of ncurses on your system, probably built from source.
Ah, yup, your last comment pointed me in the right direction. I have a system provisioning script that, among other things, was building ncurses separately as a tmux dependency (not sure why I was doing this, works fine with the apt packages). I removed that and ~/.pyenv, reinstalled pyenv, and reinstalled 3.10.14 and the issue is resolved. Thanks!
native-api
changed the title
_curses fails to build on Ubuntu 22_curses fails to build on Ubuntu 22: "error: implicit declaration of function ‘setcchar’; did you mean ‘getwchar’?"
Mar 30, 2024
Platform:
Ubuntu 22.04
OS architecture:
amd64
Pyenv version:
2.3.36
Python version:
3.10.x
C Compiler information:
gcc 11.4.0
I'm installing python 3.10.x (I've tried 3.10.12 and 3.10.14) on a more or less fresh Ubuntu 22 machine. Initially I hit the expected dependency errors detailed here, and installing the listed packages got around all but one of the errors.
The problem is that
_curses
fails to build, and so the installation eventually throws an error when trying to import it. I've attached the build logs and debug output.Some relevant snippets:
Checking to make sure
libncurses
packages are installed (I initially tried the recommendedlibncursesw5
before trying thelibncurses5
fallback):From the build debug output:
Errors thrown during installation when attempting to build
_curses
:I appreciate any and all support. Apologies if this has been addressed somewhere else already, I searched up and down and couldn't find anything that quite matched this issue.
trace.log
python-build.20240322105256.549130.log
The text was updated successfully, but these errors were encountered: