Here https://docs.python.org/3/whatsnew/changelog.html for bpo-45067 is referenced Centos, I think the same applies to Gentoo. I have the latest ncurses: =sys-libs/ncurses-6.3_p20211106 Reproducible: Always Steps to Reproduce: 1. add "=dev-lang/python-3.10.1 -ncurses" to /etc/portage/package.use/package.use_file 2. it builds 3. comment the above line 4. it doesn't build
Created attachment 757619 [details] Emerge build log when ncurses flag is enabled for python-3.10 (and 3.11)
From build.log: x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -pipe -fwrapv build/temp.linux-x86_64-3.10/var/tmp/portage/dev-lang/python-3.10.1/work/Python-3.10.1/Modules/_cursesmodule.o -L. -L/usr/local/lib64 -lncurses -o build/lib.linux-x86_64-3.10/_curses.cpython-310-x86_64-linux-gnu.so I guess an old ncurses remains installed under /usr/local/lib64.
please paste the emerge info as described on https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket
emerge --info =dev-lang/python-3.10.1 Portage 3.0.28 (python 3.9.9-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-11.2.0, glibc-2.33-r7, 5.14.15-gentoo-x86_64 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.14.15-gentoo-x86_64-x86_64-AMD_Ryzen_9_3900X_12-Core_Processor-with-glibc2.33 KiB Mem: 16313508 total, 9168300 free KiB Swap: 37746676 total, 37746676 free Timestamp of repository gentoo: Thu, 09 Dec 2021 07:36:42 +0000 Head commit of repository gentoo: 74d751debfcdd9dc8403a1b67e394c786e620192 Head commit of repository crossdev: 13a6eb3ad027425edb5eb90f4e546a9bf7342293 Head commit of repository kde: 0d80b2f448c304608842e701a570a68b75d5a8b6 sh bash 5.1_p8 ld GNU ld (Gentoo 2.37_p1 p0) 2.37 app-shells/bash: 5.1_p8::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.0-r3::gentoo dev-lang/python: 2.7.18_p13::gentoo, 3.8.12_p1::gentoo, 3.9.9::gentoo, 3.10.1::gentoo dev-lang/rust: 1.56.1::gentoo dev-util/cmake: 3.21.4::gentoo sys-apps/baselayout: 2.7-r3::gentoo sys-apps/sandbox: 2.25::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.4::gentoo sys-devel/binutils: 2.37_p1::gentoo sys-devel/gcc: 9.4.0::gentoo, 10.3.0-r2::gentoo, 11.2.0::gentoo sys-devel/gcc-config: 2.4::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.10-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.33-r7::gentoo Repositories: gentoo location: /usr/portage sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo.git priority: -1000 sync-git-verify-commit-signature: yes local-repo location: /usr/local/portage/standard masters: gentoo crossdev location: /var/lib/layman/crossdev sync-type: git sync-uri: git://github.com/alphallc/crossdev masters: gentoo priority: 50 kde location: /var/lib/layman/kde sync-type: git sync-uri: https://github.com/gentoo/kde.git masters: gentoo priority: 50 Installed sets: @desktopenv, @kubernetes, @talaset, @toolchain ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE PUEL dlj-1.1 cadsoft-2 sun-bcla-java-vm skype-eula google-talkplugin Oracle-BCLA-JavaSE googleearth google-chrome GPL JSON RAR bestcrypt CC-BY-NC-SA-2.5 bluez-firmware MSttfEULA MPEG-4 unRAR lablgtk-examples linux-fw-redistributable no-source-code xv ISOC-rfc grass-ipafonts CC-BY-ND-3.0 dropbox arj freedist CC-Sampling-Plus-1.0 mac fping BitstreamCyberbit NPSL OPERA-2018" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/X11/xkb /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.8/conf /usr/share/themes/oxygen-gtk/gtk-2.0 /var/svn/repos/conf/" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/init.d /etc/php/apache2-php8.0/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--alphabetical --with-bdeps y --quiet-build=y --jobs 1 --load-average 1.1" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildsyspkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo/" LANG="en_US.utf8" LC_ALL="" LDFLAGS="-Wl,-O1 -Wl,--as-needed" PKGDIR="/usr/portage/packages" PORTAGE_BINHOST="http://tinderbox.dev.gentoo.org/default/linux/amd64/" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--human-readable" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="3dnow X a52 aac aalib acl acpi activities ada alsa amd64 apache2 bash-completion bluetooth branding btrfs bzip2 cairo cdb cdda cddb cdr cgi chm cli crypt cryptsetup cups curl cvs daap dbus declarative device-mapper dga directfb dri dts dv dvd dvdr emboss encode examples exif experimental extras fat fbcon fftw flac ftp fuse gcj gcrypt gd gdbm ggi gif gimp git gmp gnutls gpm graphviz gs gstreamer gtk gui iconv icu imagemagick imlib inotify ipv6 irda java javafx jpeg jpeg2k jumbo-build kde kipi kwallet lcms libcaca libglvnd libnotify libtirpc lm_sensors lzma lzo mad madwifi mng motif mp3 mp4 mpeg mssql mtp musepack musicbrainz mysql mysqli ncurses network-cron nls nsplugin ntfs odbc ofa ogg opengl openmp opensc opus pam pango pcre pdf pdfimport php pkcs11 plasma png policykit postgres ppds pulseaudio qml qt5 quicktime qwt rdesktop rdp readline reiserfs ruby samba sasl scanner sdk sdl seccomp slang snmp spell split-usr sql ssl startup-notification svg syslog systemd sysv-utils t1lib theora threads tidy tiff tk truetype udev udisks unicode upower usb v4l vhosts vidstab vorbis warmstarts webkit widgets wifi wxwidgets x264 xattr xcb xfs xml xnest xpm xscreensaver xv xvfb xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias proxy proxy_http" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 sse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="it en fr de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, RUSTFLAGS ================================================================= Package Settings ================================================================= dev-lang/python-3.10.1::gentoo was built with the following: USE="bluetooth -build examples gdbm -hardened -lto -ncurses -pgo readline sqlite ssl -test tk -verify-sig -wininst xml" ABI_X86="(64)" CFLAGS="-O2 -pipe -fwrapv" CXXFLAGS="-O2 -pipe -fwrapv" FEATURES="usersync protect-owned binpkg-logs strict unmerge-orphans buildpkg unmerge-logs fixlafiles sfperms parallel-install binpkg-dostrip multilib-strict userpriv distlocks pid-sandbox assume-digests config-protect-if-modified preserve-libs news merge-sync xattr ipc-sandbox userfetch ebuild-locks parallel-fetch qa-unresolved-soname-deps usersandbox sandbox network-sandbox binpkg-docompress unknown-features-warn buildsyspkg"
Created attachment 757800 [details] Failed build log
(In reply to Tee KOBAYASHI from comment #2) > From build.log: > > x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed > -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -pipe -fwrapv > build/temp.linux-x86_64-3.10/var/tmp/portage/dev-lang/python-3.10.1/work/ > Python-3.10.1/Modules/_cursesmodule.o -L. -L/usr/local/lib64 -lncurses -o > build/lib.linux-x86_64-3.10/_curses.cpython-310-x86_64-linux-gnu.so > > I guess an old ncurses remains installed under /usr/local/lib64. Good point, this folder recurs in the log, but is empty, and its permissions look fine: # ll -a /usr/local/lib64 total 8 drwxr-xr-x 2 root root 4096 30 mar 2020 . drwxr-xr-x 13 root root 4096 19 apr 2021 .. # ll /usr/local/lib64 -d drwxr-xr-x 2 root root 4096 30 mar 2020 /usr/local/lib64
I found the problem. It was not ncurses per se, it was impossible to compile python 3 when both ncurses and readline flags were present at the same time. I discovered, when analyzing the output of: merge-usr --dryrun a couple of old libraries from 2009: [...] ERROR: Conflict for file '/lib64/libhistory.so': [Errno 17] File exists: '/usr/lib64/libhistory.so' ERROR: Conflict for file '/lib64/libreadline.so': [Errno 17] File exists: '/usr/lib64/libreadline.so' ERROR: Leaving '/lib64' as a directory due to prior errors [...] I don't know where those file came from. I deleted the offending files and, sure enough, now python compiles with both ncurses and readline flags. I'm closing this bug report.