From: schneik@... Date: 2000-09-20T14:31:23+09:00 Subject: [ruby-talk:5021] Possible Ruby 1.6.0 Tk-related bug. Hi, First things first: # ruby -v ruby 1.6.0 (2000-09-19) [rs6000-aix4.3.2.0] .... cc -g -I/driver/tools/src/ruby/ruby-1.6.0 -I/driver/tools/src/ruby/ruby-1.6.0 -I/usr/local/include -DHAVE_ISENDWIN -DHAVE_UNGETCH -DHAVE_BEEP -DHAVE_DOUPDATE -DHAVE_FLASH -DHAVE_DELETELN -DHAVE_WDELETELN -c curses.c "/driver/tools/src/ruby/ruby-1.6.0/config.h", line 2.9: 1506-236 (W) Macro name _ALL_SOURCE has been redefined. "/driver/tools/src/ruby/ruby-1.6.0/config.h", line 2.9: 1506-358 (I) "_ALL_SOURCE" is defined on line 111 of /usr/include/standards.h. .... cc -g -I. -I. -I/usr/local/include -c util.c "config.h", line 2.9: 1506-236 (W) Macro name _ALL_SOURCE has been redefined. "config.h", line 2.9: 1506-358 (I) "_ALL_SOURCE" is defined on line 111 of /usr/include/standards.h. .... /usr/ccs/bin/ld -brtl -eInit_socket -bI:/driver/tools/src/ruby/ruby-1.6.0/ruby.imp -bM:SRE -T512 -H512 -lc -L/usr/local/lib -o socket.so socket.o getaddrinfo.o getnameinfo.o -lc ld: 0711-224 WARNING: Duplicate symbol: .gai_strerror ld: 0711-224 WARNING: Duplicate symbol: gai_strerror ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. .... The "make test" passed. I built Ruby with Tcl/Tk 8.3. Now for the major problem. When trying to run the (English version of the) ruby-tk81-demos (same as the RAA version), any demo that had, require "tkafter" did not display a window, although each demo kept the CPU very busy until interrupted. When interrupted, the following output was displayed: # ./widget ^C/usr/local/lib/ruby/1.6/tkafter.rb:316: Interrupt from ./widget:13:in `require' from ./widget:13 In each case, the line number corresponded to the require statement shown above. The good news is that other demos that don't use that require work, the simplest example being hello, ======================== # cat hello #!/usr/local/bin/ruby require 'tk' TkButton.new(nil, 'text'=>"Hello Ruby world!", 'font'=>TkFont.new('k14'), 'command'=>proc{print "Hello Ruby world!\n"; exit} ).pack Tk.mainloop ======================== (Actually, I had to remove the require 'tkencoding' statement from this demo to stop a stack overflow; I'm not sure why I hadn't previously removed it as I had done elsewhere, nor why I didn't previously see this error.) Conrad Schneiker (This note is unofficial and subject to improvement without notice.)