Project

General

Profile

Bug #4835

Compilation failure of ext/tk with recent ActiveTcl

Added by yugui (Yuki Sonoda) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
-
Backport:
[ruby-dev:43634]

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.


Related issues

Related to Backport192 - Backport #4802: Please backport r31742RejectedActions

Associated revisions

Revision 5b3bf854
Added by nobu (Nobuyoshi Nakada) over 8 years ago

  • ext/tk/extconf.rb: use $defs not $CPPFLAGS to get rid of command line escape issues on Windows. fixed #4835.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 31947
Added by nobu (Nobuyoshi Nakada) over 8 years ago

  • ext/tk/extconf.rb: use $defs not $CPPFLAGS to get rid of command line escape issues on Windows. fixed #4835.

Revision 31947
Added by nobu (Nobuyoshi Nakada) over 8 years ago

  • ext/tk/extconf.rb: use $defs not $CPPFLAGS to get rid of command line escape issues on Windows. fixed #4835.

Revision 31947
Added by nobu (Nobuyoshi Nakada) over 8 years ago

  • ext/tk/extconf.rb: use $defs not $CPPFLAGS to get rid of command line escape issues on Windows. fixed #4835.

Revision 31947
Added by nobu (Nobuyoshi Nakada) over 8 years ago

  • ext/tk/extconf.rb: use $defs not $CPPFLAGS to get rid of command line escape issues on Windows. fixed #4835.

Revision 31947
Added by nobu (Nobuyoshi Nakada) over 8 years ago

  • ext/tk/extconf.rb: use $defs not $CPPFLAGS to get rid of command line escape issues on Windows. fixed #4835.

Revision 31947
Added by nobu (Nobuyoshi Nakada) over 8 years ago

  • ext/tk/extconf.rb: use $defs not $CPPFLAGS to get rid of command line escape issues on Windows. fixed #4835.

Revision b8f2f0e5
Added by yugui (Yuki Sonoda) over 8 years ago

merges a part of r31742, r31947, r31894, r3202 and r32287 from trunk

into ruby_1_9_2.

* ex/tk/extconf.rb: support for the latest ActiveTcl with mingw.

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

* ext/tk/extconf.rb: fix for uninitialized global variables. [Ruby 1.9 - Bug #4811]

  • ext/tk/extconf.rb: use $defs not $CPPFLAGS to get rid of command line escape issues on Windows. fixed #4835.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@32386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

History

Updated by yugui (Yuki Sonoda) over 8 years ago

  • Priority changed from Normal to 5

Updated by nagai (Hidetoshi Nagai) over 8 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 8 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 8 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 8 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 8 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 8 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)
九州工業大学大学院情報工学研究院知能情報工学研究系知能情報メディア部門助教

#8

Updated by nobu (Nobuyoshi Nakada) over 8 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.

Also available in: Atom PDF