Project

General

Profile

Actions

Bug #4835

closed

Compilation failure of ext/tk with recent ActiveTcl

Added by yugui (Yuki Sonoda) almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
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 1 (0 open1 closed)

Related to Backport192 - Backport #4802: Please backport r31742Rejectedyugui (Yuki Sonoda)Actions

Updated by yugui (Yuki Sonoda) almost 13 years ago

  • Priority changed from Normal to 5

Updated by nagai (Hidetoshi Nagai) almost 13 years ago

  • ruby -v changed from ruby 1.9.2p274 (2011-06-06) [i386-mswin32_100] to -

From: Yuki Sonoda
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:

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 ()
Department of Artificial Intelligence, Kyushu Institute of Technology

Updated by nagai (Hidetoshi Nagai) almost 13 years ago

From: Yuki Sonoda
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:

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 ()
Department of Artificial Intelligence, Kyushu Institute of Technology

Updated by nobu (Nobuyoshi Nakada) almost 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) almost 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) almost 13 years ago

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

From: Nobuyoshi Nakada
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:

$CPPFLAGSではなく$defsを使ってみてください。

ありがとうございます.commit してください.

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

Updated by nagai (Hidetoshi Nagai) almost 13 years ago

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

From: Nobuyoshi Nakada
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:

$CPPFLAGSではなく$defsを使ってみてください。

ありがとうございます.commit してください.

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

Actions #8

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0