# Compiling CPython fails without wide-char NCurses

**URL:** https://discuss.python.org/t/compiling-cpython-fails-without-wide-char-ncurses/109209
**Category:** Core Development
**Tags:** help
**Created:** [September 24, 2026, 7:34am UTC](https://discuss.python.org/t/compiling-cpython-fails-without-wide-char-ncurses/109209 "2026-09-24T07:34:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Deepfriedice](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/deepfriedice/32/37623_2.png) [@Deepfriedice](https://discuss.python.org/u/Deepfriedice)
#### Post date: [September 24, 2026, 7:34am UTC](https://discuss.python.org/t/compiling-cpython-fails-without-wide-char-ncurses/109209/1 "2026-09-24T07:34:28Z")

</div>

I’m in the process of yak-shaving, and currently struggling to compile CPython.

I’m trying to build NCurses locally without wide character support, and then build CPython that’s linked against that. To use the narrow version of NCurses, I’m passing “–with-curses=ncurses” to the configure script in CPython. I’m getting the error message “[ERROR] \_curses failed to import: /(omitted)/cpython-ncurses/cpython/build/lib.linux-x86\_64-3.16/\_curses.cpython-316d-x86\_64-linux-gnu.so: undefined symbol: term\_attrs”. _However_, the (admittedly poor) searching I’ve done suggests that “term\_attrs” will only exist in wide builds (as opposed to “termattrs”), so I don’t understand why CPython is trying to reference it.

My best guess is that the “configure” script is deciding that wide character support is available by looking at the system libraries, and then not respecting the “–with-curses=ncurses” flag. But I don’t know if there’s an option to override that - I’m finding reading the configure script difficult.

Also, I’m sorry if I posted this in the wrong category. I’m not sure if it should be here or in “Python Help”.

---

<div class="post-metadata">

### Author: ![storchaka](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/storchaka/32/217_2.png) [@storchaka](https://discuss.python.org/u/storchaka)
#### Post date: [September 24, 2026, 12:44pm UTC](https://discuss.python.org/t/compiling-cpython-fails-without-wide-char-ncurses/109209/2 "2026-09-24T12:44:39Z")

</div>

You could simply open an issue.

Opened [Building `_curses` against narrow ncurses fails: undefined symbol `term_attrs` · Issue #158078 · python/cpython · GitHub](https://github.com/python/cpython/issues/158078), because I already have a fix.

---

<div class="post-metadata">

### Author: ![Deepfriedice](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/deepfriedice/32/37623_2.png) [@Deepfriedice](https://discuss.python.org/u/Deepfriedice)
#### Post date: [September 24, 2026, 1:19pm UTC](https://discuss.python.org/t/compiling-cpython-fails-without-wide-char-ncurses/109209/3 "2026-09-24T13:19:58Z")

</div>

Thank you. I posted it here because I wasn’t sure if this was an actual bug or just a “you’re holding it wrong” situation.
