I have installed ruby 1.6.7 on two computers using Red Hat 8.0 Linux.
This installs tcl in usr rather than usr/local. I want to use the Tk
extension.
On one computer the make for Ruby does not compile tcltklib. It seems to
just pass over it. The log from make goes
compiling tcltklib
compiling tk
and it then compiles tkutil.c and makes tkutil.so but does not touch
tcltklib.
On the other installation it does make tcltklib.so. The only difference
I can identify is that the second computer had Red Hat 8 as an upgrade
from RH 7.2, and the first computer has it as a new installation.
Is there anything I can do to force make to build tcltklib?
I have installed ruby 1.6.7 on two computers using Red Hat 8.0 Linux.
This installs tcl in usr rather than usr/local. I want to use the Tk
extension.
On one computer the make for Ruby does not compile tcltklib. It seems to
just pass over it. The log from make goes
compiling tcltklib
compiling tk
and it then compiles tkutil.c and makes tkutil.so but does not touch
tcltklib.
On the other installation it does make tcltklib.so. The only difference
I can identify is that the second computer had Red Hat 8 as an upgrade
from RH 7.2, and the first computer has it as a new installation.
Is there anything I can do to force make to build tcltklib?
Thank you
John Fletcher
I also have tried building Ruby 1.6.8 with the same result.
Looking in the archive I can find this question asked a number of times on
different systems but no answer.
I have installed ruby 1.6.7 on two computers using Red Hat 8.0 Linux.
This installs tcl in usr rather than usr/local. I want to use the Tk
extension.
On one computer the make for Ruby does not compile tcltklib. It seems to
just pass over it. The log from make goes
compiling tcltklib
compiling tk
and it then compiles tkutil.c and makes tkutil.so but does not touch
tcltklib.
On the other installation it does make tcltklib.so. The only difference
I can identify is that the second computer had Red Hat 8 as an upgrade
from RH 7.2, and the first computer has it as a new installation.
Is there anything I can do to force make to build tcltklib?
Thank you
John Fletcher
The solution to this problem is quite simple. Ensure that all the needed
components are installed. These are tcl and tk and also the X11 development
tools. I am posting this so that it can be found by other people with the
same query. I noticed in the archive a number of similar postings on a
variety of different Unix systems.
I have tried specifying
--with-tcl-include=/usr/include
etc and nothing seems to make a difference.
Well, try to cd to ext/tcltklib and run ruby extconf.rb to see what it say,
for example
svg% cd ext/tcltklib
svg%
svg% ruby extconf.rb
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for dlopen() in -ldl... yes
checking for log() in -lm... yes
checking for tcl.h... yes
checking for tk.h... yes
checking for XOpenDisplay() in -lX11... yes
checking for Tcl_FindExecutable() in -ltcl... yes
checking for Tk_Init() in -ltk... yes
creating Makefile
svg%
be sure to have all header and libraries installed
I have tried specifying
–with-tcl-include=/usr/include
etc and nothing seems to make a difference.
Well, try to cd to ext/tcltklib and run ruby extconf.rb to see what it say,
for example
svg% cd ext/tcltklib
svg%
svg% ruby extconf.rb
checking for t_open() in -lnsl… no
checking for socket() in -lsocket… no
checking for dlopen() in -ldl… yes
checking for log() in -lm… yes
checking for tcl.h… yes
checking for tk.h… yes
checking for XOpenDisplay() in -lX11… yes
checking for Tcl_FindExecutable() in -ltcl… yes
checking for Tk_Init() in -ltk… yes
creating Makefile
svg%
be sure to have all header and libraries installed
Guy Decoux
Thanks for this.
I can now run the script above.
I still get a no for tk.h although I have told it where it is (usr/include) and
it finds tcl.h in the same location.
The readme file does not describe any of these options.
What should --with-tk-dir point to if I already have --with-tk-include and
–with-tk-lib?
checking for t_open() in -lnsl… no
checking for socket() in -lsocket… no
checking for dlopen() in -ldl… yes
checking for log() in -lm… yes
checking for tcl.h… yes
checking for tk.h… yes
checking for XOpenDisplay() in -lX11… yes
checking for Tcl_FindExecutable() in -ltcl… yes
checking for Tk_Init() in -ltk… yes
creating Makefile
[snip]
I am also having trouble getting tcltklib compiled. When I manually
run ‘ruby extconf.rb’ I get the following:
ruby extconf.rb
checking for t_open() in -lnsl… no
checking for socket() in -lsocket… no
checking for dlopen() in -ldl… yes
checking for log() in -lm… yes
checking for tcl.h… yes
checking for tk.h… yes
checking for XOpenDisplay() in -lX11… yes
checking for Tcl_FindExecutable() in -ltcl… yes
I don’t get the last two lines cited above.
Which means, I guess, that Tk-Init() in -ltk is not found (although
this check fails silently). Does anyone have any suggestions?
I can now run the script above.
I still get a no for tk.h although I have told it where it is (usr/include)
and it finds tcl.h in the same location.
The readme file does not describe any of these options.
What should --with-tk-dir point to if I already have --with-tk-include and
–with-tk-lib?
Try to give options at running extconf.rb and show us mkmf.log.
(e.g. ruby extconf.rb --with-tcllib=tcl8.3 --with-tklib=tk8.3 … )
The log message maybe useful to avoid the trouble.
On [ruby-list:37767], it was reported that configure script fails to
pass the given options to extconf.rb for tcltklib.
I don’t know the reason. I don’t check scripts yet.
I still get a no for tk.h although I have told it where it is (usr/include) and
it finds tcl.h in the same location.
Well, it is trying to compile this program (gcc -E)
/* begin / #include <tk.h>
/ end */
If it say ‘no’, this means that some header (probably X11) are not found
Guy Decoux
I think that is the problem. I cannot find the X11 header. It will be a Red Hat
install option which somehow got missed - develop for X windows or something like
that.
I still get a no for tk.h although I have told it where it is (usr/include) and
it finds tcl.h in the same location.
Well, it is trying to compile this program (gcc -E)
/* begin / #include <tk.h>
/ end */
If it say ‘no’, this means that some header (probably X11) are not found
Guy Decoux
I think that is the problem. I cannot find the X11 header. It will be a Red Hat
install option which somehow got missed - develop for X windows or something like
that.
Thanks for all your help.
John
Yes. They should be in /usr/X11R6/include/X11 and they are not there. And the install
disks are at home. Ah well.