On Thursday 18 July 2002 01:13 pm, Boris S. wrote:
> Hi,
>
> I tried to install Ruby with Ruby/Tk today. The problem is, that the
> tcltklib has not been built by make. Tcl and Tk are installed and working
> (I don't have any problems with Tk in Tcl). If I try to start a simple Ruby
> program with Tk instructions I get the following:
> /usr/local/lib/ruby/1.6/tk.rb:7_in 'require': No such file to load --
> tcltklib (LoadError) from /usr/local/lib/1.6/tk.rb:7
> 	from tk.ruby:1:in 'require'
> 	from tk.ruby:1
>
> After I wanted to compile Ruby one more time with Tk I noticed that it does
> not do anything to build tcltklib (but compiles ext/tk). So I checked
> (started it myself) the extconf.rb in the ext/tcltklib directory and
> noticed that it breaks after checking for tk.h (checking for tk.h ... no).
> The interesting thing is that it finds the tcl.h but tk.h and tcl.h are
> existing and 'whereis' finds them without problems:

Whereis, searches your whole tree, whereas make does not.  You are already 
part way home. (1) you know that you have to build tcltklib yourself using 
the extconf.rb, so done, (2)  you know that the necessary tcl/tk files exist, 
so done, and (3) you know that extconf.rb is not looking for them where you 
have them, so you must either (a) change where extconf.rb is looking or (b) 
copy or link them to where it is looking.

It appears that you (Mandrake?) installed Tcl/Tk with --prefix=/usr.  Yet, 
ruby installs, by default, with --prefix=/usr/local.  I compiled both from 
tarballs with --prefix=/usr and had no problems.   So, you might try 
compiling ruby with --prefix=/usr.  

I installed ruby according to the instructions in the README file:

./configure --prefix=/usr
make
make install

There are also some ruby-specific install files: install-sh, instruby.rb, 
mkconfig.rb, etc.  I don't know what these are for.  Someone else will have 
to explain these.  And if they are useful, then why does the README not 
mention them?  A well made tarball should also include an INSTALL file. 
>
> whereis tk.h
> tk: /usr/lib/tk8.3 /usr/include/tk.h ...
>
> whereis tcl.h
> tcl: /usr/lib/tcl8.3 /usr/include/tcl.h ...
>
> I'm using Mandrake 8.2 and also tried the rpm's , but in the rpm's it's not
> to be included ... Anyone had this problem or/and knows a solution?
>
> Bye
>   Boris S.
>
>
>
> P.S.: Ruby rocks! ;)