Skip to content

Commit 504da3c

Browse files
gh-95957: Add instructions for Tcl/Tk and OpenSSL on RHEL/CentOS 7 (GH-95964)
Co-authored-by: Erlend E. Aasland <[email protected]> (cherry picked from commit ab4d729) Co-authored-by: Christian Heimes <[email protected]>
1 parent 36c114a commit 504da3c

File tree

6 files changed

+46
-6
lines changed

6 files changed

+46
-6
lines changed

Doc/whatsnew/3.11.rst

+13-6
Original file line numberDiff line numberDiff line change
@@ -1631,16 +1631,23 @@ Build Changes
16311631

16321632
* Build dependencies, compiler flags, and linker flags for most stdlib
16331633
extension modules are now detected by :program:`configure`. libffi, libnsl,
1634-
libsqlite3, zlib, bzip2, liblzma, libcrypt, Tcl/Tk libs, and uuid flags
1635-
are detected by ``pkg-config`` (when available).
1634+
libsqlite3, zlib, bzip2, liblzma, libcrypt, Tcl/Tk, and uuid flags
1635+
are detected by ``pkg-config`` (when available). :mod:`tkinter` now
1636+
requires ``pkg-config`` command to detect development settings for Tcl/Tk
1637+
headers and libraries.
16361638
(Contributed by Christian Heimes and Erlend Egeberg Aasland in
16371639
:issue:`45847`, :issue:`45747`, and :issue:`45763`.)
16381640

16391641
.. note::
1640-
Use the environment variables ``TCLTK_CFLAGS`` and ``TCLTK_LIBS`` to
1641-
manually specify the location of Tcl/Tk headers and libraries.
1642-
The :program:`configure` options ``--with-tcltk-includes`` and
1643-
``--with-tcltk-libs`` have been removed.
1642+
Use the environment variables :envvar:`TCLTK_CFLAGS` and
1643+
:envvar:`TCLTK_LIBS` to manually specify the location of Tcl/Tk headers
1644+
and libraries. The :program:`configure` options ``--with-tcltk-includes``
1645+
and ``--with-tcltk-libs`` have been removed.
1646+
1647+
On RHEL 7 and CentOS 7 the development packages do not provide ``tcl.pc``
1648+
and ``tk.pc``, use :envvar:`TCLTK_LIBS="-ltk8.5 -ltkstub8.5 -ltcl8.5"`.
1649+
The directory ``Misc/rhel7`` contains ``.pc`` files and instructions
1650+
how to build Python with RHEL 7's and CentOS 7's Tcl/Tk and OpenSSL.
16441651

16451652
* CPython now has :pep:`11` tier 3 support for cross compiling to WebAssembly
16461653
platform ``wasm32-unknown-emscripten`` (Python in the browser). The effort
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
What's New 3.11 now has instructions for how to provide compiler and
2+
linker flags for Tcl/Tk and OpenSSL on RHEL 7 and CentOS 7.

Misc/rhel7/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# pkg-config overrides for RHEL 7 and CentOS 7
2+
3+
RHEL 7 and CentOS 7 do not provide pkg-config `.pc` files for Tcl/Tk. The
4+
OpenSSL 1.1.1 pkg-config file is named `openssl11.pc` and not picked up
5+
by Python's `configure` script.
6+
7+
To build Python with system Tcl/Tk libs and OpenSSL 1.1 package, first
8+
install the developer packages and the `pkgconfig` package with `pkg-config`
9+
command.
10+
11+
```shell
12+
sudo yum install pkgconfig 'tcl-devel >= 8.5.12' 'tk-devel >= 8.5.12' openssl11-devel
13+
```
14+
15+
The run `configure` with `PKG_CONFIG_PATH` environment variable.
16+
17+
```shell
18+
PKG_CONFIG_PATH=Misc/rhel7 ./configure -C
19+
```

Misc/rhel7/openssl.pc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Name: OpenSSL
2+
Version: 1.1.1k
3+
Requires: libssl11 libcrypto11

Misc/rhel7/tcl.pc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Name: Tool Command Language
2+
Version: 8.5.12
3+
Libs: -ltcl8.5 -ltclstub8.5
4+
# Libs.private: -ldl -lz -lpthread -lm

Misc/rhel7/tk.pc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Name: The Tk Toolkit
2+
Version: 8.5.12
3+
Requires: tcl >= 8.5.12
4+
Libs: -ltk8.5 -ltkstub8.5
5+
# Libs.private: -lXft -lfontconfig -lfreetype -lfontconfig -lX11

0 commit comments

Comments
 (0)