Skip to content

TIP 538 prevents building Tkinter against Tcl 8.7 built with bundled libtommath #103839

Description

@chrstphrchvz

Bug report

Separated out from #103194 (comment) since I believe this likely should be addressed first.

TIP 538 means that Tcl 8.7 can be built to use separately-built libtommath, and no longer recommends building with the bundled libtommath. tclTomMath.h requires tommath.h, which Tcl will no longer install a copy of even when the bundled libtommath is used (as another user recently found out: https://core.tcl-lang.org/tcl/info/ff255adc4cb5). Either tommath.h must be obtained separately, or TCL_NO_TOMMATH_H must be defined before including tclTomMath.h.

Package managers presumably would want to build Tcl against separately-built libtommath once they update to 8.7, and in turn build Tkinter against separately-built Tcl and libtommath. But given that nothing else in CPython uses libtommath, how much would the official Python binary distributions prefer that Tcl continue building its bundled libtommath?

Linked PRs

Activity

  1. ned-deily commented on Apr 25, 2023

    @ned-deily
    Member

    Presumably this is only an issue for the Windows builds and for macOS installer builds? My initial reaction is that we provide a Tcl binary solely to run Tk in turn solely to run tkinter-based applications; we have no need to provide a full Tcl installation with all its third-party dependencies as many of them duplicate functionality provided directly by Python and can only somewhat indirectly used via tkinter. So, if libtommath falls into that category, adding a something (like TCL_NO_TOMMATH_H to our builds of Tcl seems fine. Other opinions?

  2. terryjreedy commented on Apr 25, 2023

    @terryjreedy
    Member

    @serhiy-storchaka @zooba tcl/tk build question. I suspect your answer will match Ned's.

  3. added
    type-featureA feature request or enhancement
    buildThe build process and cross-build
    type-bugAn unexpected behavior, bug, or error
    and removed
    type-bugAn unexpected behavior, bug, or error
    type-featureA feature request or enhancement
    on Apr 26, 2023
  4. zooba commented on Apr 28, 2023

    @zooba
    Member

    Yeah, I'd rather omit the dependency. (I couldn't find a nice way to omit the zlib DLL dependency, which is why we now have to carry a second copy of zlib, but let's not use that as precedent to add more unnecessary weight.)

  5. terryjreedy commented on May 17, 2023

    @terryjreedy
    Member

    @ned-deily @zooba Do you comments constitute approval of #103842? (I suspect so but don't understand build stuff.) If so, please say so there and maybe one of you merge it. Should it be backported?

  6. zooba commented on May 17, 2023

    @zooba
    Member

    That PR seems to be a fairly trivial preprocessor check? Assuming it works, it doesn't bother me at all. Python 3.13 is the first that might include Tcl 8.7 on Windows, so if it helps people who are building on other platforms, it can go wherever it likes.

    Or did you mean a different PR?

  7. added a commit that references this issue on May 19, 2023
  8. ned-deily commented on May 19, 2023

    @ned-deily
    Member

    I've merged the PR (thanks!) to main for inclusion in 3.12. Rather than set potentially false expectations, I think we should not backport it until and unless we decide to backport future PRs to fully support 8.7.

  9. terryjreedy commented on May 19, 2023

    @terryjreedy
    Member

    As I mentioned on the tracking issue #104568, I decided to backport at least the test fixes to 3.11 and note things not backported.

  10. added a commit that references this issue on May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtopic-tkintertype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions