Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 913846 - dev-lang/python-3.11.5-r1: The necessary bits to build these optional modules were not found: _tkinter To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Summary: dev-lang/python-3.11.5-r1: The necessary bits to build these optional modules...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-07 23:31 UTC by HougeLangley
Modified: 2023-09-08 10:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (python-3.11.5-r1.log,239.67 KB, text/plain)
2023-09-07 23:31 UTC, HougeLangley
Details
emerge --info (emerge-info.log,7.36 KB, text/x-log)
2023-09-07 23:32 UTC, HougeLangley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description HougeLangley 2023-09-07 23:31:20 UTC
Created attachment 870064 [details]
build.log

x86_64-pc-linux-gnu-gcc -fPIC -Wsign-compare -DNDEBUG -O3 -march=znver3 -pipe -fwrapv -fno-semantic-interposition -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-generate -I./Include/internal -I/usr/lib64/libffi/include -I./Include -I. -I/usr/include/ncursesw -I/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Include -I/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5 -c /var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Modules/_ctypes/callproc.c -o build/temp.linux-x86_64-3.11/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Modules/_ctypes/callproc.o -DHAVE_FFI_PREP_CIF_VAR=1 -DHAVE_FFI_PREP_CLOSURE_LOC=1 -DHAVE_FFI_CLOSURE_ALLOC=1
x86_64-pc-linux-gnu-gcc -fPIC -Wsign-compare -DNDEBUG -O3 -march=znver3 -pipe -fwrapv -fno-semantic-interposition -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-generate -I./Include/internal -I/usr/lib64/libffi/include -I./Include -I. -I/usr/include/ncursesw -I/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Include -I/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5 -c /var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Modules/_ctypes/cfield.c -o build/temp.linux-x86_64-3.11/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Modules/_ctypes/cfield.o -DHAVE_FFI_PREP_CIF_VAR=1 -DHAVE_FFI_PREP_CLOSURE_LOC=1 -DHAVE_FFI_CLOSURE_ALLOC=1
x86_64-pc-linux-gnu-gcc -fPIC -Wsign-compare -DNDEBUG -O3 -march=znver3 -pipe -fwrapv -fno-semantic-interposition -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-generate -I./Include/internal -I/usr/lib64/libffi/include -I./Include -I. -I/usr/include/ncursesw -I/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Include -I/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5 -c /var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Modules/_ctypes/stgdict.c -o build/temp.linux-x86_64-3.11/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Modules/_ctypes/stgdict.o -DHAVE_FFI_PREP_CIF_VAR=1 -DHAVE_FFI_PREP_CLOSURE_LOC=1 -DHAVE_FFI_CLOSURE_ALLOC=1
x86_64-pc-linux-gnu-gcc -shared -Wl,-O1 -Wl,--as-needed -fno-semantic-interposition -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -fprofile-generate build/temp.linux-x86_64-3.11/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Modules/_decimal/_decimal.o Modules/_decimal/libmpdec/libmpdec.a -L. -L/usr/local/lib64 -lm -o build/lib.linux-x86_64-3.11/_decimal.cpython-311-x86_64-linux-gnu.so
x86_64-pc-linux-gnu-gcc -shared -Wl,-O1 -Wl,--as-needed -fno-semantic-interposition -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -fprofile-generate build/temp.linux-x86_64-3.11/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Modules/_ctypes/_ctypes.o build/temp.linux-x86_64-3.11/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Modules/_ctypes/callbacks.o build/temp.linux-x86_64-3.11/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Modules/_ctypes/callproc.o build/temp.linux-x86_64-3.11/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Modules/_ctypes/cfield.o build/temp.linux-x86_64-3.11/var/tmp/portage/dev-lang/python-3.11.5-r1/work/Python-3.11.5/Modules/_ctypes/stgdict.o -L. -L/usr/local/lib64 -lffi -ldl -o build/lib.linux-x86_64-3.11/_ctypes.cpython-311-x86_64-linux-gnu.so

The necessary bits to build these optional modules were not found:
_tkinter                                                       
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


The following modules found by detect_modules() in setup.py have not
been built, they are *disabled* in the Setup files:
nis
Comment 1 HougeLangley 2023-09-07 23:32:30 UTC
Created attachment 870065 [details]
emerge --info
Comment 2 Larry the Git Cow gentoo-dev 2023-09-08 00:39:07 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89e8e49b91619a509c20fb99457c8fbd79571db7

commit 89e8e49b91619a509c20fb99457c8fbd79571db7
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-08 00:38:05 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-08 00:38:05 +0000

    Revert "dev-lang/python: port older versions to use the same USE disable approach"
    
    This reverts commit 4fefeac023536fdbbc50e7cced091b2ab80013bd.
    
    I can only reproduce the linked bug w/ 3.11 so far but I'm not really thinking
    clearly atm and I don't want to rush a fix for this and get it wrong. Just revert
    for now so we can try again later.
    
    Bug: https://bugs.gentoo.org/913846
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/python/python-3.10.13-r1.ebuild | 500 -----------------------------
 dev-lang/python/python-3.11.5-r1.ebuild  | 526 -------------------------------
 dev-lang/python/python-3.8.18-r1.ebuild  | 430 -------------------------
 dev-lang/python/python-3.9.18-r1.ebuild  | 490 ----------------------------
 4 files changed, 1946 deletions(-)
Comment 3 Eli Schwartz gentoo-dev 2023-09-08 00:50:55 UTC
My apologies, it appears that the new style approach does *prevent* modules from being built, which is good, but also doesn't actually tell setup.py that they were explicitly deselected if ./configure didn't detect the necessary dependencies, which is bad.

So, if you had tkinter installed but disabled its USE flag in python, then it would not be built *and* the build would pass, but if you didn't have it installed, the extension checker would sanity check it and mistakenly think the (only) reason it wasn't built was because of missing dependencies.

Unfortunately, I tested both permutations on python:3.12, where it worked, but only the "tk was already installed" permutation for python:3.11 :(

Sam, I think that https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fefeac023536fdbbc50e7cced091b2ab80013bd needs to be reverted. It was a nice idea, but no luck.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-08 10:30:28 UTC
Thanks for the analysis. It was definitely worth a try, but hey, at least >=3.12 has the cleaner approach.

I did the revert last night and given ^, no need to undo that, so done.