Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 676
    • Issues 676
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

April 05-07 - Mercurial Paris Conference 2023 - One day of workshop dedicated to Heptapod and Mercurial usage and workflow. There are still places available for both workshops and talks!

  • PyPyPyPy
  • pypypypy
  • Issues
  • #3760
Closed
Open
Issue created Jun 03, 2022 by Matti Picus@mattipOwner

How to build tk/tcl _tkinter on macOS

Maybe related to #3697, #3538 (closed)

Disclaimer: I know nothing about xcode, homebrew. I am trying to fix our packaging script so it can build _tkinter, and cannot work out how CPython does it. This issue and PR seem relevant, but I don't see how they solve the problem. I have a M1 mini, running macOS 12.4 and xcode installed. I have a very minimal homebrew installed, but would prefer to use system libraries if possible.

This simple program (/tmp/test_tk.c) fails to compile on macOS:

#include <tk.h>

int main(int argc, const char *argv[]){
    return 0;
}

with the command line

cc -pthread -arch arm64 -DNDEBUG -O2 -fPIC -c /tmp/test_tk.c

It reports the error

In file included from /tmp/test_tk.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/tk.h:86:11: fatal error: 'X11/Xlib.h' file not found
#       include <X11/Xlib.h>
                ^~~~~~~~~~~~
1 error generated.

Now I see Xlib.h in various places, among them /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/Xlib.h, but how is the compiler meant to find it?

@mattbillenstein ideas?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking