[Ruby 1.9 - Bug #4835][Open] Compilation failure of ext/tk with recent ActiveTcl

Issue #4835 has been reported by Yuki S…


Bug #4835: Compilation failure of ext/tk with recent ActiveTcl

Author: Yuki S.
Status: Open
Priority: Normal
Assignee: Hidetoshi Nagai
Category: ext
Target version: 1.9.2
ruby -v: ruby 1.9.2p274 (2011-06-06) [i386-mswin32_100]

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.

Issue #4835 has been updated by Yuki S…

Priority changed from Normal to High


Bug #4835: Compilation failure of ext/tk with recent ActiveTcl

Author: Yuki S.
Status: Open
Priority: High
Assignee: Hidetoshi Nagai
Category: ext
Target version: 1.9.2
ruby -v: ruby 1.9.2p274 (2011-06-06) [i386-mswin32_100]

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.

From: Yuki S. [email protected]
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: [email protected]

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"’?

$B1J0f!wCNG=!%6e9)Bg$G$9!%(B

From: Nobuyoshi N. [email protected]
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: [email protected]

$CPPFLAGS$B$G$O$J$/(B$defs$B$r;H$C$F$_$F$/$@$5$$!#(B

$B$"$j$,$H$&$4$6$$$^$9!%(Bcommit $B$7$F$/$@$5$$!%(B

$B$J$+$@$G$9!#(B

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$B$G$O$J$/(B$defs$B$r;H$C$F$_$F$/$@$5$$!#(B

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}\"]