Issue #4974 has been updated by Jon Forums.


Thanks! It now works for me with MinGW (TDM-1) GCC 4.5.2. I'll check later with MinGW-W64 GCC 4.5.4 and report back if needed.

sh-3.1$ ruby --version
ruby 1.9.2p290 (2011-07-09 revision 32478) [i386-mingw32]
sh-3.1$ ruby -rtk -e 'puts Tk::TK_PATCHLEVEL'
8.5.10

 
----------------------------------------
Bug #4974: [ext/tk] ruby_1_9_2@32391 build failure with MinGW
http://redmine.ruby-lang.org/issues/4974

Author: Jon Forums
Status: Open
Priority: Normal
Assignee: Yuki Sonoda
Category: ext
Target version: 1.9.2
ruby -v: ruby 1.9.3dev (2011-07-04 trunk 32395) [i386-mingw32]


On Win7 Ultimate 32bit using either MinGW (TDM-1) GCC 4.5.2 or MinGW-W64 GCC 4.5.4 I get the following build failure. The baseruby used to build was `ruby 1.9.3dev (2011-07-04 trunk 32395) [i386-mingw32]` with RubyGems 1.8.5 and `rake, version 0.9.2.1`.

Note that trunk@32395 built without error as shown at the end.

...
compiling tk
Configure options for Ruby/Tk may be updated.
So, delete files which depend on old configs.
check functions.........
check struct members..
Use ActiveTcl libraries (if available).
Search tclConfig.sh (in C:/projects/rubyinstaller-git/sandbox/tcl/lib) and tkConfig.sh (in C:/projects/rubyinstaller-git/sandbox/tk/lib)..
WARNING: found "C:/projects/rubyinstaller-git/sandbox/tcl/lib/tclConfig.sh", but cannot find valid Tcl/Tk libraries on the same directory. So, ignore it.

WARNING: found "C:/projects/rubyinstaller-git/sandbox/tcl/lib/tclconfig.sh", but cannot find valid Tcl/Tk libraries on the same directory. So, ignore it.

Fail to find [tclConfig.sh, tkConfig.sh]
C:/Users/Jon/Documents/RubyDev/ruby-git/ext/tk/extconf.rb:1639:in `<top (required)>': undefined method `[]=' for nil:NilClass (NoMethodError)
        from ../../../../Users/Jon/Documents/RubyDev/ruby-git/ext/extmk.rb:156:in `load'
        from ../../../../Users/Jon/Documents/RubyDev/ruby-git/ext/extmk.rb:156:in `extmake'
        from ../../../../Users/Jon/Documents/RubyDev/ruby-git/ext/extmk.rb:445:in `block in <main>'
        from ../../../../Users/Jon/Documents/RubyDev/ruby-git/ext/extmk.rb:441:in `each'
        from ../../../../Users/Jon/Documents/RubyDev/ruby-git/ext/extmk.rb:441:in `<main>'

make: *** [mkmain.sh] Error 1
rake aborted!
Command failed with status (2): [make...]


SUCCESSFUL BUILD EXAMPLE
------------------------
...
check functions.........
check struct members..
Use ActiveTcl libraries (if available).
Search tclConfig.sh (in C:/projects/rubyinstaller-git/sandbox/tcl/lib) and tkConfig.sh (in C:/projects/rubyinstaller-git/sandbox/tk/lib)..
Valid [tclConfig.sh, tkConfig.sh] are found in [["C:/projects/rubyinstaller-git/sandbox/tcl/lib", "C:/projects/rubyinstaller-git/sandbox/tk/lib"]]
Use [tclConfig.sh, tkConfig.sh] == ["C:/projects/rubyinstaller-git/sandbox/tcl/lib/tclConfig.sh", "C:/projects/rubyinstaller-git/sandbox/tk/lib/tkConfig.sh"]

Find Tcl/Tk libraries. Make tcltklib.so which is required by Ruby/Tk.
...


Jon


-- 
http://redmine.ruby-lang.org