Bug #4853

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

Added by Nobuyoshi Nakada almost 3 years ago. Updated almost 3 years ago.

[ruby-dev:43655]
Status:Closed
Priority:Normal
Assignee:Hidetoshi Nagai
Category:ext
Target version:1.9.3
ruby -v:- Backport:

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 `': can't convert nil into String (TypeError)

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

{"TCLVERSION"=>"8.4",
"TCL
MAJORVERSION"=>"8",
"TCL
MINORVERSION"=>"4",
"TCL
PATCHLEVEL"=>".19",
"TCL
CC"=>"gcc",
"TCLDEFS"=>
" -DNO
VALUESH=1 -DHAVELIMITSH=1 -DHAVEUNISTDH=1" \
" -DHAVE
SYSPARAMH=1 -DUSETHREADALLOC=1 -DREENTRANT=1" \
" -D
THREADSAFE=1 -DHAVEPTHREADATTRSETSTACKSIZE=1" \
" -DHAVEPTHREADATFORK=1 -DTCLTHREADS=1" \
" -DHAVE
COREFOUNDATION=1 -DMACOSXTCL=1" \
" -DTCLWIDEINTISLONG=1 -DHAVEGETCWD=1 -DHAVEOPENDIR=1" \
" -DHAVESTRSTR=1 -DHAVESTRTOL=1 -DHAVESTRTOLL=1" \
" -DHAVE
STRTOULL=1 -DHAVETMPNAM=1 -DHAVEWAITPID=1" \
" -DHAVEGETPWUIDR5=1 -DHAVEGETPWUIDR=1" \
" -DHAVE
GETPWNAMR5=1 -DHAVEGETPWNAMR=1" \
" -DHAVEGETGRGIDR5=1 -DHAVEGETGRGIDR=1" \
" -DHAVE
GETGRNAMR5=1 -DHAVEGETGRNAMR=1" \
" -DHAVEMTSAFEGETHOSTBYNAME=1 -DHAVEMTSAFEGETHOSTBYADDR=1" \
" -DHAVESYSTIMEH=1 -DTIMEWITHSYSTIME=1 -DHAVETMZONE=1" \
" -DHAVEGMTIMER=1 -DHAVELOCALTIMER=1 -DHAVETMGMTOFF=1" \
" -DHAVETIMEZONEVAR=1 -DHAVESTBLKSIZE=1 -DSTDCHEADERS=1" \
" -DHAVE
SIGNEDCHAR=1 -DHAVELANGINFO=1 -DHAVECOPYFILEH=1" \
" -DHAVECOPYFILE=1 -DHAVELIBKERNOSATOMICH=1" \
" -DHAVEOSSPINLOCKLOCK=1 -DHAVEPTHREADATFORK=1 -DUSEVFORK=1" \
" -DTCLDEFAULTENCODING=\\"utf-8\\" -DTCLLOADFROMMEMORY=1" \
" -DHAVE
AVAILABILITYMACROSH=1 -DHAVEWEAKIMPORT=1" \
" -DHAVE
FTS=1 -DHAVESYSIOCTLH=1 -DHAVESYSFILIOH=1" \
" -DUSEDTRACE=1 -DTCLFRAMEWORK=1 ",
"TCLDBGX"=>"",
"TCL
CFLAGSDEBUG"=>"-g",
"TCL
CFLAGSOPTIMIZE"=>"-Os",
"TCL
LDFLAGSDEBUG"=>"",
"TCL
LDFLAGSOPTIMIZE"=>"",
"TCL
SHAREDBUILD"=>"1",
"TCL
LIBFILE"=>"Tcl",
"TCL
NEEDSEXPFILE"=>"0",
"TCLEXPORTFILESUFFIX"=>"",
"TCL
LIBS"=>" -lpthread -framework CoreFoundation ",
"TCLPREFIX"=>"/usr",
"TCL
EXECPREFIX"=>"/usr",
"TCL
SHLIBCFLAGS"=>"-fno-common",
"TCL
CFLAGSWARNING"=>"-Wall -fno-strict-aliasing",
"TCL
EXTRACFLAGS"=>" -pipe ",
"CC"=>"",
"CFLAGS"=>"",
"LDFLAGS"=>"",
"TCL
SHLIBLD"=>" -dynamiclib -Wl,-singlemodule",
"AR"=>"",
"TCLSTLIBLD"=>" cr",
"LIBS"=>"",
"TCLSHLIBLDLIBS"=>"",
"TCL
SHLIBSUFFIX"=>".dylib",
"TCL
DLLIBS"=>"",
"TCL
LDFLAGS"=>" -headerpadmaxinstallnames -Wl,-searchpathsfirst",
"TCLCCSEARCHFLAGS"=>"",
"TCL
LDSEARCHFLAGS"=>"",
"TCLCOMPATOBJS"=>"",
"TCLRANLIB"=>"ranlib",
"TCL
LIBFLAG"=>"-framework Tcl",
"TCL
BUILDLIBSPEC"=>
"-F/var/tmp/tcl/tcl-87~252/tcl84/Deployment -framework Tcl",
"TCLLIBSPEC"=>"-F/System/Library/Frameworks -framework Tcl",
"TCLINCLUDESPEC"=>
"-I/System/Library/Frameworks/Tcl.framework/Versions/8.4/Headers",
"TCLLIBVERSIONSOK"=>"ok",
"VERSION"=>"",
"DBGX"=>"",
"TCL
SHAREDLIBSUFFIX"=>".dylib",
"TCLUNSHAREDLIBSUFFIX"=>".a",
"TCL
SRCDIR"=>"/SourceCache/tcl/tcl-87/tcl84/tcl",
"TCL
PACKAGEPATH"=>
"~/Library/Tcl /Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /System/Library/Frameworks",
"TCL
SUPPORTSSTUBS"=>"1",
"TCL
STUBLIBFILE"=>"libtclstub8.4.a",
"TCLSTUBLIBFLAG"=>"-ltclstub8.4",
"TCL
BUILDSTUBLIBSPEC"=>
"-L/var/tmp/tcl/tcl-87~252/tcl84/Deployment -ltclstub8.4",
"TCL
STUBLIBSPEC"=>
"-L/System/Library/Frameworks/Tcl.framework/Versions/8.4 -ltclstub8.4",
"TCLBUILDSTUBLIBPATH"=>
"/var/tmp/tcl/tcl-87~252/tcl84/Deployment/libtclstub8.4.a",
"TCLSTUBLIBPATH"=>
"/System/Library/Frameworks/Tcl.framework/Versions/8.4/libtclstub8.4.a",
"TCL
THREADS"=>"1",
"configfilepath"=>"/System/Library/Frameworks/Tcl.framework/tclConfig.sh"}

{"TKVERSION"=>"8.4",
"TK
MAJORVERSION"=>"8",
"TK
MINORVERSION"=>"4",
"TK
PATCHLEVEL"=>".7",
"TK
DEFS"=>
" -DMACOSXTK -DTCLTHREADS=1 -DUSETHREADALLOC=1" \
" -D
REENTRANT=1 -DTHREADSAFE=1" \
" -DHAVEPTHREADATTRSETSTACKSIZE=1 -DHAVEPTHREADATFORK=1" \
" -DHAVE
READDIRR=1 -DMACOSXTCL=1 -DHAVECFBUNDLE=1" \
" -DUSEVFORK=1 -DTCLDEFAULTENCODING=\\"utf-8\\"" \
" -DHAVE
GETCWD=1 -DHAVEOPENDIR=1 -DHAVESTRSTR=1" \
" -DHAVESTRTOL=1 -DHAVESTRTOLL=1 -DHAVESTRTOULL=1" \
" -DHAVE
TMPNAM=1 -DHAVEWAITPID=1 -DNOVALUESH=1" \
" -DHAVE
LIMITSH=1 -DHAVEUNISTDH=1 -DHAVESYSPARAMH=1" \
" -DHAVESYSTIMEH=1 -DTIMEWITHSYSTIME=1 -DHAVETMZONE=1" \
" -DHAVEGMTIMER=1 -DHAVELOCALTIMER=1 -DHAVETMGMTOFF=1" \
" -DHAVETIMEZONEVAR=1 -DHAVESTBLKSIZE=1 -DSTDCHEADERS=1" \
" -DHAVE
SIGNEDCHAR=1 -DHAVELANGINFO=1 -DHAVESYSIOCTLH=1" \
" -DHAVE
SYSFILIOH=1 -include tclArch.h ",
"TKSHAREDBUILD"=>"1",
"TKDBGX"=>"",
"TK
LIBFILE"=>"Tk",
"TK
LIBS"=>" -lpthread -framework CoreFoundation ",
"TKPREFIX"=>"/usr",
"TK
EXECPREFIX"=>"/usr",
"TK
XINCLUDES"=>
"-I/System/Library/Frameworks/Tk.framework/Versions/8.4/Headers",
"TKXLIBSW"=>"",
"TK
LIBFLAG"=>"",
"TK
BUILDLIBSPEC"=>"-F/var/tmp/tk/tk-64~33/tk -framework Tk",
"TKLIBSPEC"=>"-framework Tk",
"TKSRCDIR"=>"/BinaryCache/tk/tk-64~33/Symbols/SRC/tk/tk",
"TKCCSEARCHFLAGS"=>"",
"TK
LDSEARCHFLAGS"=>"",
"TKSTUBLIBFILE"=>"libtkstub8.4.a",
"TK
STUBLIBFLAG"=>"-ltkstub8.4",
"TKBUILDSTUBLIBSPEC"=>"-L/var/tmp/tk/tk-64~33/tk -ltkstub8.4",
"TKSTUBLIBSPEC"=>
"-L/System/Library/Frameworks/Tk.framework/Versions/8.4 -ltkstub8.4",
"TK
BUILDSTUBLIBPATH"=>"/var/tmp/tk/tk-64~33/tk/libtkstub8.4.a",
"TK
STUBLIBPATH"=>
"/System/Library/Frameworks/Tk.framework/Versions/8.4/libtkstub8.4.a",
"configfilepath"=>"/System/Library/Frameworks/Tk.framework/tkConfig.sh"}

=end

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

Associated revisions

Revision 32023
Added by Hidetoshi Nagai almost 3 years ago

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

History

#1 Updated by Nobuyoshi Nakada almost 3 years ago

#2 Updated by Hidetoshi Nagai almost 3 years ago

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

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

From: Nobuyoshi Nakada nobu@ruby-lang.org
Subject: [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: redmine.journal-17583.20110608054400@ruby-lang.org

trunkのext/tk/extconf.rbがDarwin 9.8で通りません。r31894でも
r31947でも同じです。
(snip)
TkConfigInfo['TKINCLUDE_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"]
  • (TclConfigInfo['TCLINCLUDE_SPEC'] ||= "") <<
  • TclConfigInfo['TCLINCLUDESPEC'][0,0] = " -I#{TkLibConfig["tcl-framework-header"].quote} " else
  • TclConfigInfo['TCLINCLUDE_SPEC'] = ""

    tclbase = File.join(TkLibConfig["tcltk-framework"], 'Tcl.framework')
    if tclver
    TclConfigInfo['TCLINCLUDE_SPEC'] <<
    @@ -1488,11 +1486,9 @@
    end

    if TkLib_Config["tk-framework-header"]

  • TkConfigInfo['TKINCLUDE_SPEC'] =

  • TkConfigInfo['TKINCLUDESPEC'][0,0] =
    " -I#{TkLib
    Config["tk-framework-header"].quote} "
    else

  • TkConfigInfo['TKINCLUDE_SPEC'] = ""

    tkbase = File.join(TkLibConfig["tcltk-framework"], 'Tk.framework')
    if tkver
    TkConfigInfo['TKINCLUDESPEC'] <<
    @@ -1889,6 +1885,11 @@
    tk
    idir = tclidir unless tkidir
    tkldir = tclldir unless tk_ldir

    +TclConfigInfo['TCLINCLUDESPEC'] ||= ""
    +TkConfig
    Info['TKINCLUDESPEC'] ||= ""
    +TclConfigInfo['TCLINCLUDESPEC'][0,0] = "-I#{tclidir.quote} " if tclidir
    +TkConfig
    Info['TKINCLUDESPEC'][0,0] = "-I#{tkidir.quote} " if tkidir
    +

    get tclConfig.sh/tkConfig.sh

    TkLibConfig["tcl-NG-path"] = []
    TkLib
    Config["tk-NG-path"] = []
    @@ -1908,9 +1909,6 @@
    TclConfigInfo['configfilepath'] ||= tclcfg
    TkConfig
    Info['configfilepath'] ||= tkcfg

    -TclConfigInfo['TCLINCLUDESPEC'] = "-I#{tclidir.quote}" if tcl_idir

    -TkConfigInfo['TKINCLUDESPEC'] = "-I#{tkidir.quote}" if tk_idir

    tkcfgdir = File.dirname(TkConfigInfo['configfilepath']) rescue nil
    tcl
    cfgdir = File.dirname(TclConfigInfo['configfilepath']) rescue nil

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

    if tclcfgdir

  • TclConfigInfo['TCLLIBS'] ||= ""
    ($INCFLAGS ||= "") << ' ' << TclConfigInfo['TCLINCLUDESPEC']
    $LDFLAGS << ' ' << TclConfig
    Info['TCLLIBS']
    if stubs
    @@ -1974,6 +1973,7 @@
    $LDFLAGS << " -L#{TkLib
    Config["tk-build-dir"].quote} -Wl,-R#{TkLibConfig["tk-build-dir"].quote}" if TkLibConfig["tk-build-dir"]

    if tkcfgdir

  • TkConfigInfo['TKLIBS'] ||= ""
    ($INCFLAGS ||= "") << ' ' << TkConfigInfo['TKINCLUDESPEC']
    $LDFLAGS << ' ' << TkConfig
    Info['TK_LIBS']
    if stubs

    永井 秀利 (nagai@ai.kyutech.ac.jp)
    九州工業大学大学院情報工学研究院知能情報工学研究系知能情報メディア部門助教

#3 Updated by Hidetoshi Nagai almost 3 years ago

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

From: Nobuyoshi Nakada nobu@ruby-lang.org
Subject: [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: redmine.journal-17583.20110608054400@ruby-lang.org

trunkのext/tk/extconf.rbがDarwin 9.8で通りません。r31894でも
r31947でも同じです。
(snip)
TkConfigInfo['TKINCLUDE_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"]
  • (TclConfigInfo['TCLINCLUDE_SPEC'] ||= "") <<
  • TclConfigInfo['TCLINCLUDESPEC'][0,0] = " -I#{TkLibConfig["tcl-framework-header"].quote} " else
  • TclConfigInfo['TCLINCLUDE_SPEC'] = ""

    tclbase = File.join(TkLibConfig["tcltk-framework"], 'Tcl.framework')
    if tclver
    TclConfigInfo['TCLINCLUDE_SPEC'] <<
    @@ -1488,11 +1486,9 @@
    end

    if TkLib_Config["tk-framework-header"]

  • TkConfigInfo['TKINCLUDE_SPEC'] =

  • TkConfigInfo['TKINCLUDESPEC'][0,0] =
    " -I#{TkLib
    Config["tk-framework-header"].quote} "
    else

  • TkConfigInfo['TKINCLUDE_SPEC'] = ""

    tkbase = File.join(TkLibConfig["tcltk-framework"], 'Tk.framework')
    if tkver
    TkConfigInfo['TKINCLUDESPEC'] <<
    @@ -1889,6 +1885,11 @@
    tk
    idir = tclidir unless tkidir
    tkldir = tclldir unless tk_ldir

    +TclConfigInfo['TCLINCLUDESPEC'] ||= ""
    +TkConfig
    Info['TKINCLUDESPEC'] ||= ""
    +TclConfigInfo['TCLINCLUDESPEC'][0,0] = "-I#{tclidir.quote} " if tclidir
    +TkConfig
    Info['TKINCLUDESPEC'][0,0] = "-I#{tkidir.quote} " if tkidir
    +

    get tclConfig.sh/tkConfig.sh

    TkLibConfig["tcl-NG-path"] = []
    TkLib
    Config["tk-NG-path"] = []
    @@ -1908,9 +1909,6 @@
    TclConfigInfo['configfilepath'] ||= tclcfg
    TkConfig
    Info['configfilepath'] ||= tkcfg

    -TclConfigInfo['TCLINCLUDESPEC'] = "-I#{tclidir.quote}" if tcl_idir

    -TkConfigInfo['TKINCLUDESPEC'] = "-I#{tkidir.quote}" if tk_idir

    tkcfgdir = File.dirname(TkConfigInfo['configfilepath']) rescue nil
    tcl
    cfgdir = File.dirname(TclConfigInfo['configfilepath']) rescue nil

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

    if tclcfgdir

  • TclConfigInfo['TCLLIBS'] ||= ""
    ($INCFLAGS ||= "") << ' ' << TclConfigInfo['TCLINCLUDESPEC']
    $LDFLAGS << ' ' << TclConfig
    Info['TCLLIBS']
    if stubs
    @@ -1974,6 +1973,7 @@
    $LDFLAGS << " -L#{TkLib
    Config["tk-build-dir"].quote} -Wl,-R#{TkLibConfig["tk-build-dir"].quote}" if TkLibConfig["tk-build-dir"]

    if tkcfgdir

  • TkConfigInfo['TKLIBS'] ||= ""
    ($INCFLAGS ||= "") << ' ' << TkConfigInfo['TKINCLUDESPEC']
    $LDFLAGS << ' ' << TkConfig
    Info['TK_LIBS']
    if stubs

    永井 秀利 (nagai@ai.kyutech.ac.jp)
    九州工業大学大学院情報工学研究院知能情報工学研究系知能情報メディア部門助教

#4 Updated by Nobuyoshi Nakada almost 3 years ago

なかだです。

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

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

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

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

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

#5 Updated by Nobuyoshi Nakada almost 3 years ago

なかだです。

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

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

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

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

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

#6 Updated by Hidetoshi Nagai almost 3 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]

Also available in: Atom PDF