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

Please publish macOS Arm (or Universal 2) binaries #61

Open
aivarannamaa opened this issue Feb 6, 2024 · 5 comments
Open

Please publish macOS Arm (or Universal 2) binaries #61

aivarannamaa opened this issue Feb 6, 2024 · 5 comments

Comments

@aivarannamaa
Copy link

It looks like GitHub Actions is ready for this: https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/

@petasis
Copy link
Owner

petasis commented Feb 6, 2024

If only I new how to integrate github actions :-)

@Squiblydoo
Copy link

Squiblydoo commented Aug 2, 2024

Hi @petasis !
I am the new maintainer of tkinterdnd2 which uses your binaries and I saw that this is a common request.
I saw this thread this morning and didn't know how to use GitHub actions, but I found that it is fairly simple. I was able to fork your repository and successfully build for macOS ARM due to your helpful discussion here: #54

To make a GitHub action for compiling ARM binaries, do the following:

  1. Create a tcl-conf with the changes that you had recommended in the Issue I mentioned above. I have done that in my fork, and the result can be viewed here: https://github.com/Squiblydoo/tkdnd/blob/master/tcl-conf-arm
  2. Click "Actions" at the top of the repository.
  3. Use the template for CMake based, multi-platform projects
  4. Use the following workflow:
name: Build

on:
  push:
    branches:
      - master

jobs:
  release:
    runs-on: macos-14

    steps:
      - name: check out git repository
        uses: actions/checkout@v4
        
      - name: build
        run: |
          brew reinstall tcl-tk
          export PATH="/usr/local/opt/tcl-tk/bin:$PATH"
          export LDFLAGS="-L/usr/local/opt/tcl-tk/lib"
          export CPPFLAGS="-I/usr/local/opt/tcl-tk/include"
          export PKG_CONFIG_PATH="/usr/local/opt/tcl-tk/lib/pkgconfig"
          tclsh tcl-conf-arm
          make install arch=arm64
          
      - name: upload
        uses: actions/[email protected]
        with:
          name: arm64
          path: cmake/runtime/lib/tkdnd2.9.4

This workflow will compile the arm binaries and return the binary below.
image

EDIT: I updated the workflow file to resolve the warnings in the image.

@petasis
Copy link
Owner

petasis commented Jan 4, 2025

I have updated the AppVeyor CI workflow, to build macOS binaries for Sonoma (both x86_64 and arm64) through cross-compilation, for Tcl 9.0.1 (Homebrew).

Can you please verify that these binaries work? I have no access to any apple hardware to test them.

You can find the binaries at TkDND Github Releases (2.9.5). https://github.com/petasis/tkdnd/releases/tag/tkdnd-release-test-v2.9.5

@Squiblydoo
Copy link

Squiblydoo commented Jan 5, 2025

Thank you for the recent updates and for building these binaries.

I am currently in the process of verifying that they work.
In my initial tests, neither the x64 or ARM worked, but I am trying to verify that it isn't a problem on my end and how I am testing them. I primarily use TkDND through tkinterDnD2 which ships with the TkDND binaries, so I attempted to replace the binaries with the newly compiled ones, but they did not get loaded properly, so I am trying to assess where the failure is.
(I will admit I am fairly ignorant on how to use TkDND without tkinterDnD2.)

@Squiblydoo
Copy link

I apologize for taking forever to respond, I finally found an intelligent way to test the binaries.

I am currently testing the macos x64 binaries. I currently receive an error with 2.9.5 that I don't experience with 2.9.4. When loading the binary I receive the error

_tkinter.TclError: interpreter uses an incompatible stubs mechanism

Did anything significant change that would impact TCL stubs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants