Tcltklib does not get compiled

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

John Fletcher wrote:

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.

John

Is there anything I can do to force make to build tcltklib?

When you run configure, you can give it some options to say where is
installed tcl, tk, ...

See [ruby-talk:58826]

http://www.ruby-talk.org/58826

Guy Decoux

John Fletcher wrote:

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.

John

ts wrote:

Is there anything I can do to force make to build tcltklib?

When you run configure, you can give it some options to say where is
installed tcl, tk, …

See [ruby-talk:58826]

http://www.ruby-talk.org/58826

Guy Decoux

I have tried specifying

–with-tcl-include=/usr/include

etc and nothing seems to make a difference.

John

Shouldn’t that be /usr/include/tcl8.3 ?

Ruben

···

On Tue, 10 Jun 2003, John Fletcher wrote:

I have tried specifying

–with-tcl-include=/usr/include

etc and nothing seems to make a difference.

John

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

Ruben Vandeginste wrote:

···

On Tue, 10 Jun 2003, John Fletcher wrote:

I have tried specifying

–with-tcl-include=/usr/include

etc and nothing seems to make a difference.

John

Shouldn’t that be /usr/include/tcl8.3 ?

Ruben

Thanks. tk.h and tcl.h are in /usr/include. The libs are in
/usr/lib/tcl8.3 /usr/lib/tk8.3

It still doesn’t work.

John

ts wrote:

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?

Thanks

John

[snip]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

[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?

Regards,

Mark

···

On Tuesday, June 10, 2003, at 08:50 AM, ts wrote:

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

Hi,

···

From: John Fletcher J.P.Fletcher@aston.ac.uk
Subject: Re: tcltklib does not get compiled.
Date: Tue, 10 Jun 2003 22:25:17 +0900
Message-ID: 3EE5D722.4341EA8B@aston.ac.uk

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.

                              Hidetoshi Nagai (nagai@ai.kyutech.ac.jp)

ts wrote:

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

John Fletcher wrote:

ts wrote:

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.

Thanks again.

John