Tk Source Code

View Ticket
Login
2026-10-05
15:13 • Ticket [48b39019] X11 accessibility: Tk speaks typed keys and state changes itself, synchronously, on top of the screen reader status still Open with 3 other changes artifact: d1beb740 user: serhiy.storchaka
15:03 • Closed ticket [1dfc71ae]: configure fails without HarfBuzz although --enable-bidi was not given plus 8 other changes artifact: bfc15540 user: jan.nijtmans
15:00
Fix [1dfc71ae4a]: configure fails without HarfBuzz although --enable-bidi was not given check-in: 427bb09f user: jan.nijtmans tags: trunk, main
2026-09-29
11:11 • Ticket [1dfc71ae] configure fails without HarfBuzz although --enable-bidi was not given status still Open with 3 other changes artifact: 1f4181ca user: serhiy.storchaka
11:08
Bidi requires Xft: disable it if Xft is disabled or not found [1dfc71ae4a]

With --disable-xft, or if Xft is not found, Bidi is now disabled (with a notice or warning) instead of turning Xft on again or selecting the Bidi backend which cannot be built without Xft. Combined with an explicit --enable-bidi it is an error. Xft is now checked before HarfBuzz and the Bidi setup. check-in: 603e6253 user: serhiy.storchaka tags: configure-bidi-requires-xft

2026-09-25
14:51 • Ticket [1dfc71ae] configure fails without HarfBuzz although --enable-bidi was not given status still Open with 3 other changes artifact: 4dde19be user: serhiy.storchaka
14:50
Fix [1dfc71ae4a]: configure fails without HarfBuzz although --enable-bidi was not given. Unless --enable-bidi is given explicitly, a missing, too old or unusable HarfBuzz now only disables Bidi with a warning, as a too old one did before; with --enable-bidi it is an error which mentions --disable-bidi. HAVE_BIDI, the Bidi flags and font objects are now set only after HarfBuzz was found usable; before, a build with a too old HarfBuzz still defined HAVE_BIDI with the non-Bidi font code. Regenerated configure with autoconf 2.73. closed check-in: b83a8093 user: serhiy.storchaka tags: configure-bidi-without-harfbuzz
14:50 • New ticket [1dfc71ae] configure fails without HarfBuzz although --enable-bidi was not given. artifact: 91ca9d67 user: serhiy.storchaka

Ticket UUID: 1dfc71ae4a9f54a7fa32f3580271e30a57a3512
Title: configure fails without HarfBuzz although --enable-bidi was not given
Type: Bug Version: 9.1b1
Submitter: serhiy.storchaka Created on: 2026-09-25 14:50:15
Subsystem: 84. Unix Build Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-10-05 15:03:06
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2026-10-05 15:03:06
Description:

Bidi support is enabled by default on X11, and if the HarfBuzz development files are not found, configure stops with

configure: error: --enable-bidi requires HarfBuzz development files.

although --enable-bidi was not given. If HarfBuzz is found but too old, configure only warns and disables Bidi ([5f92e6cb84]), so a missing HarfBuzz is treated more strictly than an old one. I encountered this when building Tk on FreeBSD, NetBSD, OpenBSD, DragonFly and openSUSE, where HarfBuzz is not installed by default. The error message also does not mention --disable-bidi.

Without an explicit --enable-bidi, configure could warn and disable Bidi, as it does for an old HarfBuzz, and fail only if --enable-bidi was given.

User Comments: jan.nijtmans added on 2026-10-05 15:03:06:

This looks like the right approach to me.

Thanks for doing this!

Merged to [427bb09f52654fff|trunk]

Since Tk 9.0 doesn't have bidi, there's no backporting to be done.


serhiy.storchaka added on 2026-09-29 11:11:15:

Xft has the same problem as HarfBuzz: Bidi requires Xft, but --disable-xft is overridden by the default Bidi (Xft is forced on again), and if Xft is not found, configure says "falling back to classic fonts" but still selects the Bidi backend, which cannot be built without Xft.

Alternative branch configure-bidi-requires-xft, based on configure-bidi-without-harfbuzz, treats Xft like HarfBuzz: --disable-xft or a missing Xft disables the default Bidi with a notice or warning, and with an explicit --enable-bidi it is an error. This is a larger change (the Xft check had to be moved before the Bidi setup), so it is in a separate branch.


serhiy.storchaka added on 2026-09-25 14:51:30:

Proposed fix in [b83a809314] (branch configure-bidi-without-harfbuzz): without --enable-bidi, a missing, too old or unusable HarfBuzz only disables Bidi with a warning; with --enable-bidi it is an error which mentions --disable-bidi.

This also fixes the too old case: configure disabled Bidi but still defined HAVE_BIDI, so Tk was built with the non-Bidi font code but with TK_DRAW_IN_CONTEXT and TK_LAYOUT_WITH_BASE_CHUNKS.