On Thu, 30 Mar 2006, Hidetoshi NAGAI wrote:

>> what would you suggest me to do?
>
> Oh, I'm sorry.
> SEGV trouble on Ruby/Tk depends on tcltklib.so.
> # Of course, if the trouble realy depends on Ruby/Tk. ;-)
> To check the reason, information of your environment
> (OS, nativethread suuport, library verion, and so on) are required.
>
> If you can, please report the followings.
>
> # If you can also, please try the latest tcltklib.

I suppose it *is* the latest, as it comes with ruby-1.8.4?

>  * ruby version

ruby 1.8.4 (2005-12-24) [i686-linux]

>  * configure options

none

>  * result of 'ruby -r tk -e 'p Tk::TK_PATCHLEVEL; p Tk::PLATFORM'

"8.4.7"
{"wordSize"=>"4", "user"=>"root", "machine"=>"i686", "platform"=>"unix", 
"osVersion"=>"2.6.8-24.20-default", "os"=>"Linux", 
"byteOrder"=>"littleEndian"}

>  * [depends on your OS] result of ldd your 'ruby' and 'tcltklib.so'

wybo>ldd /usr/local/bin/ruby
         linux-gate.so.1 =>  (0xffffe000)
         libdl.so.2 => /lib/libdl.so.2 (0x4002d000)
         libcrypt.so.1 => /lib/libcrypt.so.1 (0x40032000)
         libm.so.6 => /lib/tls/libm.so.6 (0x40064000)
         libc.so.6 => /lib/tls/libc.so.6 (0x40087000)
         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
wybo>ldd /usr/local/lib/ruby/1.8/i686-linux/tcltklib.so
         linux-gate.so.1 =>  (0xffffe000)
         libtk8.4.so => /usr/lib/libtk8.4.so (0x40029000)
         libtcl8.4.so => /usr/lib/libtcl8.4.so (0x40104000)
         libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x401ac000)
         libdl.so.2 => /lib/libdl.so.2 (0x402a8000)
         libcrypt.so.1 => /lib/libcrypt.so.1 (0x402ac000)
         libm.so.6 => /lib/tls/libm.so.6 (0x402de000)
         libc.so.6 => /lib/tls/libc.so.6 (0x40301000)
         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

OS: SuSE-9.2 kept up to date with its online update tool.

test prog:
#!/usr/local/bin/ruby -w
require 'tk'
class TkVariable
   def to_m
     "%.2f" % [self.to_i.abs/100.0]
   end
end
puts TkVariable.new(12345).to_m

Hope that helps...

-- 
Wybo