Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Python/Python3: Fix RuntimeError: tk.h version (8.6) doesn't match libtk.a version (8.5) - #41728

Closed
lambdalisue wants to merge 1 commit into
Homebrew:masterfrom
lambdalisue:hotfix/python_tkinter_issue_18657
Closed

lambdalisue wants to merge 1 commit into
Homebrew:masterfrom
lambdalisue:hotfix/python_tkinter_issue_18657

Conversation

@lambdalisue

Copy link
Copy Markdown

I couldn't install python with homebrewed Tk in Mac OS X Yostemite with a latest homebrew, homebrew/dupes. When I executed the following code, it fail with "RuntimeError: tk.h version (8.6) doesn't match libtk.a version (8.5)".

import Tkinter; root = Tkinter.Tk()

The problem was that CPPFLAGS and LDFLAGS for brewed Tk were specified to environment variable but Python (seems) prefer the CPPFLAGS in arguments specified to './configure', mean "-I#{MacOS.sdk_path}/usr/include" version is used.

Thus I add these flags into array and build flags at the end (but actually I'm not really familiar with Ruby... )
This commit would fix issue #18657

The problem was that CPPFLAGS and LDFLAGS for brewed Tk were specified to
environment variable but Python (seems) prefer the CPPFLAGS in arguments
specified to './configure', mean "-I#{MacOS.sdk_path}/usr/include" version
is used.

This commit would fix issue Homebrew#18657
@lambdalisue lambdalisue changed the title Fix RuntimeError: tk.h version (8.6) doesn't match libtk.a version (8.5) Python/Python3: Fix RuntimeError: tk.h version (8.6) doesn't match libtk.a version (8.5) Jul 15, 2015
@DomT4 DomT4 added the python label Jul 15, 2015
@tdsmith

tdsmith commented Jul 16, 2015

Copy link
Copy Markdown
Contributor

Thanks for the pull request! This looks reasonable; I'll review this more carefully soon. I think I know how to reproduce this but can you share the output of brew config?

@tdsmith tdsmith self-assigned this Jul 16, 2015
@lambdalisue

Copy link
Copy Markdown
Author

Sure but currently I don't have my Mac so give me a time to share my brew config.

@lambdalisue

Copy link
Copy Markdown
Author

Ok. Now I cannot reproduce the error with the latest homebrew (it seems the sourceforge for tk is down now, thus I just download archives from ftp and used it).
It seems updating the bottle solve the issue? not sure but somehow.

So should I close this issue or do you want to review anyway while the changes looked reasonable?

@chriscoderdr

Copy link
Copy Markdown

I'm experiencing the same issue.

Cristians-MacBook-Pro:~ cristianjgomez$ brew config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 6f4f74dc4ea040ccb17f2fecdd791a7e5b1eaa9b
Last commit: 38 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit haswell
OS X: 10.11-x86_64
Xcode: 6.4
CLT: 7.0.0.0.1.1440043355
Clang: 6.1 build 602
X11: N/A
System Ruby: 2.0.0-p645
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby
Java: 1.8.0_60

@tdsmith

tdsmith commented Sep 3, 2015

Copy link
Copy Markdown
Contributor

@cgomezmendez, you may be seeing that because your Xcode and CLT versions are out of sync. Can you try updating Xcode and seeing if this persists?

@helmi72 helmi72 mentioned this pull request Sep 8, 2015
@cclauss

cclauss commented Sep 14, 2015

Copy link
Copy Markdown
Contributor

I am getting these same errors when trying to upgrade to Python3 v3.5.0 on Mac OS X Lion (10.7.5) on an older iMac. I tried all the tricks that I know. I can install Python v2.7.10 with tcl-tk flawlessly but no luck installing Python3 v3.5.0 with or without tcl-tk. Would a "bottle install" work? What is the syntax for doing a bottle install?

@lendenmc

Copy link
Copy Markdown

Hi, I have the same kind of issue as @cclauss on OS X 10.7.5 trying to install Python 3 with Homebrew on my old MacBook. It used to work on my machine though. It only fails this time with the new Python 3.5.
FYI, this might be related with this reported bug here https://bugs.python.org/issue24844.

Here are my logs for brew install python3:

==> Downloading https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz
Already downloaded: /Library/Caches/Homebrew/python3-3.5.0.tar.xz
==> ./configure --prefix=/usr/local/Cellar/python3/3.5.0 --enable-ipv6 --datarootdir=/usr/local/Cellar/python3/3.5.0/share --datadir=/usr/local/Cellar/python3/3.5.0/share --enable-framework=/usr/local/Cellar/python3/3.5.0/Frameworks --without-ensurepip --without-gcc MACOSX_DEPLOYMENT_TARGET=10.7
==> make
    0x10277b310: i64 = TargetGlobalAddress<i1* @gil_drop_request.0.b> 0 [ID=4]
  0x10277ed10: i8 = Constant<1> [ID=2]
In function: take_gil
make: *** [Python/ceval.o] Error 1
make: *** Waiting for unfinished jobs....

READ THIS: https://git.io/brew-troubleshooting

These open issues may also help:
brew install python3 --universal fails https://github.com/Homebrew/homebrew/issues/37596
Python/Python3: Fix RuntimeError: tk.h version (8.6) doesn't match libtk.a version (8.5) https://github.com/Homebrew/homebrew/pull/41728

And here is my config:

HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: f66b9016f8583e79b2ec18fcaebf8bda7bf61c4d
Last commit: 5 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: dual-core 64-bit penryn
OS X: 10.7.5-i386
Xcode: 4.6.3
CLT: 4.6.0.0.1.1365549073
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: 2.7.7 => /opt/X11
System Ruby: 1.8.7-p358
Perl: /usr/bin/perl
Python: /usr/local/opt/pyenv/shims/python => /usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.2.2/bin/ruby
Java: 1.7.0_67, 1.6.0_65-b14-466.1

@veegee

veegee commented Sep 29, 2015

Copy link
Copy Markdown

Also getting this issue.

@rodrigc

rodrigc commented Sep 29, 2015

Copy link
Copy Markdown
Contributor

I am facing similar problems:

$ brew config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: e6fed6250bc58573b70a5ecafffaed74ba492f50
Last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: 8-core 64-bit haswell
OS X: 10.10.5-x86_64
Xcode: 7.0
CLT: N/A
Clang: 7.0 build 700
X11: 2.7.7 => /opt/X11
System Ruby: 2.0.0-p481
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_20
$ brew install --debug python3
Script started, output file is /tmp/foo.txt
/usr/local/Library/brew.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/python3.rb
/usr/local/Library/brew.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/xz.rb
/usr/local/Library/brew.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/pkg-config.rb
/usr/local/Library/brew.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/readline.rb
/usr/local/Library/brew.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/sqlite.rb
/usr/local/Library/brew.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/gdbm.rb
/usr/local/Library/brew.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/openssl.rb
/usr/local/Library/brew.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/makedepend.rb
/usr/local/Library/Homebrew/build.rb (Formulary::FromPathLoader): loading /usr/local/Library/Formula/python3.rb
/usr/local/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/readline.rb
/usr/local/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/sqlite.rb
/usr/local/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/gdbm.rb
/usr/local/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/openssl.rb
/usr/local/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/xz.rb
/usr/local/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/pkg-config.rb
/usr/local/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Library/Formula/makedepend.rb
==> Downloading https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz
Already downloaded: /Library/Caches/Homebrew/python3-3.5.0.tar.xz
==> Downloading https://bugs.python.org/file40478/xcode-stubs.diff
Already downloaded: /Library/Caches/Homebrew/python3--patch-029cc0dc72b1bcf4ddc5f913cc4a3fd970378073c6355921891f041aca2f8b12.diff
==> Patching
patching file Lib/distutils/ccompiler.py
patching file Lib/distutils/unixccompiler.py
==> ./configure --prefix=/usr/local/Cellar/python3/3.5.0 --enable-ipv6 --datarootdir=/usr/local/Cellar/python3/3.5.0/share --datadir=/usr/local/Cellar/python
Last 15 lines from /Users/crodrigues/Library/Logs/Homebrew/python3/01.configure:
CFLAGS=-isysroot  -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers
LDFLAGS=-isysroot 
MACOSX_DEPLOYMENT_TARGET=10.10

checking build system type... x86_64-apple-darwin14.5.0
checking host system type... x86_64-apple-darwin14.5.0
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... darwin
checking for --without-gcc... yes
checking for gcc... clang
checking whether the C compiler works... no
configure: error: in `/private/tmp/python320150929-4742-1myg8yp/Python-3.5.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
/usr/local/Library/Homebrew/debrew.rb:11:in `raise'

Here is the config.log:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by python configure 3.5, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure --prefix=/usr/local/Cellar/python3/3.5.0 --enable-ipv6 --datarootdir=/usr/local/Cellar/python3/3.5.0/share --datadir=/usr/local/Cellar/python3/3.5.0/share --enable-framework=/usr/local/Cellar/python3/3.5.0/Frameworks --without-ensurepip --without-gcc CPPFLAGS=-I/usr/include CFLAGS=-isysroot  -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers LDFLAGS=-isysroot  MACOSX_DEPLOYMENT_TARGET=10.10

## --------- ##
## Platform. ##
## --------- ##

hostname = Craigs-MacBook-Pro.local
uname -m = x86_64
uname -r = 14.5.0
uname -s = Darwin
uname -v = Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64

/usr/bin/uname -p = i386
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
     Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64
Kernel configured for up to 8 processors.
4 processors are physically available.
8 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 8.00 gigabytes
Default processor set: 218 tasks, 1279 threads, 8 processors
Load average: 2.95, Mach factor: 5.04
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/Library/ENV/4.3
PATH: /usr/local/opt/xz/bin
PATH: /usr/local/opt/pkg-config/bin
PATH: /usr/local/opt/sqlite/bin
PATH: /usr/local/opt/gdbm/bin
PATH: /usr/local/opt/openssl/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2899: checking build system type
configure:2913: result: x86_64-apple-darwin14.5.0
configure:2933: checking host system type
configure:2946: result: x86_64-apple-darwin14.5.0
configure:3058: checking for --enable-universalsdk
configure:3105: result: no
configure:3128: checking for --with-universal-archs
configure:3143: result: no
configure:3293: checking MACHDEP
configure:3499: result: darwin
configure:3520: checking for --without-gcc
configure:3543: result: yes
configure:3667: checking for gcc
configure:3694: result: clang
configure:3923: checking for C compiler version
configure:3932: clang --version >&5
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
configure:3943: $? = 0
configure:3932: clang -v >&5
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
configure:3943: $? = 0
configure:3932: clang -V >&5
clang: error: unsupported option '-V -isysroot'
configure:3943: $? = 1
configure:3932: clang -qversion >&5
clang: error: unknown argument: '-qversion'
clang: warning: no such sysroot directory: ''
configure:3943: $? = 1
configure:3963: checking whether the C compiler works
configure:3985: clang -isysroot  -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/include -isysroot  conftest.c  >&5
clang: warning: no such sysroot directory: ''
Undefined symbols for architecture x86_64:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:3989: $? = 1
configure:4027: result: no
configure: failed program was:
| /* confdefs.h */
| #define _GNU_SOURCE 1
| #define _NETBSD_SOURCE 1
| #define __BSD_VISIBLE 1
| #define _BSD_TYPES 1
| #define _DARWIN_C_SOURCE 1
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:4032: error: in `/private/tmp/python320150929-4742-1myg8yp/Python-3.5.0':
configure:4034: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-apple-darwin14.5.0
ac_cv_env_CC_set=set
ac_cv_env_CC_value=clang
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-isysroot  -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=-I/usr/include
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-isysroot '
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_MACHDEP_set=
ac_cv_env_MACHDEP_value=
ac_cv_env_PKG_CONFIG_LIBDIR_set=set
ac_cv_env_PKG_CONFIG_LIBDIR_value=/usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.10
ac_cv_env_PKG_CONFIG_PATH_set=set
ac_cv_env_PKG_CONFIG_PATH_value=/usr/local/opt/xz/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-apple-darwin14.5.0
ac_cv_prog_ac_ct_CC=clang

## ----------------- ##
## Output variables. ##
## ----------------- ##

ABIFLAGS=''
AR=''
ARCH_RUN_32BIT=''
ARFLAGS=''
ASDLGEN=''
BASECFLAGS=''
BASECPPFLAGS=''
BLDLIBRARY=''
BLDSHARED=''
BUILDEXEEXT=''
CC='clang'
CCSHARED=''
CFLAGS='-isysroot  -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers'
CFLAGSFORSHARED=''
CFLAGS_NODIST=''
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=''
CONFIG_ARGS=' '\''--prefix=/usr/local/Cellar/python3/3.5.0'\'' '\''--enable-ipv6'\'' '\''--datarootdir=/usr/local/Cellar/python3/3.5.0/share'\'' '\''--datadir=/usr/local/Cellar/python3/3.5.0/share'\'' '\''--enable-framework=/usr/local/Cellar/python3/3.5.0/Frameworks'\'' '\''--without-ensurepip'\'' '\''--without-gcc'\'' '\''CPPFLAGS=-I/usr/include'\'' '\''CFLAGS=-isysroot  -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers'\'' '\''LDFLAGS=-isysroot '\'' '\''MACOSX_DEPLOYMENT_TARGET=10.10'\'' '\''CC=clang'\'' '\''PKG_CONFIG_PATH=/usr/local/opt/xz/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig'\'' '\''PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.10'\'''
CPP=''
CPPFLAGS='-I/usr/include'
CXX='clang++'
DEFS=''
DLINCLDIR=''
DLLLIBRARY=''
DYNLOADFILE=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
ENSUREPIP=''
EXEEXT=''
EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
EXT_SUFFIX=''
FRAMEWORKALTINSTALLFIRST='frameworkinstallstructure '
FRAMEWORKALTINSTALLLAST='frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools'
FRAMEWORKINSTALLAPPSPREFIX='/Applications'
FRAMEWORKINSTALLFIRST='frameworkinstallstructure'
FRAMEWORKINSTALLLAST='frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools'
FRAMEWORKPYTHONW='frameworkpythonw'
FRAMEWORKUNIXTOOLSPREFIX='/usr/local/Cellar/python3/3.5.0'
GNULD=''
GREP=''
HAS_HG='no-repository'
HAVE_GETHOSTBYNAME=''
HAVE_GETHOSTBYNAME_R=''
HAVE_GETHOSTBYNAME_R_3_ARG=''
HAVE_GETHOSTBYNAME_R_5_ARG=''
HAVE_GETHOSTBYNAME_R_6_ARG=''
HGBRANCH=''
HGTAG=''
HGVERSION=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTSONAME=''
LDCXXSHARED=''
LDFLAGS='-isysroot '
LDLAST=''
LDLIBRARY=''
LDLIBRARYDIR=''
LDSHARED=''
LDVERSION=''
LIBC=''
LIBFFI_INCLUDEDIR=''
LIBM=''
LIBOBJS=''
LIBPL=''
LIBRARY=''
LIBS=''
LIBTOOL_CRUFT=''
LINKCC=''
LINKFORSHARED=''
LIPO_32BIT_FLAGS=''
LN=''
LTLIBOBJS=''
MACHDEP='darwin'
MACHDEP_OBJS=''
MAINCC=''
MKDIR_P=''
MULTIARCH=''
NO_AS_NEEDED=''
OBJEXT=''
OPCODEHGEN=''
OPT=''
OTHER_LIBTOOL_OPT=''
PACKAGE_BUGREPORT='http://bugs.python.org/'
PACKAGE_NAME='python'
PACKAGE_STRING='python 3.5'
PACKAGE_TARNAME='python'
PACKAGE_URL=''
PACKAGE_VERSION='3.5'
PATH_SEPARATOR=':'
PKG_CONFIG=''
PKG_CONFIG_LIBDIR='/usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.10'
PKG_CONFIG_PATH='/usr/local/opt/xz/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig'
PLATDIR=''
PLATFORM_TRIPLET=''
PY3LIBRARY=''
PYTHON=''
PYTHONFRAMEWORK='Python'
PYTHONFRAMEWORKDIR='Python.framework'
PYTHONFRAMEWORKIDENTIFIER='org.python.python'
PYTHONFRAMEWORKINSTALLDIR='/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework'
PYTHONFRAMEWORKPREFIX='/usr/local/Cellar/python3/3.5.0/Frameworks'
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
PY_ENABLE_SHARED=''
RANLIB=''
READELF=''
RUNSHARED=''
SGI_ABI=''
SHELL='/bin/sh'
SHLIBS=''
SHLIB_SUFFIX=''
SIGNAL_OBJS=''
SOABI=''
SOVERSION='1.0'
SRCDIRS=''
TCLTK_INCLUDES=''
TCLTK_LIBS=''
THREADHEADERS=''
THREADOBJ=''
TRUE=''
UNIVERSALSDK=''
UNIVERSAL_ARCH_FLAGS=''
USE_INLINE=''
USE_SIGNAL_MODULE=''
USE_THREAD_MODULE=''
VERSION='3.5'
_PYTHON_HOST_PLATFORM=''
ac_ct_AR=''
ac_ct_CC='clang'
ac_ct_CXX=''
ac_ct_READELF=''
bindir='${exec_prefix}/bin'
build='x86_64-apple-darwin14.5.0'
build_alias=''
build_cpu='x86_64'
build_os='darwin14.5.0'
build_vendor='apple'
datadir='/usr/local/Cellar/python3/3.5.0/share'
datarootdir='/usr/local/Cellar/python3/3.5.0/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-apple-darwin14.5.0'
host_alias=''
host_cpu='x86_64'
host_os='darwin14.5.0'
host_vendor='apple'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define _GNU_SOURCE 1
#define _NETBSD_SOURCE 1
#define __BSD_VISIBLE 1
#define _BSD_TYPES 1
#define _DARWIN_C_SOURCE 1

configure: exit 77

@rodrigc

rodrigc commented Sep 30, 2015

Copy link
Copy Markdown
Contributor

I ran brew doctor and saw this:

Warning: Xcode 7 lacks the 10.10 SDK which can cause some builds to fail.
We recommend installing the Command Line Tools with:
  xcode-select --install
to resolve this issue.

I ran xcode-select --install and re-ran brew install python3
and that seemed to work.

@veegee

veegee commented Sep 30, 2015

Copy link
Copy Markdown

@rodrigc's solution worked for me.

@abc2mit

abc2mit commented Sep 30, 2015

Copy link
Copy Markdown

@rodrigc It worked for me as well. I don't think we need this patch, just more explicit instructions to check the settings.

2:[20:44:01|~]$ brew install python3
==> Downloading https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz
Already downloaded: /Library/Caches/Homebrew/python3-3.5.0.tar.xz
==> Downloading https://bugs.python.org/file40478/xcode-stubs.diff
Already downloaded: /Library/Caches/Homebrew/python3--patch-029cc0dc72b1bcf4ddc5f913cc4a3fd970378073c6355921891f041aca2f8b12.diff
==> Patching
patching file Lib/distutils/ccompiler.py
patching file Lib/distutils/unixccompiler.py
==> ./configure --prefix=/usr/local/Cellar/python3/3.5.0 --enable-ipv6 --dataroo
Last 15 lines from /Users/mike/Library/Logs/Homebrew/python3/01.configure:
CFLAGS=-isysroot  -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers
LDFLAGS=-isysroot
MACOSX_DEPLOYMENT_TARGET=10.10

checking build system type... x86_64-apple-darwin14.5.0
checking host system type... x86_64-apple-darwin14.5.0
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... darwin
checking for --without-gcc... yes
checking for gcc... clang
checking whether the C compiler works... no
configure: error: in `/private/tmp/python320150929-11053-zu5w87/Python-3.5.0':
configure: error: C compiler cannot create executables
See `config.log' for more details

READ THIS: https://git.io/brew-troubleshooting

These open issues may also help:
Python/Python3: Fix RuntimeError: tk.h version (8.6) doesn't match libtk.a version (8.5) https://github.com/Homebrew/homebrew/pull/41728


3:[20:44:10|~]$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Xcode 7 lacks the 10.10 SDK which can cause some builds to fail.
We recommend installing the Command Line Tools with:
  xcode-select --install
to resolve this issue.


xc4:[20:44:58|~]$ xcode-select --install
xcode-select: note: install requested for command line developer tools


5:[20:45:03|~]$ brew install python3
==> Downloading https://homebrew.bintray.com/bottles/python3-3.5.0.yosemite.bott
######################################################################## 100.0%
==> Pouring python3-3.5.0.yosemite.bottle.3.tar.gz
==> /usr/local/Cellar/python3/3.5.0/bin/python3 -s setup.py --no-user-cfg instal
==> /usr/local/Cellar/python3/3.5.0/bin/python3 -s setup.py --no-user-cfg instal
==> /usr/local/Cellar/python3/3.5.0/bin/python3 -s setup.py --no-user-cfg instal
==> Caveats
Pip and setuptools have been installed. To update them
  pip3 install --upgrade pip setuptools

You can install Python packages with
  pip3 install <package>

They will install into the site-package directory
  /usr/local/lib/python3.5/site-packages

See: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md

.app bundles were installed.
Run `brew linkapps python3` to symlink these to /Applications.
==> Summary
🍺  /usr/local/Cellar/python3/3.5.0: 3416 files, 59M

@ieee8023

Copy link
Copy Markdown
xcode-select --install 

fixed it for me

@naics

naics commented Oct 31, 2015

Copy link
Copy Markdown

For me is not working:
==> ./configure --prefix=/usr/local/Cellar/python3/3.5.0 --enable-ipv6 --datarootdir=/usr/local/Cellar/python3/3.5.0/share --datadir=/usr/local/Cellar/python3/3.5.0/share --enable-framework=/usr/local/Cellar/python3/3.5.0/Frameworks --without-ensurepip --without-gcc MAC
==> make
Last 15 lines from /Users/andrea/Library/Logs/Homebrew/python3/02.make:
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -I/usr/local/opt/tcl-tk/include -I/usr/local/opt/tcl-tk/include -DPy_BUILD_CORE -o Python/codecs.o Python/codecs.c
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -I/usr/local/opt/tcl-tk/include -I/usr/local/opt/tcl-tk/include -DPy_BUILD_CORE -o Python/errors.o Python/errors.c
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -I/usr/local/opt/tcl-tk/include -I/usr/local/opt/tcl-tk/include -DPy_BUILD_CORE -o Python/frozenmain.o Python/frozenmain.c
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -I/usr/local/opt/tcl-tk/include -I/usr/local/opt/tcl-tk/include -DPy_BUILD_CORE -o Python/future.o Python/future.c
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -I/usr/local/opt/tcl-tk/include -I/usr/local/opt/tcl-tk/include -DPy_BUILD_CORE -o Python/getargs.o Python/getargs.c
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -I/usr/local/opt/tcl-tk/include -I/usr/local/opt/tcl-tk/include -DPy_BUILD_CORE -o Python/getcompiler.o Python/getcompiler.c
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -I/usr/local/opt/tcl-tk/include -I/usr/local/opt/tcl-tk/include -DPy_BUILD_CORE -o Python/getcopyright.o Python/getcopyright.c
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -I/usr/local/opt/tcl-tk/include -I/usr/local/opt/tcl-tk/include -DPy_BUILD_CORE -DPLATFORM='"darwin"' -o Python/getplatform.o ./Python/getplatform.c
fatal error: error in backend: Cannot select: 0x102651310: i8,ch = AtomicSwap 0x1029a7770, 0x102650c10, 0x102651110<Volatile ST1[@gil_drop_request.0.b]> [ID=7]
0x102650c10: i64 = X86ISD::WrapperRIP 0x10264f310 [ID=6]
0x10264f310: i64 = TargetGlobalAddress<i1* @gil_drop_request.0.b> 0 [ID=4]
0x102651110: i8 = Constant<1> [ID=2]
In function: take_gil
make: *** [Python/ceval.o] Error 1
make: *** Waiting for unfinished jobs....

Here is my configuration:
macpro:~ andrea$ brew config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 5ddbedc
Last commit: 5 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit core2
OS X: 10.7.5-i386
Xcode: 4.6.3
CLT: 4.6.0.0.1.1365549073
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: 2.7.8 => /opt/X11
System Ruby: 1.8.7-p358
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /Users/andrea/.rvm/rubies/ruby-2.2.1/bin/ruby
Java: 1.6.0_65-b14-462

Any idea on how to fix it?
Thanks

@mrkapqa

mrkapqa commented Nov 20, 2015

Copy link
Copy Markdown

does someone have a solution to update python3 to python3.5 on osx lion (10.7.5)?

Last 15 lines from /Users/jussiissa42/Library/Logs/Homebrew/python3/02.make:
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -DPy_BUILD_CORE -o Parser/printgrammar.o Parser/printgrammar.c
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -DPy_BUILD_CORE -o Parser/parsetok_pgen.o Parser/parsetok_pgen.c
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -DPy_BUILD_CORE -o Parser/pgenmain.o Parser/pgenmain.c
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/bltinmodule.o Python/bltinmodule.c
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/ceval.o Python/ceval.c
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/codecs.o Python/codecs.c
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/errors.o Python/errors.c
clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/frozenmain.o Python/frozenmain.c
fatal error: error in backend: Cannot select: 0x10276d510: i8,ch = AtomicSwap 0x1029a7600, 0x10276ce10, 0x10276d310<Volatile ST1[@gil_drop_request.0.b]> [ID=7]
0x10276ce10: i64 = X86ISD::WrapperRIP 0x1026a1d10 [ID=6]
0x1026a1d10: i64 = TargetGlobalAddress<i1* @gil_drop_request.0.b> 0 [ID=4]
0x10276d310: i8 = Constant<1> [ID=2]
In function: take_gil
make: *** [Python/ceval.o] Error 1
make: *** Waiting for unfinished jobs....

READ THIS: https://git.io/brew-troubleshooting

These open issues may also help:
OSX 10.7 Can't upgrade python3 to 3.5 #45923
gobject-introspection: add head, add python3 which requires head #45442
Python/Python3: Fix RuntimeError: tk.h version (8.6) doesn't match libtk.a version (8.5) #41728

@rodrigc

rodrigc commented Nov 20, 2015

Copy link
Copy Markdown
Contributor

Try:

brew update
brew doctor
brew install python3

@mrkapqa

mrkapqa commented Nov 21, 2015

Copy link
Copy Markdown

Craig Rodrigues schrieb:

Try:

|brew update
brew doctor
brew install python3
|

—
Reply to this email directly or view it on GitHub
#41728 (comment).

did that, plus installed xquartz mewwer version.
run again
brew update >> already up-to-date
brew doctor >> already up-to-date
brew install pyhton3

quite same issue

fatal error: error in backend: Cannot select: 0x10276d510: i8,ch =
AtomicSwap 0x1029a7600, 0x10276ce10, 0x10276d310<Volatile
ST1[@gil_drop_request.0.b]> [ID=7]
0x10276ce10: i64 = X86ISD::WrapperRIP 0x1026a1d10 [ID=6]
0x1026a1d10: i64 = TargetGlobalAddress<i1* @gil_drop_request.0.b> 0
[ID=4]
0x10276d310: i8 = Constant<1> [ID=2]
In function: take_gil
make: *** [Python/ceval.o] Error 1
make: *** Waiting for unfinished jobs....

@abc2mit

abc2mit commented Nov 21, 2015

Copy link
Copy Markdown

@mrkapqa You can try updating the command line tools to see if you can upgrade to the latest: https://developer.apple.com/downloads/

The issue is that you are also 4 versions out-of-date with OS X. The command line tools have also been updated to go along with them and Apple only updates the command line tools for the more recent version and the last version. Is there a reason why you aren't upgrading?

@mrkapqa

mrkapqa commented Nov 21, 2015

Copy link
Copy Markdown

Am 21.11.15 um 16:13 schrieb Mike Ho:

@mrkapqa https://github.com/mrkapqa You can try updating the command
line tools to see if you can upgrade to the latest:
https://developer.apple.com/downloads/

The issue is that you are also 4 versions out-of-date with OS X. The
command line tools have also been updated to go along with them and
Apple only updates the command line tools for the more recent version
and the last version. Is there a reason why you aren't upgrading?

—
Reply to this email directly or view it on GitHub
#41728 (comment).

i am on macmini 2.1 that can only support up to lion as far as i know.
(withouth tweaking around)
downloaded yesterday the latest command line tools i think, but hey,
maybe forgot a latest edition.
thanks , will check that

@rodrigc

rodrigc commented Nov 21, 2015

Copy link
Copy Markdown
Contributor

@mrkapqa : looks like you are hitting this compiler bug: https://llvm.org/bugs/show_bug.cgi?id=22094

Your only way out is to try to upgrade xcode

@mrkapqa

mrkapqa commented Nov 22, 2015

Copy link
Copy Markdown

Am 21.11.15 um 22:29 schrieb Craig Rodrigues:

@mrkapqa https://github.com/mrkapqa : looks like you are hitting
this compiler bug: https://llvm.org/bugs/show_bug.cgi?id=22094

Your only way out is to try to upgrade xcode

—
Reply to this email directly or view it on GitHub
#41728 (comment).

Hello all,

i found a solution.
using the already latest xcode for lion (4.6.3) it seems that the latest
command-line-tools (from march/april 2013, around 139 MB) are not
appropriate.
using CLT for Lion from latemarch2012 (around 180 MB) made it work.

Now MPV is brewed and active, but i cant play any videos , just hearing
sound.

it seems that macmini 2.1 is only giving opengl 1.4 whereas mpv requires
2.0 or 2.1 and above.

can someone please help to tweak the MPV configuration with another
video-driver as input to make video playback possible?

thanks alot!
richard

@MikeMcQuaid

Copy link
Copy Markdown
Member

Thanks for your contribution to Homebrew! Without people like you submitting PRs we couldn't run this project. You rock!

@MikeMcQuaid

Copy link
Copy Markdown
Member

Thanks for your contribution to Homebrew! Without people like you submitting PRs we couldn't run this project. You rock!

For future reference the preferred commit message format is python, python3: fix Tk error..

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
rpereira added a commit to rpereira/homebrew-core that referenced this pull request May 4, 2026
Fix RuntimeError: tk.h version (8.6) doesn't match libtk.a version (8.5)

The problem was that CPPFLAGS and LDFLAGS for brewed Tk were specified
to environment variable but Python (seems) prefer the CPPFLAGS in
arguments specified to './configure', mean
"-I#{MacOS.sdk_path}/usr/include" version is used.

Closes Homebrew/legacy-homebrew#18657.
Closes Homebrew/legacy-homebrew#41728.

Signed-off-by: Mike McQuaid <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.