Unfortunately, this didn’t work. I also tried
–with-tcl-include=/usr/include/tcl8.3 at the ./configure step and that
didn’t help either.
Looking at extconf.rb in ext/tcltklib, it seems that “ruby extconf.rb”
should pick up the include file in my system (but it doesn’t). I can debug
this a bit when I get home tonight.
Any other suggestions are welcome.
···
At Mon, 8 Sep 2003 07:11:31 +0900, > Jim Weirich wrote:
Although it is not finding it, I do have a tcl.h file in
/usr/include/tcl8.3.
$ make CONFIGURE_ARGS=‘–with-tcl-include=/usr/include/tcl8.3’
–
– Jim Weirich / Compuware
– FWP Capture Services
– Phone: 859-386-8855
-----Original Message-----
From: nobu.nokada@softhome.net [mailto:nobu.nokada@softhome.net]
Sent: Sunday, September 07, 2003 9:32 PM
To: ruby-talk@ruby-lang.org
Subject: Re: tcltklib not built with Ruby 1.8
Hi,
At Mon, 8 Sep 2003 07:11:31 +0900, > Jim Weirich wrote:
Although it is not finding it, I do have a tcl.h file in
/usr/include/tcl8.3.
$ make CONFIGURE_ARGS=‘–with-tcl-include=/usr/include/tcl8.3’
–
Nobu Nakada
Tricky but works …
cp /usr/include/tcl8.3/tcl.h to /usr/include
Weirich, James wrote:
···
At Mon, 8 Sep 2003 07:11:31 +0900, >>Jim Weirich wrote:
Although it is not finding it, I do have a tcl.h file in
/usr/include/tcl8.3.
$ make CONFIGURE_ARGS=‘–with-tcl-include=/usr/include/tcl8.3’
Unfortunately, this didn’t work. I also tried
–with-tcl-include=/usr/include/tcl8.3 at the ./configure step and that
didn’t help either.
Looking at extconf.rb in ext/tcltklib, it seems that “ruby extconf.rb”
should pick up the include file in my system (but it doesn’t). I can debug
this a bit when I get home tonight.
Any other suggestions are welcome.
–
General Electric - CIAT
Advanced Engineering Center
Rodrigo Bermejo
Information Technologies.
Dial-comm : *879-0644
Phone :(+52) 442-196-0644
mailto:rodrigo.bermejo@ps.ge.com
I had a problem on debian with both tcl8.3 and tcl8.4 installed - only
the headers for tcl8.3 were included (because of some annoying obsession
to decompose debian package in ‘runtime’ and ‘devel’) but the ruby
config was detecting the 8.4 libraries and trying to include files from
/usr/include/tcl8.4.
Well I guess you could modify the ruby setup script (in
ext/tcltklib/extconf.rb or something like that, I guess this would be
the nicest thing to do to debug it) or the makefile generated in
ext/tcltklib/Makefile, what I did is deinstall the 8.4 library, compile
ruby, then reinstall it (actually I first tried installing the 8.4
headers, but then ruby-tk would hang). IF you are having the same
problem I had, of course.
Nick
···
On Mon, 2003-09-08 at 10:51, Weirich, James wrote:
At Mon, 8 Sep 2003 07:11:31 +0900, > > Jim Weirich wrote:
Although it is not finding it, I do have a tcl.h file in
/usr/include/tcl8.3.
$ make CONFIGURE_ARGS=‘–with-tcl-include=/usr/include/tcl8.3’
Unfortunately, this didn’t work. I also tried
–with-tcl-include=/usr/include/tcl8.3 at the ./configure step and that
didn’t help either.
Looking at extconf.rb in ext/tcltklib, it seems that “ruby extconf.rb”
should pick up the include file in my system (but it doesn’t). I can debug
this a bit when I get home tonight.
Any other suggestions are welcome.
Well, not quite. Then it fails to find tclDecls.h. Copying that leads
to problems including tk.h … hmmm, not good.
But I got it to work. This is how: I modified the extconf.rb file to
include the line …
$CPPFLAGS << “-I/usr/include/tcl8.3”
immediately after the require ‘mkmkf’ line. Then (in the ext/tcltcklib
directory) I executed a ‘ruby extconf.rb’, a ‘make’, and then a ‘make
install’. And everything was cool.
There looks like there is code in the extconf.rb file to search out the
proper version of tcl/tk, but it only runs if the have_header(“tcl.h”)
function returns true. And that only is true if you already know
where to look for the header. Seems kinda backwards to me, but I don’t
hack with the mkmf.rb library very often…
···
On Mon, 2003-09-08 at 17:49, Bermejo, Rodrigo wrote:
Tricky but works …
cp /usr/include/tcl8.3/tcl.h to /usr/include
“Beware of bugs in the above code; I have only proved it correct,
not tried it.” – Donald Knuth (in a memo to Peter van Emde Boas)
As I wrote earlier, I have solved the problem by forcing CPPFLAGS to
include the tcl8.3 directory, but I want to respond to the following
suggestions …
Looking at extconf.rb in ext/tcltklib, it seems that “ruby extconf.rb”
should pick up the include file in my system (but it doesn’t). I can debug
this a bit when I get home tonight.
Can you show us the last part of mkmf.log?
Here it is …
==BEGIN====================================================================
have_header: checking for tcl.h… --------------------
gcc -E -I/home/jim/pkgs/ruby-1.8.0.x -I/home/jim/pkgs/ruby-1.8.0.x -g
-O2 -o conftest.i conftest.c
conftest.c:1:17: tcl.h: No such file or directory
checked program was:
/* begin /
#include <tcl.h>
/ end */
-------------------- no
==END======================================================================
Hidetoshi NAGAI nagai@ai.kyutech.ac.jp, writes:
How about the following?
$ cd ext/tcltklib
$ CONFIGURE_ARGS=‘–with-tcl-include=/usr/local/include/tcl8.3/
–with-tcllib=tcl8.3 --with-tklib=tk8.3 --enable-tcltk_stubs’ ruby
extconf.rb
If I remove the “local” directory from the above, then it does work. So
why doesn’t it pick it up automatically?
···
On Mon, 2003-09-08 at 21:15, nobu.nokada@softhome.net wrote:
“Beware of bugs in the above code; I have only proved it correct,
not tried it.” – Donald Knuth (in a memo to Peter van Emde Boas)
Hi,
As I wrote earlier, I have solved the problem by forcing CPPFLAGS to
include the tcl8.3 directory, but I want to respond to the following
suggestions …
It should be done by --with-tcl-include option. And
ext/extmk.rb looks CONFIGURE_ARGS environment variable.
At least, with moving tcl*.h to /usr/include/tcl8.3 and
lib/mkmf.rb in 1.8.0, it worked for me.
Looking at extconf.rb in ext/tcltklib, it seems that “ruby extconf.rb”
should pick up the include file in my system (but it doesn’t). I can debug
this a bit when I get home tonight.
Can you show us the last part of mkmf.log?
Here it is …
==BEGIN====================================================================
have_header: checking for tcl.h… --------------------
gcc -E -I/home/jim/pkgs/ruby-1.8.0.x -I/home/jim/pkgs/ruby-1.8.0.x -g
-O2 -o conftest.i conftest.c
-I option isn’t passed. Try
$ env CONFIGURE_ARGS=-I/usr/include/tcl8.3 make
in the top compile directory.
···
At Tue, 9 Sep 2003 11:23:24 +0900, Jim Weirich wrote:
–
Nobu Nakada
Thanks. I tried building everything from scratch with option 2 and it
picked it up fine. I’ll make note of this for future reference.
···
On Mon, 2003-09-08 at 22:42, Hidetoshi NAGAI wrote:
Well, in that case, probably you succeed to install by one of the
followings.
(1) $ cd ext/tcltklib
$ CONFIGURE_ARGS=‘–with-tcl-include=/usr/include/tcl8.3/’ ruby extconf.rb
(2) $ rm ext/tcltklib/Makefile
$ ./configure --with-tcl-include/usr/include/tcl8.3/
“Beware of bugs in the above code; I have only proved it correct,
not tried it.” – Donald Knuth (in a memo to Peter van Emde Boas)