Re: tkConfig.sh vs. ./configure

Lists: pgsql-hackers
From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: tkConfig.sh vs. ./configure
Date: 2001-12-20 13:53:07
Message-ID: 20011220145306.F5767@zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


See:

./configure --prefix=/usr/lib/postgresql \
--with-unixodbc \
--enable-odbc \
--with-openssl \
--with-pam \
--with-python \
--with-perl \
--with-tcl \
--enable-nls \
--enable-multibyte \
--enable-recode \
--enable-locale

[--cut--]
checking for tclsh... /usr/bin/tclsh
checking for tclConfig.sh... /usr/lib/tcl8.3/tclConfig.sh
checking for tkConfig.sh... no
configure: error: file `tkConfig.sh' is required for Tk

..hmm, I try:

$ ls -la /usr/lib/tk8.3/tkConfig.sh
-rw-r--r-- 1 root root 3194 Oct 27 10:00
/usr/lib/tk8.3/tkConfig.sh


If I define directly path by --with-tkconfig=/usr/lib/tk8.3 it pass.
But why is it needful for tkConfig.sh if it's at very simular place
as tclConfig.sh?

/usr/lib/tcl8.3/tclConfig.sh
/usr/lib/tk8.3/tkConfig.sh

Comments?

Karel

--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/

C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tkConfig.sh vs. ./configure
Date: 2001-12-20 15:20:34
Message-ID: 8486.1008861634@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> writes:
> checking for tclConfig.sh... /usr/lib/tcl8.3/tclConfig.sh
> checking for tkConfig.sh... no
> configure: error: file `tkConfig.sh' is required for Tk

> If I define directly path by --with-tkconfig=/usr/lib/tk8.3 it pass.
> But why is it needful for tkConfig.sh if it's at very simular place
> as tclConfig.sh?

It looks like the default way to find the search path for these things
is to ask Tcl, via
echo 'puts $auto_path' | $TCLSH

Unfortunately tclsh is only going to answer about plain Tcl, not Tk.
We'd need to ask wish to get the path for Tk stuff. For example,
I get

$ tclsh
% puts $auto_path
/usr/local/lib/tcl8.0 /usr/local/lib

$ wish
% puts $auto_path
/usr/local/lib/tcl8.0 /usr/local/lib /usr/local/lib/tk8.0

Asking wish does not seem like a good idea, since it will fail to fire
up if you aren't in an X environment.

However, on my machine both tclConfig.sh and tkConfig.sh are in
/usr/local/lib, not in the subdirectories. Putting them in
version-specific subdirectories seems pretty self-defeating.
What packaging of tcl/tk did you use?

regards, tom lane


From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tkConfig.sh vs. ./configure
Date: 2001-12-20 15:36:18
Message-ID: 20011220163618.A20551@zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Dec 20, 2001 at 10:20:34AM -0500, Tom Lane wrote:
> Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> writes:

> However, on my machine both tclConfig.sh and tkConfig.sh are in
> /usr/local/lib, not in the subdirectories. Putting them in
> version-specific subdirectories seems pretty self-defeating.
> What packaging of tcl/tk did you use?

Latest unstable GNU/Linux Debian. Tcl 8.3.3-1, Tk 8.3.3-1.

Karel

--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/

C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tkConfig.sh vs. ./configure
Date: 2001-12-20 15:42:41
Message-ID: 8771.1008862961@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> writes:
> On Thu, Dec 20, 2001 at 10:20:34AM -0500, Tom Lane wrote:
>> What packaging of tcl/tk did you use?

> Latest unstable GNU/Linux Debian. Tcl 8.3.3-1, Tk 8.3.3-1.

I think the Debian packager blew it.

I just looked at a Red Hat 7.2 machine, and it has both tclConfig.sh
and tkConfig.sh in /usr/lib.

regards, tom lane


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tkConfig.sh vs. ./configure
Date: 2001-12-20 17:13:12
Message-ID: Pine.LNX.4.30.0112201740370.634-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Karel Zak writes:

