This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: MacOSX: Tkinter build failure when building without command-line tools
Type: compile error Stage: resolved
Components: Build Versions: Python 3.3, Python 3.4, Python 2.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, furkanonder, hynek, ned.deily, ronaldoussoren
Priority: normal Keywords:

Created on 2013-12-12 12:11 by ronaldoussoren, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg205953 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2013-12-12 12:11
When you build python on an OSX 10.9 machine with Xcode but without the command-line tools installed that build mostly succeeds, but Tkinter fails to build.

The following error message is from a 2.7 build, but the same problem occurs when building 3.3 and 3.4:

clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Applications/ -fexceptions -g -O0 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tcl.framework/Versions/Current/PrivateHeaders -I/System/Library/Frameworks/Tk.framework/Headers -I/System/Library/Frameworks/Tk.framework/Versions/Current/PrivateHeaders -I/usr/X11R6/include -I/Users/ronald/Projects/python/rw/2.7/Mac/Include -I. -IInclude -I../Include -I/Users/ronald/Projects/python/rw/2.7/Include -I/Users/ronald/Projects/python/rw/2.7/build -c /Users/ronald/Projects/python/rw/2.7/Modules/_tkinter.c -o build/temp.macosx-10.8-intel-2.7-pydebug/Users/ronald/Projects/python/rw/2.7/Modules/_tkinter.o -framework Tk -arch x86_64 -arch i386
clang: warning: -framework Tk: 'linker' input unused
In file included from /Users/ronald/Projects/python/rw/2.7/Modules/_tkinter.c:71:
/Applications/ fatal error: 
      'X11/Xlib.h' file not found
#       include <X11/Xlib.h>
1 error generated.

NOTE: I haven't tried building with the command-line tools for xcode installed, I have a freshly installed system and want to try to live without these tools because that makes it easier to upgrade xcode.
msg365630 - (view) Author: Furkan Onder (furkanonder) * Date: 2020-04-02 21:45
You can try this solution,
msg415709 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2022-03-21 21:33
I think we can close this without further action as we no longer support using the Apple-supplied system Tcl and Tk and we know it is possible to build and link current version of Python 3.x with Tcl/Tk 8.6.8, at least, on macOS 10.9.
Date User Action Args
2022-04-11 14:57:55adminsetgithub: 64160
2022-03-21 21:33:13ned.deilysetstatus: open -> closed
resolution: out of date
messages: + msg415709

stage: needs patch -> resolved
2020-04-02 21:45:40furkanondersetnosy: + furkanonder
messages: + msg365630
2019-04-16 23:18:00berker.peksagsetnosy: + berker.peksag
2013-12-12 12:11:26ronaldoussorencreate