Where is Ruby 1.9 'TK' library?

A

Alex DeCaria

Roger said:
What happens if you try and run ruby extconf.rb?
-rp

I'm away from my system this week. When I return I'll try running ruby
extconf.rb and let you know the outcome.

Thanks --Alex
 
A

Alex DeCaria

Roger said:
What happens if you try and run ruby extconf.rb?
-rp

The results of running ruby extconf.rb are:

checking for ruby_native_thread_p() in ruby.h... yes
checking for rb_errinfo() in ruby.h... yes
checking for rb_safe_level() in ruby.h... yes
checking for struct RArray.ptr in ruby.h... no
checking for struct RArray.len in ruby.h... no
checking for tcl.h... no
checking for tcl.h in
/usr/local/include,/usr/pkg/include,/usr/include,/Tcl/include,/usr/local/include/tcl8.4,/usr/pkg/include/tcl8.4,/usr/include/tcl8.4,/Tcl/include/tcl8.4,/usr/local/include/tcl8.7,/usr/pkg/include/tcl8.7,/usr/include/tcl8.7,/Tcl/include/tcl8.7,/usr/local/include/tcl8.6,/usr/pkg/include/tcl8.6,/usr/include/tcl8.6,/Tcl/include/tcl8.6,/usr/local/include/tcl8.5,/usr/pkg/include/tcl8.5,/usr/include/tcl8.5,/Tcl/include/tcl8.5,/usr/local/include/tcl8.3,/usr/pkg/include/tcl8.3,/usr/include/tcl8.3,/Tcl/include/tcl8.3,/usr/local/include/tcl8.2,/usr/pkg/include/tcl8.2,/usr/include/tcl8.2,/Tcl/include/tcl8.2,/usr/local/include/tcl8.1,/usr/pkg/include/tcl8.1,/usr/include/tcl8.1,/Tcl/include/tcl8.1,/usr/local/include/tcl8.0,/usr/pkg/include/tcl8.0,/usr/include/tcl8.0,/Tcl/include/tcl8.0,/usr/local/include/tcl7.6,/usr/pkg/include/tcl7.6,/usr/include/tcl7.6,/Tcl/include/tcl7.6...
yes
checking for tk.h... yes
checking for Tcl_FindExecutable() in -ltcl8.4... no
checking for Tcl_FindExecutable() in -ltcl84... yes
checking for Tk_Init() in -ltk8.4... no
checking for Tk_Init() in -ltk84... yes
checking for rb_hash_lookup() in ruby.h... yes
creating Makefile

As a reminder, I have ActiveState Tcl/Tk 8.4 installed in C:\Tcl

--Alex
 
R

Roger Pack

checking for tk.h... yes
checking for Tcl_FindExecutable() in -ltcl8.4... no
checking for Tcl_FindExecutable() in -ltcl84... yes
checking for Tk_Init() in -ltk8.4... no
checking for Tk_Init() in -ltk84... yes
checking for rb_hash_lookup() in ruby.h... yes
creating Makefile

And then when you run make?
-r
 
A

Alex DeCaria

And then when you run make?
-r

after running 'make' the results are:

gcc -shared -s -o tcltklib.so stubs.o tcltklib.o -L. -LC:/Ruby19/lib
-LC:/Tcl/lib -L. -Wl,--enable-auto-image-base,--enable-auto-import
-lmsvcrt-ruby191 -ltk84 -ltcl84 -lshell32 -lws2_32

Then I do 'make install' and get the contents of the attached .txt file.

After all is said and done, then when I try to run a ruby tk app I get
the following error:

C:/Ruby19/lib/ruby/site_ruby/1.9.1/tk.rb:7 in `require': no such file to
load - tkutil (Load Error)
from C:/Ruby19/lib/ruby/site_ruby/1.9.1/tk.rb:7:in `<top
(required)>'

--Alex

Attachments:
http://www.ruby-forum.com/attachment/4581/log_install.txt
 
R

Roger Pack

Alex said:
after running 'make' the results are:

gcc -shared -s -o tcltklib.so stubs.o tcltklib.o -L. -LC:/Ruby19/lib
-LC:/Tcl/lib -L. -Wl,--enable-auto-image-base,--enable-auto-import
-lmsvcrt-ruby191 -ltk84 -ltcl84 -lshell32 -lws2_32

that it odd it should be creating several .so files

e:\>gem which tkutil
E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/tk_as_gem-0.1.0/lib/tkutil.so

e:\>gem which tcltklib
E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/tk_as_gem-0.1.0/lib/tcltklib.so

What does yours say for those commands after installing the gem? My
guess is that they exist but somehow aren't finding the dll's right or
something.

If you have the file tkutil.so, you can train "dependency walker" on it
[1], and it might inform you of missing dependencies or what not...
Let me know how it goes.
-r
[1] http://www.dependencywalker.com/
 
A

Alex DeCaria

gem which tkutil results in:
ERROR: Can't find ruby library file or shared library tkutil

gem which tcltklib results in:
C:/Ruby19/lib/ruby/site_ruby/1.9.1/i386-msvcrt/tcltklib.so

If I search my entire C: drive for tkutil.so it finds a copy in my old
Ruby 1.8 installation, but not in the Ruby 1.9 installation. I don't
suppose I could just copy the file from the 1.8 install to the 1.9
install? If so, where should I put it?

--Alex
 
R

Roger Pack

gem which tcltklib results in:
C:/Ruby19/lib/ruby/site_ruby/1.9.1/i386-msvcrt/tcltklib.so

That's the built-in one, I think, not the gem one...and this is after a
successful gem install? "gem search tk_as_gem" lists something? what
does "gem which tk" yield?

You might get some traction in building the gem on you 32 bit box and
then copying over that entire ruby version to your 64 bit box, too.
GL!
-r
 
A

Alex DeCaria

Roger said:
You might get some traction in building the gem on you 32 bit box and
then copying over that entire ruby version to your 64 bit box, too.
GL!
-r

That worked! I copied the entire tk_as_gem-0.1.0 directory from my 32
bit install to the 64 bit machine, and it worked first time! Thanks for
the tip.

I have two additional questions:

1) Will the tk_as_gem work with a later version of Tcl/Tk, or do I need
to stick with the 8.4 version I am using now?

2) Any ideas as to why the Tk apps with Ruby 1.9 load so slow compared
to the way it was on Ruby 1.8?

Again, thanks for all your help. I'm happy that I can at least run my
apps now.

--Alex
 
R

Roger Pack

1) Will the tk_as_gem work with a later version of Tcl/Tk, or do I need
to stick with the 8.4 version I am using now?

I think it will work with 8.5
2) Any ideas as to why the Tk apps with Ruby 1.9 load so slow compared
to the way it was on Ruby 1.8?

Nope. If you can reproduce it in Linux, you could ping core and ask
them why they think it's slow (or anybody else out there?).

rp
 
H

Hidetoshi NAGAI

From: Roger Pack <[email protected]>
Subject: Re: Where is Ruby 1.9 'TK' library?
Date: Fri, 19 Mar 2010 04:21:30 +0900
Message-ID: said:
Nope. If you can reproduce it in Linux, you could ping core and ask
them why they think it's slow (or anybody else out there?).

I've had a trouble on extremely slow loading Ruby1.9/Tk on my linux box.
Then, the linux box worked fine. It had no other trouble.
Although I couldn't find the reason of why, it was gone after rebooting
the linux box.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,211
Latest member
NelleWilde

Latest Threads

Top