Issue #4853 has been reported by Nobuyoshi Nakada.

----------------------------------------
Bug #4853: ext/tk/extconf.rb fails on Mac OS X
http://redmine.ruby-lang.org/issues/4853

Author: Nobuyoshi Nakada
Status: Assigned
Priority: Normal
Assignee: Hidetoshi Nagai
Category: ext
Target version: 1.9.3
ruby -v: ruby 1.9.3dev (2011-06-07 trunk 31953) [i386-darwin9.8.0]


=begin
trunkのext/tk/extconf.rbがDarwin 9.8で通りません。r31894でも
r31947でも同じです。

  configuring tk
  check functions.........
  check struct members..
  check libraries....
  Use ActiveTcl libraries (if available).
  Search tclConfig.sh and tkConfig.sh...................................
  Valid [tclConfig.sh, tkConfig.sh] are found in [["/System/Library/Frameworks/Tcl.framework", "/System/Library/Frameworks/Tk.framework"], ["/usr/local/lib", "/usr/local/lib"], ["/System/Library/Frameworks/Tcl.framework/Versions/Current", "/System/Library/Frameworks/Tk.framework/Versions/Current"], ["/System/Library/Frameworks/Tcl.framework/Versions/8.4", "/System/Library/Frameworks/Tk.framework/Versions/8.4"]]
  Use [tclConfig.sh, tkConfig.sh] == ["/System/Library/Frameworks/Tcl.framework/tclConfig.sh", "/System/Library/Frameworks/Tk.framework/tkConfig.sh"]
  Use MacOS X Frameworks.
  /Users/nobu/src/ruby/git/trunk/src/ext/tk/extconf.rb:1978:in `<top (required)>': can't convert nil into String (TypeError)

TkConfig_Info['TK_INCLUDE_SPEC']がセットされていないようです。
TclCofnig_Infoと比べるとTkConfig_Infoはかなり小さいんですが、こういうものでしょうか。

  {"TCL_VERSION"=>"8.4",
   "TCL_MAJOR_VERSION"=>"8",
   "TCL_MINOR_VERSION"=>"4",
   "TCL_PATCH_LEVEL"=>".19",
   "TCL_CC"=>"gcc",
   "TCL_DEFS"=>
    " -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1" \
    " -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1" \
    " -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1" \
    " -DHAVE_PTHREAD_ATFORK=1 -DTCL_THREADS=1" \
    " -DHAVE_COREFOUNDATION=1 -DMAC_OSX_TCL=1" \
    " -DTCL_WIDE_INT_IS_LONG=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1" \
    " -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOLL=1" \
    " -DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1" \
    " -DHAVE_GETPWUID_R_5=1 -DHAVE_GETPWUID_R=1" \
    " -DHAVE_GETPWNAM_R_5=1 -DHAVE_GETPWNAM_R=1" \
    " -DHAVE_GETGRGID_R_5=1 -DHAVE_GETGRGID_R=1" \
    " -DHAVE_GETGRNAM_R_5=1 -DHAVE_GETGRNAM_R=1" \
    " -DHAVE_MTSAFE_GETHOSTBYNAME=1 -DHAVE_MTSAFE_GETHOSTBYADDR=1" \
    " -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1" \
    " -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1" \
    " -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1" \
    " -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_COPYFILE_H=1" \
    " -DHAVE_COPYFILE=1 -DHAVE_LIBKERN_OSATOMIC_H=1" \
    " -DHAVE_OSSPINLOCKLOCK=1 -DHAVE_PTHREAD_ATFORK=1 -DUSE_VFORK=1" \
    " -DTCL_DEFAULT_ENCODING=\\\"utf-8\\\" -DTCL_LOAD_FROM_MEMORY=1" \
    " -DHAVE_AVAILABILITYMACROS_H=1 -DHAVE_WEAK_IMPORT=1" \
    " -DHAVE_FTS=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1" \
    " -DUSE_DTRACE=1 -DTCL_FRAMEWORK=1 ",
   "TCL_DBGX"=>"",
   "TCL_CFLAGS_DEBUG"=>"-g",
   "TCL_CFLAGS_OPTIMIZE"=>"-Os",
   "TCL_LDFLAGS_DEBUG"=>"",
   "TCL_LDFLAGS_OPTIMIZE"=>"",
   "TCL_SHARED_BUILD"=>"1",
   "TCL_LIB_FILE"=>"Tcl",
   "TCL_NEEDS_EXP_FILE"=>"0",
   "TCL_EXPORT_FILE_SUFFIX"=>"",
   "TCL_LIBS"=>"  -lpthread -framework CoreFoundation ",
   "TCL_PREFIX"=>"/usr",
   "TCL_EXEC_PREFIX"=>"/usr",
   "TCL_SHLIB_CFLAGS"=>"-fno-common",
   "TCL_CFLAGS_WARNING"=>"-Wall -fno-strict-aliasing",
   "TCL_EXTRA_CFLAGS"=>" -pipe   ",
   "CC"=>"",
   "CFLAGS"=>"",
   "LDFLAGS"=>"",
   "TCL_SHLIB_LD"=>" -dynamiclib   -Wl,-single_module",
   "AR"=>"",
   "TCL_STLIB_LD"=>" cr",
   "LIBS"=>"",
   "TCL_SHLIB_LD_LIBS"=>"",
   "TCL_SHLIB_SUFFIX"=>".dylib",
   "TCL_DL_LIBS"=>"",
   "TCL_LD_FLAGS"=>" -headerpad_max_install_names -Wl,-search_paths_first",
   "TCL_CC_SEARCH_FLAGS"=>"",
   "TCL_LD_SEARCH_FLAGS"=>"",
   "TCL_COMPAT_OBJS"=>"",
   "TCL_RANLIB"=>"ranlib",
   "TCL_LIB_FLAG"=>"-framework Tcl",
   "TCL_BUILD_LIB_SPEC"=>
    "-F/var/tmp/tcl/tcl-87~252/tcl84/Deployment -framework Tcl",
   "TCL_LIB_SPEC"=>"-F/System/Library/Frameworks -framework Tcl",
   "TCL_INCLUDE_SPEC"=>
    "-I/System/Library/Frameworks/Tcl.framework/Versions/8.4/Headers",
   "TCL_LIB_VERSIONS_OK"=>"ok",
   "VERSION"=>"",
   "DBGX"=>"",
   "TCL_SHARED_LIB_SUFFIX"=>".dylib",
   "TCL_UNSHARED_LIB_SUFFIX"=>".a",
   "TCL_SRC_DIR"=>"/SourceCache/tcl/tcl-87/tcl84/tcl",
   "TCL_PACKAGE_PATH"=>
    "~/Library/Tcl /Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /System/Library/Frameworks",
   "TCL_SUPPORTS_STUBS"=>"1",
   "TCL_STUB_LIB_FILE"=>"libtclstub8.4.a",
   "TCL_STUB_LIB_FLAG"=>"-ltclstub8.4",
   "TCL_BUILD_STUB_LIB_SPEC"=>
    "-L/var/tmp/tcl/tcl-87~252/tcl84/Deployment -ltclstub8.4",
   "TCL_STUB_LIB_SPEC"=>
    "-L/System/Library/Frameworks/Tcl.framework/Versions/8.4 -ltclstub8.4",
   "TCL_BUILD_STUB_LIB_PATH"=>
    "/var/tmp/tcl/tcl-87~252/tcl84/Deployment/libtclstub8.4.a",
   "TCL_STUB_LIB_PATH"=>
    "/System/Library/Frameworks/Tcl.framework/Versions/8.4/libtclstub8.4.a",
   "TCL_THREADS"=>"1",
   "config_file_path"=>"/System/Library/Frameworks/Tcl.framework/tclConfig.sh"}

  {"TK_VERSION"=>"8.4",
   "TK_MAJOR_VERSION"=>"8",
   "TK_MINOR_VERSION"=>"4",
   "TK_PATCH_LEVEL"=>".7",
   "TK_DEFS"=>
    " -DMAC_OSX_TK -DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1" \
    " -D_REENTRANT=1 -D_THREAD_SAFE=1" \
    " -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1" \
    " -DHAVE_READDIR_R=1 -DMAC_OSX_TCL=1 -DHAVE_CFBUNDLE=1" \
    " -DUSE_VFORK=1 -DTCL_DEFAULT_ENCODING=\\\"utf-8\\\"" \
    " -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1" \
    " -DHAVE_STRTOL=1 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1" \
    " -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DNO_VALUES_H=1" \
    " -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1" \
    " -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1" \
    " -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1" \
    " -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1" \
    " -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_SYS_IOCTL_H=1" \
    " -DHAVE_SYS_FILIO_H=1 -include tclArch.h ",
   "TK_SHARED_BUILD"=>"1",
   "TK_DBGX"=>"",
   "TK_LIB_FILE"=>"Tk",
   "TK_LIBS"=>"  -lpthread -framework CoreFoundation ",
   "TK_PREFIX"=>"/usr",
   "TK_EXEC_PREFIX"=>"/usr",
   "TK_XINCLUDES"=>
    "-I/System/Library/Frameworks/Tk.framework/Versions/8.4/Headers",
   "TK_XLIBSW"=>"",
   "TK_LIB_FLAG"=>"",
   "TK_BUILD_LIB_SPEC"=>"-F/var/tmp/tk/tk-64~33/tk -framework Tk",
   "TK_LIB_SPEC"=>"-framework Tk",
   "TK_SRC_DIR"=>"/BinaryCache/tk/tk-64~33/Symbols/SRC/tk/tk",
   "TK_CC_SEARCH_FLAGS"=>"",
   "TK_LD_SEARCH_FLAGS"=>"",
   "TK_STUB_LIB_FILE"=>"libtkstub8.4.a",
   "TK_STUB_LIB_FLAG"=>"-ltkstub8.4",
   "TK_BUILD_STUB_LIB_SPEC"=>"-L/var/tmp/tk/tk-64~33/tk -ltkstub8.4",
   "TK_STUB_LIB_SPEC"=>
    "-L/System/Library/Frameworks/Tk.framework/Versions/8.4 -ltkstub8.4",
   "TK_BUILD_STUB_LIB_PATH"=>"/var/tmp/tk/tk-64~33/tk/libtkstub8.4.a",
   "TK_STUB_LIB_PATH"=>
    "/System/Library/Frameworks/Tk.framework/Versions/8.4/libtkstub8.4.a",
   "config_file_path"=>"/System/Library/Frameworks/Tk.framework/tkConfig.sh"}

=end



-- 
http://redmine.ruby-lang.org