Repository navigation
3.11 build reports missing _tkinter on Ubuntu 18.04 #98973
Copy link
Copy link
Closed
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Python 3.11 build on Ubuntu 18.04 reports checking for stdlib extension module _tkinter... missing even if all necessary packages are installed. This does not happen on Ubuntu 20.04, the difference that I noticed is that 20.04 packages include .pc files for pkg-config while on 18.04 they are not.
Installed packages on 18.04:
ii libtcl8.6:amd64 8.6.8+dfsg-3 amd64 Tcl (the Tool Command Language) v8.6 - run-time library files
ii tcl 8.6.0+9 amd64 Tool Command Language (default version) - shell
ii tcl-dev:amd64 8.6.0+9 amd64 Tool Command Language (default version) - development files
ii tcl8.6 8.6.8+dfsg-3 amd64 Tcl (the Tool Command Language) v8.6 - shell
ii tcl8.6-dev:amd64 8.6.8+dfsg-3 amd64 Tcl (the Tool Command Language) v8.6 - development files
# dpkg -l | grep tk
ii libtk8.6:amd64 8.6.8-4 amd64 Tk toolkit for Tcl and X11 v8.6 - run-time files
ii tk 8.6.0+9 amd64 Toolkit for Tcl and X11 (default version) - windowing shell
ii tk-dev:amd64 8.6.0+9 amd64 Toolkit for Tcl and X11 (default version) - development files
ii tk8.6 8.6.8-4 amd64 Tk toolkit for Tcl and X11 v8.6 - windowing shell
ii tk8.6-blt2.5 2.5.3+dfsg-4 amd64 graphics extension library for Tcl/Tk - library
ii tk8.6-dev:amd64 8.6.8-4 amd64 Tk toolkit for Tcl and X11 v8.6 - development files
Dockerfile, RUN ./configure eventually prints that _tkinter and _uuid are missing
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /python
RUN apt update
RUN apt install --yes software-properties-common wget tar
RUN add-apt-repository --yes --update --enable-source ppa:deadsnakes
RUN apt-get build-dep --yes python3.11
RUN wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tar.xz
RUN tar xvf Python-3.11.0.tar.xz
WORKDIR /python/Python-3.11.0
RUN ./configure
ENTRYPOINT /bin/bashYour environment
- CPython versions tested on: 3.11.0
- Operating system and architecture: Ubuntu 18.04.6 amd64
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
vient commentedon Nov 1, 2022
I know that this procedure is not the same as in building guide. I tried to perform steps listed there (edit sources.list, install all mentioned packages), and while _uuid did appear, _tkinter is still reported as missing.
asottile commentedon Nov 3, 2022
this was due to #31698 -- here's (for example) what
deadsnakesdoes since 18.04 is missing pkg-config information for tkinter: https://github.com/deadsnakes/python3.11/compare/c02751ae7c8c560482523821a221deec09bb2bcb%5E..58af40341824bce58f9d6533e368440c82ce6dc3vient commentedon Nov 3, 2022
deadsnakes version reports
checking for stdlib extension module _tkinter... missingtoo thoughvient commentedon Nov 3, 2022
Oh, ok, they have changes in deb scripts, and I am trying to build with
makedirectly.asottile commentedon Nov 3, 2022
no it doesn't?
$ python3.11 -c 'import _tkinter' $vient commentedon Nov 4, 2022
I tried
TCLTK_CFLAGS="-I/usr/include/tcl8.6" TCLTK_LIBS="-ltcl8.6" ./configure ..., it did not help, configure still reports that libs for tkinter are missing. I guess it's me who is missing something but I can't understand yet what is wrong.asottile commentedon Nov 4, 2022
that's not the same as my diff above shows
vient commentedon Nov 4, 2022
Hm, I took it from your diff
in debian/rules variables are set
and then passed to configure like this
TCLTK_CFLAGS="$(TCLTK_CFLAGS)" TCLTK_LIBS="$(TCLTK_LIBS)" ../configure ...- is it different from what I am doing?vient commentedon Nov 4, 2022
oh well i missed
-ltk8.6vient commentedon Nov 4, 2022
Yay, it worked, thanks for pointing to deadsnakes patches.
I don't know if this issue is relevant to CPython or not, what do they say about build support on 18.04? Did not see this information. Not closing just in case.
asottile commentedon Nov 4, 2022
I asked about this when the pkg-config change landed (linked above) -- this is intentional that they no longer support platforms missing proper pkg-config for tkinter
vient commentedon Nov 4, 2022
So WONTFIX then, understood, thanks
StefaE commentedon Jan 1, 2023
On Debian/buster (old, ok ...), I needed to say
TCLTK_LIBS="-ltk8.6 -ltkstub8.6 -ltcl8.6" TCLTK_CFLAGS="-I/usr/include/tcl8.6" ./configure ..., which took me a while to figure out ...