OpenWrt 25 python3/host build failure on OpenSUSE 15.6

Jan Kardell jan.kardell at telliq.com
Wed May 27 04:44:47 PDT 2026


Hi,

The modules _curses.cpython-313-x86_64-linux-gnu.so and 
_curses_panel.cpython-313-x86_64-linux-gnu.so is built using the host 
header files, and linked with staging_dir/hostpkg/lib/libncurses.a. The 
systems ncurses is an older version.

[ERROR] _curses failed to import: 
/local/jan/gtb2/openwrt/src-gtb2-25/build_dir/hostpkg/Python-3.13.9/build/lib.linux-x86_64-3.13/_curses.cpython-313-x86_64-linux-gnu.so: 
undefined symbol: _nc_acs_map

Pythons configure finds the systems ncursesw, but not the ncursesw library.

pyconfig.h:
#define HAVE_NCURSES 1
/* #undef HAVE_NCURSESW */
#define HAVE_NCURSESW_CURSES_H 1
#define HAVE_NCURSESW_NCURSES_H 1

In OpenWrt 24, the same modules are compiled and dynamically linked 
against the system ncursesw, as can be seen by ldd:

ldd 
staging_dir/hostpkg/lib/python3.11/lib-dynload/_curses.cpython-311-x86_64-linux-gnu.so
         linux-vdso.so.1 (0x00007ffde4d85000)
         libncursesw.so.6 => /lib64/libncursesw.so.6 (0x00007efd04861000)
         libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007efd04832000)
         libc.so.6 => /lib64/libc.so.6 (0x00007efd04600000)
         libdl.so.2 => /lib64/libdl.so.2 (0x00007efd0482d000)
         /lib64/ld-linux-x86-64.so.2 (0x00007efd048eb000)

My current fix is to install ncursesw in staging_dir, and add as 
dependency. Not sure if it is a good solution, it is after all a change 
to the openwrt base.

//Jan

diff --git a/package/libs/ncurses/Makefile b/package/libs/ncurses/Makefile
index 07f9d33747..a0187a7558 100644
--- a/package/libs/ncurses/Makefile
+++ b/package/libs/ncurses/Makefile
@@ -91,6 +91,7 @@ HOST_CONFIGURE_ARGS += \
         --without-manpages \
         --without-profile \
         --without-tests \
+       --enable-widec \
         --without-curses-h

diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile
index e327f81092..5f11567678 100644
--- a/lang/python/python3/Makefile
+++ b/lang/python/python3/Makefile
@@ -41,7 +41,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
  HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)

  PKG_BUILD_DEPENDS:=bluez python3/host python-build/host 
python-installer/host python-wheel/host
-HOST_BUILD_DEPENDS:=bzip2/host libffi/host
+HOST_BUILD_DEPENDS:=bzip2/host libffi/host ncurses/host

  include $(INCLUDE_DIR)/host-build.mk
  include $(INCLUDE_DIR)/package.mk






More information about the openwrt-devel mailing list