The ncurses ebuild currently compiles itself 4 different times: https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/refs/heads/main/sys-libs/ncurses/ncurses-6.3_p20220423.ebuild#125 This is because we build various flavors: ``` NCURSES_TARGETS=( ncurses ncursesw ncursest ncursestw ) ``` I would like to speed up how long it takes the ncurses package to build. One way of doing this is to drop some of the variants. I propose we add a `threads` USE flag, and when it's disabled we drop the `ncursest` and `ncursestw` variants. Any package that needs the threaded variants can add a USE constraint to their dependencies. Reproducible: Always Looking at the packages that use ncurses on my local install, I didn't find any tools using the threaded versions: ``` (cr) rrangel@rrangel920 ~/chromiumos $ find /var/db/pkg/ -iname REQUIRES -exec grep 'libncurse' '{}' + | sed -E -e 's/^([^:]+:[^:]+: ).*(libncurse[^ ]+).*$/\1: \2/' /var/db/pkg/cross-armv7a-cros-linux-gnueabihf/gdb-13.1-r2/REQUIRES:x86_64: : libncursesw.so.6 /var/db/pkg/cross-armv7m-cros-eabi/gdb-13.1-r2/REQUIRES:x86_64: : libncursesw.so.6 /var/db/pkg/sys-devel/gdb-9.2.20200923-r12/REQUIRES:x86_64: : libncursesw.so.6 /var/db/pkg/sys-devel/llvm-18.0_pre510928-r44/REQUIRES:x86_32: : libncurses.so.6 /var/db/pkg/sys-devel/arc-toolchain-r-2020.07.10-r2/REQUIRES:arm_32: : libncurses.so.5 /var/db/pkg/sys-devel/arc-toolchain-t-2022.04.18-r1/REQUIRES:arm_32: : libncursesw.so.5 /var/db/pkg/sys-devel/arc-toolchain-n-2018.12.13/REQUIRES:arm_32: : libncurses.so.5 /var/db/pkg/sys-devel/arc-toolchain-master-2020.03.30-r2/REQUIRES:arm_32: : libncurses.so.5 /var/db/pkg/app-crypt/pinentry-1.2.1-r3/REQUIRES:x86_64: : libncursesw.so.6 /var/db/pkg/cross-arm-none-eabi/gdb-11.2-r3/REQUIRES:x86_64: : libncursesw.so.6 /var/db/pkg/dev-lang/python-2.7.15-r9/REQUIRES:x86_64: : libncursesw.so.5 /var/db/pkg/dev-lang/python-3.8.16_p4-r5/REQUIRES:x86_64: : libncursesw.so.6 /var/db/pkg/sys-process/procps-3.3.17-r1/REQUIRES:x86_64: : libncursesw.so.6 /var/db/pkg/cross-aarch64-cros-linux-gnu/gdb-11.2-r3/REQUIRES:x86_64: : libncursesw.so.6 /var/db/pkg/cross-i686-cros-linux-gnu/gdb-11.2-r3/REQUIRES:x86_64: : libncursesw.so.6 /var/db/pkg/dev-util/cmake-3.26.4-r1/REQUIRES:x86_64: : libncurses.so.6 /var/db/pkg/app-misc/fdupes-2.2.1/REQUIRES:x86_64: : libncursesw.so.6 /var/db/pkg/sys-apps/util-linux-2.38.1-r3/REQUIRES:x86_64: : libncursesw.so.6 /var/db/pkg/app-editors/nano-6.4/REQUIRES:x86_64: : libncursesw.so.6 /var/db/pkg/cross-armv6j-cros-linux-gnueabi/gdb-8.3.20191215-r2/REQUIRES:x86_64: : libncursesw.so.5 /var/db/pkg/media-sound/alsa-utils-1.2.8-r1/REQUIRES:x86_64: : libncursesw.so.6 /var/db/pkg/cross-x86_64-cros-linux-gnu/gdb-11.2-r3/REQUIRES:x86_64: : libncursesw.so.6 ``` ``` (cr) rrangel@rrangel920 ~/chromiumos $ find /var/db/pkg/ -iname REQUIRES -exec grep 'libtinfo' '{}' + | sed -E -e 's/^([^:]+:[^:]+: ).*(libtinfo[^ ]+).*$/\1: \2/' /var/db/pkg/cross-armv7a-cros-linux-gnueabihf/gdb-13.1-r2/REQUIRES:x86_64: : libtinfow.so.6 /var/db/pkg/sys-libs/readline-6.3_p8-r4/REQUIRES:x86_64: : libtinfo.so.6 /var/db/pkg/sys-libs/readline-8.1_p1-r3/REQUIRES:x86_64: : libtinfow.so.6 /var/db/pkg/cross-armv7m-cros-eabi/gdb-13.1-r2/REQUIRES:x86_64: : libtinfow.so.6 /var/db/pkg/sys-devel/gdb-9.2.20200923-r12/REQUIRES:x86_64: : libtinfow.so.6 /var/db/pkg/sys-devel/arc-toolchain-p-2019.08.13-r1/REQUIRES:arm_32: : libtinfo.so.5 /var/db/pkg/sys-devel/llvm-18.0_pre510928-r44/REQUIRES:x86_32: : libtinfo.so.6 /var/db/pkg/sys-devel/arc-toolchain-r-2020.07.10-r2/REQUIRES:arm_32: : libtinfo.so.5 /var/db/pkg/sys-devel/autofdo-0.26-r6/REQUIRES:x86_64: : libtinfo.so.6 /var/db/pkg/sys-devel/arc-toolchain-t-2022.04.18-r1/REQUIRES:arm_32: : libtinfo.so.5 /var/db/pkg/sys-devel/arc-toolchain-n-2018.12.13/REQUIRES:arm_32: : libtinfo.so.5 /var/db/pkg/sys-devel/arc-toolchain-master-2020.03.30-r2/REQUIRES:arm_32: : libtinfo.so.5 /var/db/pkg/app-crypt/pinentry-1.2.1-r3/REQUIRES:x86_64: : libtinfow.so.6 /var/db/pkg/cross-arm-none-eabi/gdb-11.2-r3/REQUIRES:x86_64: : libtinfow.so.6 /var/db/pkg/sys-process/procps-3.3.17-r1/REQUIRES:x86_64: : libtinfow.so.6 /var/db/pkg/sys-process/psmisc-23.6-r1/REQUIRES:x86_64: : libtinfo.so.6 /var/db/pkg/sys-block/parted-3.4-r1/REQUIRES:x86_64: : libtinfo.so.6 /var/db/pkg/cross-aarch64-cros-linux-gnu/gdb-11.2-r3/REQUIRES:x86_64: : libtinfow.so.6 /var/db/pkg/cross-i686-cros-linux-gnu/gdb-11.2-r3/REQUIRES:x86_64: : libtinfow.so.6 /var/db/pkg/dev-util/bpftool-7.2.0-r1/REQUIRES:x86_64: : libtinfo.so.6 /var/db/pkg/dev-util/cvise-2.8.0-r3/REQUIRES:x86_64: : libtinfo.so.6 /var/db/pkg/dev-util/iwyu-2023.04.18.193007-r5/REQUIRES:x86_64: : libtinfo.so.6 /var/db/pkg/dev-util/cmake-3.26.4-r1/REQUIRES:x86_64: : libtinfo.so.6 /var/db/pkg/app-misc/fdupes-2.2.1/REQUIRES:x86_64: : libtinfow.so.6 /var/db/pkg/app-misc/tmux-3.3a/REQUIRES:x86_64: : libtinfo.so.6 /var/db/pkg/sys-apps/util-linux-2.38.1-r3/REQUIRES:x86_64: : libtinfow.so.6 /var/db/pkg/sys-apps/less-608-r2/REQUIRES:x86_64: : libtinfo.so.6 /var/db/pkg/sys-apps/texinfo-6.8/REQUIRES:x86_64: : libtinfo.so.6 /var/db/pkg/app-editors/nano-6.4/REQUIRES:x86_64: : libtinfow.so.6 /var/db/pkg/dev-embedded/ti50-sdk-0.0.6-r2/REQUIRES:x86_64: : libtinfo.so.6 /var/db/pkg/cross-armv6j-cros-linux-gnueabi/gdb-8.3.20191215-r2/REQUIRES:x86_64: : libtinfow.so.5 /var/db/pkg/media-sound/alsa-utils-1.2.8-r1/REQUIRES:x86_64: : libtinfow.so.6 /var/db/pkg/dev-libs/libedit-20210419.3.1/REQUIRES:x86_64: : libtinfo.so.6 /var/db/pkg/cross-x86_64-cros-linux-gnu/gdb-11.2-r3/REQUIRES:x86_64: : libtinfow.so.6 ```
This scenario feels weird IMO. I'm not aware of another distro that enables the "t" suffixed variants, though the "w" variants are standard to distribute. Choosing a variant essentially requires a given project look for it, so it's unsurprising nothing uses libncursest(w).so Even the original motivation for adding this seems shaky: > it shouldn't affect anything that doesn't explicitly support > those differences and build against them ... which is nice, but then if things need to explicitly support and build against them, then what are those things that do so? What do they do on other distros? Just serenely use libncursesw.so? I'm very curious what the value of providing this by default is -- maybe even, at all. I know Sam doesn't want to re-add USE=threads...
FWIW, I just ran a [CL](https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/5320913?tab=checks) through our CI builders that moved the `t` variants behind a USE flag and everything passed. This isn't to say there isn't a package in the Gentoo tree that doesn't use them, but I figure it's a good data point. I can send up a CL to add the USE flag, or a Cl to just drop them. Thoughts?
My vote is a CL to drop them entirely.