Bug #4835
closedCompilation failure of ext/tk with recent ActiveTcl
Added by yugui (Yuki Sonoda) over 13 years ago. Updated over 13 years ago.
Description
Recent version of ActiveTcl contains "-Duintptr_t=unsigned\ int" in TCL_DEFS. But this escape by backslash is not recognized correctly by cl.exe. So compilation of ext/tk with Visual C++ fails.
Updated by yugui (Yuki Sonoda) over 13 years ago
- Priority changed from Normal to 5
Updated by nagai (Hidetoshi Nagai) over 13 years ago
- ruby -v changed from ruby 1.9.2p274 (2011-06-06) [i386-mswin32_100] to -
From: Yuki Sonoda yugui@yugui.jp
Subject: [ruby-dev:43635] [Ruby 1.9 - Bug #4835] Compilation failure of ext/tk with recent ActiveTcl
Date: Mon, 6 Jun 2011 14:44:47 +0900
Message-ID: redmine.journal-17531.20110606144436@ruby-lang.org
Recent version of ActiveTcl contains "-Duintptr_t=unsigned\ int" in TCL_DEFS. But this escape by backslash is not recognized correctly by cl.exe. So compilation of ext/tk with Visual C++ fails.
I don't have Visual C++.
Does it properly recognize '-D"uintptr_t=unsigned int"'?
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Department of Artificial Intelligence, Kyushu Institute of Technology
Updated by nagai (Hidetoshi Nagai) over 13 years ago
From: Yuki Sonoda yugui@yugui.jp
Subject: [ruby-dev:43635] [Ruby 1.9 - Bug #4835] Compilation failure of ext/tk with recent ActiveTcl
Date: Mon, 6 Jun 2011 14:44:47 +0900
Message-ID: redmine.journal-17531.20110606144436@ruby-lang.org
Recent version of ActiveTcl contains "-Duintptr_t=unsigned\ int" in TCL_DEFS. But this escape by backslash is not recognized correctly by cl.exe. So compilation of ext/tk with Visual C++ fails.
I don't have Visual C++.
Does it properly recognize '-D"uintptr_t=unsigned int"'?
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Department of Artificial Intelligence, Kyushu Institute of Technology
Updated by nobu (Nobuyoshi Nakada) over 13 years ago
なかだです。
At Mon, 6 Jun 2011 18:35:11 +0900,
Hidetoshi NAGAI wrote in [ruby-dev:43636]:
I don't have Visual C++.
Does it properly recognize '-D"uintptr_t=unsigned int"'?
$CPPFLAGSではなく$defsを使ってみてください。
diff --git i/ext/tk/extconf.rb w/ext/tk/extconf.rb
index ed150ef..255e09c 100644
--- i/ext/tk/extconf.rb
+++ w/ext/tk/extconf.rb
@@ -372,3 +372,3 @@ def collect_tcltk_defs(tcl_defs_str, tk_defs_str)
- defs.map{|ary| s = ary.join(''); (s.strip.empty?)? "": "-D" << s}.join(' ')
- defs.map{|ary| s = ary.join(''); (s.strip.empty?)? "": "-D" << s}
end
@@ -1944,3 +1944,3 @@ $CPPFLAGS ||= ""
$CPPFLAGS += " #{TkConfig_Info['TK_DEFS']}"¶
-$CPPFLAGS += collect_tcltk_defs(TclConfig_Info['TCL_DEFS'], TkConfig_Info['TK_DEFS'])
+$defs += collect_tcltk_defs(TclConfig_Info['TCL_DEFS'], TkConfig_Info['TK_DEFS'])
@@ -2020,5 +2020,4 @@ if (TkLib_Config["tcltk-framework"] ||
# create
- $CPPFLAGS ||= ""
- $CPPFLAGS << %[ -DRUBY_VERSION=\"#{RUBY_VERSION}\"]
- $CPPFLAGS << %[ -DRUBY_RELEASE_DATE=\"#{RUBY_RELEASE_DATE}\"]
- $defs << %[-DRUBY_VERSION=\"#{RUBY_VERSION}\"]
- $defs << %[-DRUBY_RELEASE_DATE=\"#{RUBY_RELEASE_DATE}\"]
--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦
Updated by nobu (Nobuyoshi Nakada) over 13 years ago
なかだです。
At Mon, 6 Jun 2011 18:35:11 +0900,
Hidetoshi NAGAI wrote in [ruby-dev:43636]:
I don't have Visual C++.
Does it properly recognize '-D"uintptr_t=unsigned int"'?
$CPPFLAGSではなく$defsを使ってみてください。
diff --git i/ext/tk/extconf.rb w/ext/tk/extconf.rb
index ed150ef..255e09c 100644
--- i/ext/tk/extconf.rb
+++ w/ext/tk/extconf.rb
@@ -372,3 +372,3 @@ def collect_tcltk_defs(tcl_defs_str, tk_defs_str)
- defs.map{|ary| s = ary.join(''); (s.strip.empty?)? "": "-D" << s}.join(' ')
- defs.map{|ary| s = ary.join(''); (s.strip.empty?)? "": "-D" << s}
end
@@ -1944,3 +1944,3 @@ $CPPFLAGS ||= ""
$CPPFLAGS += " #{TkConfig_Info['TK_DEFS']}"¶
-$CPPFLAGS += collect_tcltk_defs(TclConfig_Info['TCL_DEFS'], TkConfig_Info['TK_DEFS'])
+$defs += collect_tcltk_defs(TclConfig_Info['TCL_DEFS'], TkConfig_Info['TK_DEFS'])
@@ -2020,5 +2020,4 @@ if (TkLib_Config["tcltk-framework"] ||
# create
- $CPPFLAGS ||= ""
- $CPPFLAGS << %[ -DRUBY_VERSION=\"#{RUBY_VERSION}\"]
- $CPPFLAGS << %[ -DRUBY_RELEASE_DATE=\"#{RUBY_RELEASE_DATE}\"]
- $defs << %[-DRUBY_VERSION=\"#{RUBY_VERSION}\"]
- $defs << %[-DRUBY_RELEASE_DATE=\"#{RUBY_RELEASE_DATE}\"]
--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦
Updated by nagai (Hidetoshi Nagai) over 13 years ago
永井@知能.九工大です.
From: Nobuyoshi Nakada nobu@ruby-lang.org
Subject: [ruby-dev:43637] Re: [Ruby 1.9 - Bug #4835] Compilation failure of ext/tk with recent ActiveTcl
Date: Mon, 6 Jun 2011 19:03:09 +0900
Message-ID: 4deca5da.610c440a.10ed.ffff9e57@mx.google.com
$CPPFLAGSではなく$defsを使ってみてください。
ありがとうございます.commit してください.¶
永井 秀利 (nagai@ai.kyutech.ac.jp)
九州工業大学大学院情報工学研究院知能情報工学研究系知能情報メディア部門助教
Updated by nagai (Hidetoshi Nagai) over 13 years ago
永井@知能.九工大です.
From: Nobuyoshi Nakada nobu@ruby-lang.org
Subject: [ruby-dev:43637] Re: [Ruby 1.9 - Bug #4835] Compilation failure of ext/tk with recent ActiveTcl
Date: Mon, 6 Jun 2011 19:03:09 +0900
Message-ID: 4deca5da.610c440a.10ed.ffff9e57@mx.google.com
$CPPFLAGSではなく$defsを使ってみてください。
ありがとうございます.commit してください.¶
永井 秀利 (nagai@ai.kyutech.ac.jp)
九州工業大学大学院情報工学研究院知能情報工学研究系知能情報メディア部門助教
Updated by nobu (Nobuyoshi Nakada) over 13 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r31947.
Yuki, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- ext/tk/extconf.rb: use $defs not $CPPFLAGS to get rid of
command line escape issues on Windows. fixed #4835.