> [--cut--]
> checking for tclsh... /usr/bin/tclsh
> checking for tclConfig.sh... /usr/lib/tcl8.3/tclConfig.sh
> checking for tkConfig.sh... no
> configure: error: file `tkConfig.sh' is required for Tk
>
> ..hmm, I try:
>
> $ ls -la /usr/lib/tk8.3/tkConfig.sh
> -rw-r--r-- 1 root root 3194 Oct 27 10:00
> /usr/lib/tk8.3/tkConfig.sh

The tclConfig.sh file is found by looking into the path returned by `echo
'puts $auto_path' | tclsh`.

Then theoretically, the tkConfig.sh file should be found by looking into
the path returned by `echo 'puts $auto_path' | wish`, which would indeed
give the right answer, but when I execute that, wish also opens a window
on my desktop and hangs, which is not exactly what you'd want during a
configure run.

If you have a plan to work around that and the case where X is not running
during configuration, then I'm all ears.

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tkConfig.sh vs. ./configure
Date: 2001-12-20 18:00:20
Message-ID: 20011220190020.A25755@zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Dec 20, 2001 at 06:13:12PM +0100, Peter Eisentraut wrote:

> The tclConfig.sh file is found by looking into the path returned by `echo
> 'puts $auto_path' | tclsh`.
>
> Then theoretically, the tkConfig.sh file should be found by looking into
> the path returned by `echo 'puts $auto_path' | wish`, which would indeed

In the X-win:

$ echo 'puts $auto_path; exit' | wish
/usr/lib/tcl8.3 /usr/lib /usr/lib/tk8.3

it's right, but really ugly is that it require X display.

$ echo 'puts $auto_path; exit' | wish
Application initialization failed: no display name and no $DISPLAY
environment variable

The other thing is that tcl*.h and tk.h files are in /usr/inlude/tcl8.3,
and

$ ./configure --prefix=/usr/lib/postgresql \
--with-tcl \
--with-tkconfig=/usr/lib/tk8.3/

finish with:

make[4]: Leaving directory `/var/home/PG_DEVEL/pgsql/src/interfaces/libpgtcl'
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpgtcl -I../../../src/include -I/usr/X11R6/include -c -o pgtkAppInit.o pgtkAppInit.c
pgtkAppInit.c:15: tk.h: No such file or directory
make[3]: *** [pgtkAppInit.o] Error 1

(yes, I know --includedir= etc., but it's _standard_ latest unstable
Debian...)

Karel

--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/

C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tkConfig.sh vs. ./configure
Date: 2001-12-20 18:29:42
Message-ID: 9711.1008872982@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> writes:
> The other thing is that tcl*.h and tk.h files are in /usr/inlude/tcl8.3,

There's not a darn thing we can do about that, because tclConfig.sh
doesn't tell exactly where the include files are (which is Tcl's
oversight, but we're stuck with it). We could try "$TCL_PREFIX/include",
which'd work on standard Tcl install layouts, but Debian has evidently
managed to botch that too.

> (yes, I know --includedir= etc., but it's _standard_ latest unstable
> Debian...)

It may be Debian's idea of standard, but that doesn't mean it's not
broken. How are we supposed to guess where they are hiding these files,
short of searching the entire filesystem?

regards, tom lane


From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tkConfig.sh vs. ./configure
Date: 2001-12-20 18:48:16
Message-ID: 20011220194816.D25755@zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Dec 20, 2001 at 01:29:42PM -0500, Tom Lane wrote:
> Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> writes:
> > The other thing is that tcl*.h and tk.h files are in /usr/inlude/tcl8.3,
>
> There's not a darn thing we can do about that, because tclConfig.sh
> doesn't tell exactly where the include files are (which is Tcl's
> oversight, but we're stuck with it). We could try "$TCL_PREFIX/include",
> which'd work on standard Tcl install layouts, but Debian has evidently
> managed to botch that too.
>
> > (yes, I know --includedir= etc., but it's _standard_ latest unstable
> > Debian...)
>
> It may be Debian's idea of standard, but that doesn't mean it's not

I agree, but change of this is probably out of our possibility...

> broken. How are we supposed to guess where they are hiding these files,
> short of searching the entire filesystem?

I see debian/rule (build system) of tkdvi package and here is

./configure --with-tcl=/usr/lib/tcl8.3 \
--with-tk=/usr/lib/tk8.3 \
--with-tclinclude=/usr/include/tcl8.3 \
--with-tkinclude=/usr/include/tcl8.3

Karel

--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/

C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tkConfig.sh vs. ./configure
Date: 2001-12-29 21:44:18
Message-ID: 200112292144.fBTLiIc15730@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Was this resolved?

---------------------------------------------------------------------------

> On Thu, Dec 20, 2001 at 01:29:42PM -0500, Tom Lane wrote:
> > Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> writes:
> > > The other thing is that tcl*.h and tk.h files are in /usr/inlude/tcl8.3,
> >
> > There's not a darn thing we can do about that, because tclConfig.sh
> > doesn't tell exactly where the include files are (which is Tcl's
> > oversight, but we're stuck with it). We could try "$TCL_PREFIX/include",
> > which'd work on standard Tcl install layouts, but Debian has evidently
> > managed to botch that too.
> >
> > > (yes, I know --includedir= etc., but it's _standard_ latest unstable
> > > Debian...)
> >
> > It may be Debian's idea of standard, but that doesn't mean it's not
>
> I agree, but change of this is probably out of our possibility...
>
> > broken. How are we supposed to guess where they are hiding these files,
> > short of searching the entire filesystem?
>
>
> I see debian/rule (build system) of tkdvi package and here is
>
> ./configure --with-tcl=/usr/lib/tcl8.3 \
> --with-tk=/usr/lib/tk8.3 \
> --with-tclinclude=/usr/include/tcl8.3 \
> --with-tkinclude=/usr/include/tcl8.3
>
> Karel
>
> --
> Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
> http://home.zf.jcu.cz/~zakkr/
>
> C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026