Код: Выделить всё
~/custom/gcc-14.2/lib/Следуя документации по конфигурации, я определяю CURSES_LIBS
Код: Выделить всё
# I use a custom compiler:
export CC=gcc-14.2 CXX=g++-14.2
# PWD is Python3.13.0
# I compile in a subfolder:
mkdir build && cd build
CURSES_LIBS="-L$HOME/custom/gcc-14.2" ../configure \
--prefix=$HOME/custom/gcc-14.2 \
--enable-loadable-sqlite-extensions \
--enable-optimizations --with-lto \
--with-platlibdir=lib64 \
--with-ensurepip=install \
--enable-shared
Код: Выделить всё
checking for ncursesw... no
checking for ncurses... no
checking for ncursesw/curses.h... no
checking for ncursesw/ncurses.h... no
checking for ncursesw/panel.h... no
checking for ncurses/curses.h... no
checking for ncurses/ncurses.h... no
checking for ncurses/panel.h... no
checking for curses.h... no
checking for ncurses.h... no
Код: Выделить всё
[...]
gcc-14.2 -pthread -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fno-semantic-interposition -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -std=c11 -Wext
ra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-generate -I../Include/internal -I../Include/i
nternal/mimalloc -IObjects -IInclude -IPython -I. -I../Include -fPIC -fPIC -c ../Modules/_cursesmodule.c -o Modules/_cursesmodule.o
In file included from ../Modules/_cursesmodule.c:116:
../Include/py_curses.h:80:5: error: unknown type name ‘WINDOW’
80 | WINDOW *win;
| ^~~~~~
../Modules/_cursesmodule.c:173:36: error: ‘FALSE’ undeclared here (not in a function)
173 | static int initialised_setupterm = FALSE;
| ^~~~~
../Modules/_cursesmodule.c: In function ‘PyCursesCheckERR’:
../Modules/_cursesmodule.c:213:17: error: ‘ERR’ undeclared (first use in this function); did you mean ‘ERA’?
213 | if (code != ERR) {
| ^~~
| ERA
[...]
../Modules/_cursesmodule.c: In function ‘_curses_start_color_impl’:
../Modules/_cursesmodule.c:4228:1: warning: control reaches end of non-void function [-Wreturn-type]
4228 | }
| ^
../Modules/_cursesmodule.c: In function ‘_curses_meta_impl’:
../Modules/_cursesmodule.c:3624:1: warning: control reaches end of non-void function [-Wreturn-type]
3624 | }
| ^
make[2]: *** [Modules/_cursesmodule.o] Erreur 1
make[1]: *** [profile-gen-stamp] Erreur 2
make: *** [profile-run-stamp] Erreur 2
Код: Выделить всё
$ ~/custom/gcc-14.2/bin/python3.13 -c 'print("Hello")'
Код: Выделить всё
Could not find platform independent libraries
Could not find platform dependent libraries
Fatal Python error: Failed to import encodings module
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fd963713780 (most recent call first):
Подробнее здесь: https://stackoverflow.com/questions/792 ... brary-path
Мобильная версия