Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tcl/Tk builds for ARM64 #90725

Closed
zooba opened this issue Jan 28, 2022 · 10 comments
Closed

Add Tcl/Tk builds for ARM64 #90725

zooba opened this issue Jan 28, 2022 · 10 comments
Assignees
Labels
3.11 only security fixes OS-windows topic-tkinter type-feature A feature request or enhancement

Comments

@zooba
Copy link
Member

zooba commented Jan 28, 2022

BPO 46567
Nosy @pfmoore, @tjguk, @zware, @zooba, @pablogsal, @nsait-linaro
PRs
  • bpo-46567: Add Tcl/Tk build for Windows ARM64 #31574
  • [WIP] Trying to fix bpo-46567 #31603
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/zooba'
    closed_at = <Date 2022-02-28.12:07:40.045>
    created_at = <Date 2022-01-28.16:55:41.827>
    labels = ['type-feature', 'expert-tkinter', 'OS-windows', '3.11']
    title = 'Add Tcl/Tk builds for ARM64'
    updated_at = <Date 2022-02-28.12:07:40.044>
    user = 'https://github.com/zooba'

    bugs.python.org fields:

    activity = <Date 2022-02-28.12:07:40.044>
    actor = 'steve.dower'
    assignee = 'steve.dower'
    closed = True
    closed_date = <Date 2022-02-28.12:07:40.045>
    closer = 'steve.dower'
    components = ['Tkinter', 'Windows']
    creation = <Date 2022-01-28.16:55:41.827>
    creator = 'steve.dower'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46567
    keywords = ['patch']
    message_count = 10.0
    messages = ['412011', '413951', '413982', '413992', '413994', '414179', '414184', '414185', '414189', '414190']
    nosy_count = 6.0
    nosy_names = ['paul.moore', 'tim.golden', 'zach.ware', 'steve.dower', 'pablogsal', 'nsait-linaro']
    pr_nums = ['31574', '31603']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue46567'
    versions = ['Python 3.11']

    @zooba
    Copy link
    Member Author

    zooba commented Jan 28, 2022

    Currently our ARM64 installs omit Tcl/Tk (and implicitly tkinter and IDLE) because there appears to be no upstream support for building Tcl/Tk for ARM64.

    Once the upstream support exists, or we have a good enough patch to apply to our own copy of the sources, we need to add these back.

    @zooba zooba added 3.11 only security fixes topic-tkinter OS-windows type-feature A feature request or enhancement labels Jan 28, 2022
    @zooba
    Copy link
    Member Author

    zooba commented Feb 25, 2022

    Getting this done with some help from colleagues. Tcl and Tk have been updated to support it, and I've pulled down their patches into our source repo.

    Hopefully I find time to get the build and setup updates done before the next alpha... adding Pablo just to say that if you feel like deferring by a day or two, I will fully support you :)

    @pablogsal
    Copy link
    Member

    I don't mind waiting a couple of days. We have also at least one release blocker as well, so is not even sure that we will be ready in time :S

    @zooba
    Copy link
    Member Author

    zooba commented Feb 25, 2022

    This is blocked on the IDLE issue in https://github.com/python/cpython/runs/5334087871?check_suite_focus=true

    ======================================================================
    ERROR: test_mousewheel (idlelib.idle_test.test_sidebar.ShellSidebarTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "D:\a\cpython\cpython\Lib\idlelib\idle_test\tkinter_testing_utils.py", line 58, in new_test_method
        raise exception
        ^^^^^^^^^^^^^^^
      File "D:\a\cpython\cpython\Lib\idlelib\idle_test\tkinter_testing_utils.py", line 42, in after_callback
        next(test_generator)
        ^^^^^^^^^^^^^^^^^^^^
      File "D:\a\cpython\cpython\Lib\idlelib\idle_test\test_sidebar.py", line 694, in test_mousewheel
        sidebar.canvas.event_generate('<MouseWheel>', x=0, y=0, delta=delta)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\a\cpython\cpython\Lib\tkinter\__init__.py", line 1886, in event_generate
        self.tk.call(args)
        ^^^^^^^^^^^^^^^^^^
    _tkinter.TclError: <MouseWheel> event doesn't accept "-delta" option

    I don't have time to look into it right now, but it seems to be reliable on 64-bit builds but works on 32-bit.

    @zooba
    Copy link
    Member Author

    zooba commented Feb 25, 2022

    Despite the IDLE issue, I made a test release. Again, I don't have time to dig into it before Monday, but if anyone does and would like to help out, here are the installer files (for all platforms):

    https://artprodcus3.artifacts.visualstudio.com/Ac0fc90aa-a903-4cf7-8191-b925daa75b5c/8e426817-76c0-4b99-ba9e-a48a1e4bd5db/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL3B5dGhvbi9wcm9qZWN0SWQvOGU0MjY4MTctNzZjMC00Yjk5LWJhOWUtYTQ4YTFlNGJkNWRiL2J1aWxkSWQvOTc1MzEvYXJ0aWZhY3ROYW1lL21zaQ2/content?format=zip

    Note that they're signed with a test certificate, so you'll probably get errors about it being invalid. These are fine, and shouldn't affect anything if you skip the warnings.

    @nsait-linaro
    Copy link
    Mannequin

    nsait-linaro mannequin commented Feb 28, 2022

    Based on my investigation so far, I think Tcl/Tk package generated with VS 2022 seems to have some issues when used with Tkinter. I could be wrong.

    I've created #31603 to force the Tcl/Tk package build on the fly with VS 2019 and I can see it is passing all tests.

    If my analysis is correct, I think it would be better to rebuild Tcl/Tk with VS 2019 for cpython-bin-deps while we investigate the issue with the compiler.

    @zooba
    Copy link
    Member Author

    zooba commented Feb 28, 2022

    Thanks for the analysis. It should be fine to set PlatformToolset=v142 to choose the older compiler, so I'll give that a go.

    Anything I can do to help the compiler team figure out what's broken?

    @zooba
    Copy link
    Member Author

    zooba commented Feb 28, 2022

    I updated the builds in cpython-bin-deps and retriggered the PR tests.

    @zooba
    Copy link
    Member Author

    zooba commented Feb 28, 2022

    New changeset da7d99a by Steve Dower in branch 'main':
    bpo-46567: Add Tcl/Tk build for Windows ARM64 (GH-31574)
    da7d99a

    @zooba
    Copy link
    Member Author

    zooba commented Feb 28, 2022

    Build and tests were fine, and a test release build was too, so merging and closing this.

    Any new Tcl/Tk issues should get a new bug. If they only affect ARM64, just mention that in the issue.

    @zooba zooba closed this as completed Feb 28, 2022
    @zooba zooba closed this as completed Feb 28, 2022
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes OS-windows topic-tkinter type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants