Project

General

Profile

Actions

Bug #4853

closed

ext/tk/extconf.rb fails on Mac OS X

Added by nobu (Nobuyoshi Nakada) over 13 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
-
Backport:
[ruby-dev:43655]

Description

=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=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_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


Files

config_list (773 Bytes) config_list nobu (Nobuyoshi Nakada), 06/08/2011 05:44 AM

Updated by nagai (Hidetoshi Nagai) over 13 years ago

  • ruby -v changed from ruby 1.9.3dev (2011-06-07 trunk 31953) [i386-darwin9.8.0] to -

永井@知能.九工大です.

From: Nobuyoshi Nakada
Subject: [ruby-dev:43656] [Ruby 1.9 - Bug #4853] ext/tk/extconf.rb fails on Mac OS X
Date: Wed, 8 Jun 2011 05:44:00 +0900
Message-ID:

trunkのext/tk/extconf.rbがDarwin 9.8で通りません。r31894でも
r31947でも同じです。
(snip)
TkConfig_Info['TK_INCLUDE_SPEC']がセットされていないようです。

以下のパッチではいかがでしょうか?

Index: ext/tk/extconf.rb

--- ext/tk/extconf.rb (revision 31953)
+++ ext/tk/extconf.rb (working copy)
@@ -1467,11 +1467,9 @@
end

if TkLib_Config["tcl-framework-header"]
  • (TclConfig_Info['TCL_INCLUDE_SPEC'] ||= "") <<
  • TclConfig_Info['TCL_INCLUDE_SPEC'][0,0] =
    " -I#{TkLib_Config["tcl-framework-header"].quote} "
    else
  • TclConfig_Info['TCL_INCLUDE_SPEC'] = ""

  • tcl_base = File.join(TkLib_Config["tcltk-framework"], 'Tcl.framework')
    if tclver
    TclConfig_Info['TCL_INCLUDE_SPEC'] <<
    @@ -1488,11 +1486,9 @@
    end

    if TkLib_Config["tk-framework-header"]

  • TkConfig_Info['TK_INCLUDE_SPEC'] =

  • TkConfig_Info['TK_INCLUDE_SPEC'][0,0] =
    " -I#{TkLib_Config["tk-framework-header"].quote} "
    else
  • TkConfig_Info['TK_INCLUDE_SPEC'] = ""
  • tk_base = File.join(TkLib_Config["tcltk-framework"], 'Tk.framework')
    if tkver
    TkConfig_Info['TK_INCLUDE_SPEC'] <<
    @@ -1889,6 +1885,11 @@
    tk_idir = tcl_idir unless tk_idir
    tk_ldir = tcl_ldir unless tk_ldir

+TclConfig_Info['TCL_INCLUDE_SPEC'] ||= ""
+TkConfig_Info['TK_INCLUDE_SPEC'] ||= ""
+TclConfig_Info['TCL_INCLUDE_SPEC'][0,0] = "-I#{tcl_idir.quote} " if tcl_idir
+TkConfig_Info['TK_INCLUDE_SPEC'][0,0] = "-I#{tk_idir.quote} " if tk_idir
+

get tclConfig.sh/tkConfig.sh

TkLib_Config["tcl-NG-path"] = []
TkLib_Config["tk-NG-path"] = []
@@ -1908,9 +1909,6 @@
TclConfig_Info['config_file_path'] ||= tclcfg
TkConfig_Info['config_file_path'] ||= tkcfg

-TclConfig_Info['TCL_INCLUDE_SPEC'] = "-I#{tcl_idir.quote}" if tcl_idir
-TkConfig_Info['TK_INCLUDE_SPEC'] = "-I#{tk_idir.quote}" if tk_idir

tk_cfg_dir = File.dirname(TkConfig_Info['config_file_path']) rescue nil
tcl_cfg_dir = File.dirname(TclConfig_Info['config_file_path']) rescue nil

@@ -1950,6 +1948,7 @@
($LDFLAGS ||= "") << " -L#{TkLib_Config["tcl-build-dir"].quote} -Wl,-R#{TkLib_Config["tcl-build-dir"].quote}" if TkLib_Config["tcl-build-dir"]

if tcl_cfg_dir
  • TclConfig_Info['TCL_LIBS'] ||= ""
    ($INCFLAGS ||= "") << ' ' << TclConfig_Info['TCL_INCLUDE_SPEC']
    $LDFLAGS << ' ' << TclConfig_Info['TCL_LIBS']
    if stubs
    @@ -1974,6 +1973,7 @@
    $LDFLAGS << " -L#{TkLib_Config["tk-build-dir"].quote} -Wl,-R#{TkLib_Config["tk-build-dir"].quote}" if TkLib_Config["tk-build-dir"]
if tk_cfg_dir
  • TkConfig_Info['TK_LIBS'] ||= ""
    ($INCFLAGS ||= "") << ' ' << TkConfig_Info['TK_INCLUDE_SPEC']
    $LDFLAGS << ' ' << TkConfig_Info['TK_LIBS']
    if stubs

--
永井 秀利 ()
九州工業大学大学院情報工学研究院知能情報工学研究系知能情報メディア部門助教

Updated by nagai (Hidetoshi Nagai) over 13 years ago

永井@知能.九工大です.

From: Nobuyoshi Nakada
Subject: [ruby-dev:43656] [Ruby 1.9 - Bug #4853] ext/tk/extconf.rb fails on Mac OS X
Date: Wed, 8 Jun 2011 05:44:00 +0900
Message-ID:

trunkのext/tk/extconf.rbがDarwin 9.8で通りません。r31894でも
r31947でも同じです。
(snip)
TkConfig_Info['TK_INCLUDE_SPEC']がセットされていないようです。

以下のパッチではいかがでしょうか?

Index: ext/tk/extconf.rb

--- ext/tk/extconf.rb (revision 31953)
+++ ext/tk/extconf.rb (working copy)
@@ -1467,11 +1467,9 @@
end

if TkLib_Config["tcl-framework-header"]
  • (TclConfig_Info['TCL_INCLUDE_SPEC'] ||= "") <<
  • TclConfig_Info['TCL_INCLUDE_SPEC'][0,0] =
    " -I#{TkLib_Config["tcl-framework-header"].quote} "
    else
  • TclConfig_Info['TCL_INCLUDE_SPEC'] = ""

  • tcl_base = File.join(TkLib_Config["tcltk-framework"], 'Tcl.framework')
    if tclver
    TclConfig_Info['TCL_INCLUDE_SPEC'] <<
    @@ -1488,11 +1486,9 @@
    end

    if TkLib_Config["tk-framework-header"]

  • TkConfig_Info['TK_INCLUDE_SPEC'] =

  • TkConfig_Info['TK_INCLUDE_SPEC'][0,0] =
    " -I#{TkLib_Config["tk-framework-header"].quote} "
    else
  • TkConfig_Info['TK_INCLUDE_SPEC'] = ""
  • tk_base = File.join(TkLib_Config["tcltk-framework"], 'Tk.framework')
    if tkver
    TkConfig_Info['TK_INCLUDE_SPEC'] <<
    @@ -1889,6 +1885,11 @@
    tk_idir = tcl_idir unless tk_idir
    tk_ldir = tcl_ldir unless tk_ldir

+TclConfig_Info['TCL_INCLUDE_SPEC'] ||= ""
+TkConfig_Info['TK_INCLUDE_SPEC'] ||= ""
+TclConfig_Info['TCL_INCLUDE_SPEC'][0,0] = "-I#{tcl_idir.quote} " if tcl_idir
+TkConfig_Info['TK_INCLUDE_SPEC'][0,0] = "-I#{tk_idir.quote} " if tk_idir
+

get tclConfig.sh/tkConfig.sh

TkLib_Config["tcl-NG-path"] = []
TkLib_Config["tk-NG-path"] = []
@@ -1908,9 +1909,6 @@
TclConfig_Info['config_file_path'] ||= tclcfg
TkConfig_Info['config_file_path'] ||= tkcfg

-TclConfig_Info['TCL_INCLUDE_SPEC'] = "-I#{tcl_idir.quote}" if tcl_idir
-TkConfig_Info['TK_INCLUDE_SPEC'] = "-I#{tk_idir.quote}" if tk_idir

tk_cfg_dir = File.dirname(TkConfig_Info['config_file_path']) rescue nil
tcl_cfg_dir = File.dirname(TclConfig_Info['config_file_path']) rescue nil

@@ -1950,6 +1948,7 @@
($LDFLAGS ||= "") << " -L#{TkLib_Config["tcl-build-dir"].quote} -Wl,-R#{TkLib_Config["tcl-build-dir"].quote}" if TkLib_Config["tcl-build-dir"]

if tcl_cfg_dir
  • TclConfig_Info['TCL_LIBS'] ||= ""
    ($INCFLAGS ||= "") << ' ' << TclConfig_Info['TCL_INCLUDE_SPEC']
    $LDFLAGS << ' ' << TclConfig_Info['TCL_LIBS']
    if stubs
    @@ -1974,6 +1973,7 @@
    $LDFLAGS << " -L#{TkLib_Config["tk-build-dir"].quote} -Wl,-R#{TkLib_Config["tk-build-dir"].quote}" if TkLib_Config["tk-build-dir"]
if tk_cfg_dir
  • TkConfig_Info['TK_LIBS'] ||= ""
    ($INCFLAGS ||= "") << ' ' << TkConfig_Info['TK_INCLUDE_SPEC']
    $LDFLAGS << ' ' << TkConfig_Info['TK_LIBS']
    if stubs

--
永井 秀利 ()
九州工業大学大学院情報工学研究院知能情報工学研究系知能情報メディア部門助教

Updated by nobu (Nobuyoshi Nakada) over 13 years ago

なかだです。

At Wed, 08 Jun 2011 07:53:54 +0900 (JST),
Hidetoshi NAGAI wrote:

TkConfig_Info['TK_INCLUDE_SPEC']がセットされていないようです。

以下のパッチではいかがでしょうか?

これでいけました。ありがとうございます。

--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦

Updated by nobu (Nobuyoshi Nakada) over 13 years ago

なかだです。

At Wed, 08 Jun 2011 07:53:54 +0900 (JST),
Hidetoshi NAGAI wrote:

TkConfig_Info['TK_INCLUDE_SPEC']がセットされていないようです。

以下のパッチではいかがでしょうか?

これでいけました。ありがとうございます。

--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦

Actions #6

Updated by nagai (Hidetoshi Nagai) over 13 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r32023.
Nobuyoshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • ext/tk/extconf.rb: fails on Mac OS X [Ruby 1.9 - Bug #4853]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0