[GRASS-dev] Postgres DB driver links to TclTk?

I was poking around and noticed that the GRASS Postgres DB driver links the TclTk libraries. It also has the the TclTk include dirs in the CFLAGS. But it doesn't appear to use any TclTk functions. None of the other DB drivers uses TclTk.

mistake?

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect

William Kyngesburye wrote on 07/04/2007 04:50 AM:

I was poking around and noticed that the GRASS Postgres DB driver
links the TclTk libraries. It also has the the TclTk include dirs in
the CFLAGS. But it doesn't appear to use any TclTk functions. None
of the other DB drivers uses TclTk.

Indeed:
cd grass63/dist.x86_64-unknown-linux-gnu/driver/db/
ldd pg | tr -s ' ' ' ' | cut -d' ' -f1 | sort
        /lib64/ld-linux-x86-64.so.2
        libcom_err.so.2
        libcrypto.so.4
        libcrypt.so.1
        libc.so.6
        libdl.so.2
        libgrass_datetime.so
        libgrass_dbmibase.so
        libgrass_dbmidriver.so
        libgrass_dbstubs.so
        libgrass_gis.so
        libgrass_sqlp.so
        libgssapi_krb5.so.2
        libk5crypto.so.3
        libkrb5.so.3
        libm.so.6
        libnsl.so.1
        libpq.so.4
        libpthread.so.0
        libresolv.so.2
        libssl.so.4
        libtcl8.4.so
        libtk8.4.so
        libX11.so.6
        libz.so.1

mistake?

It doesn't seem to be GRASS:
cd grass63/dist.x86_64-unknown-linux-gnu/lib/
for i in `ls -1 *.so | grep -v cvs` ; do echo "======= $i:" ; ldd $i ;
done | grep tcl
-> nothing

No idea where it creeps in (didn't check the system libs).

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

Markus Neteler wrote:

> I was poking around and noticed that the GRASS Postgres DB driver
> links the TclTk libraries. It also has the the TclTk include dirs in
> the CFLAGS. But it doesn't appear to use any TclTk functions. None
> of the other DB drivers uses TclTk.
>
Indeed:
cd grass63/dist.x86_64-unknown-linux-gnu/driver/db/
ldd pg | tr -s ' ' ' ' | cut -d' ' -f1 | sort
        /lib64/ld-linux-x86-64.so.2
        libcom_err.so.2
        libcrypto.so.4
        libcrypt.so.1
        libc.so.6
        libdl.so.2
        libgrass_datetime.so
        libgrass_dbmibase.so
        libgrass_dbmidriver.so
        libgrass_dbstubs.so
        libgrass_gis.so
        libgrass_sqlp.so
        libgssapi_krb5.so.2
        libk5crypto.so.3
        libkrb5.so.3
        libm.so.6
        libnsl.so.1
        libpq.so.4
        libpthread.so.0
        libresolv.so.2
        libssl.so.4
        libtcl8.4.so
        libtk8.4.so
        libX11.so.6
        libz.so.1

> mistake?

It doesn't seem to be GRASS:
cd grass63/dist.x86_64-unknown-linux-gnu/lib/
for i in `ls -1 *.so | grep -v cvs` ; do echo "======= $i:" ; ldd $i ;
done | grep tcl
-> nothing

No idea where it creeps in (didn't check the system libs).

It's in db/drivers/postgres/Makefile:

14 EXTRA_CFLAGS = $(PQINCPATH) $(TCLINCDIR) $(TKINCDIR)

26 $(CC) $(LDFLAGS) -o $@ $(ARCH_OBJS) $(FMODE_OBJ) $(PQLIBPATH) $(LIBES) $(TCLTKLIBPATH) $(TCLTKLIBS) \

Those options were added in:

  revision 1.4
  date: 2003/01/15 15:36:24; author: radim; state: Exp; lines: +6 -3
  parser for database, user/password dialog

No idea why; I'll remove them.

--
Glynn Clements <glynn@gclements.plus.com>

On Wed, Jul 04, 2007 at 01:28:47PM +0100, Glynn Clements wrote:
...

It's in db/drivers/postgres/Makefile:

14 EXTRA_CFLAGS = $(PQINCPATH) $(TCLINCDIR) $(TKINCDIR)

26 $(CC) $(LDFLAGS) -o $@ $(ARCH_OBJS) $(FMODE_OBJ) $(PQLIBPATH) $(LIBES) $(TCLTKLIBPATH) $(TCLTKLIBS) \

Ah! Obvious place to look at first...

Those options were added in:

  revision 1.4
  date: 2003/01/15 15:36:24; author: radim; state: Exp; lines: +6 -3
  parser for database, user/password dialog

No idea why; I'll remove them.

AFAIR, there was for a (short) time a tcl/tk based login
dialogue, but:

2004-10-25 19:09 radim
        * Makefile, db.c: login dialog removed

Markus

On Jul 4, 2007, at 7:36 AM, Markus Neteler wrote:

Those options were added in:

  revision 1.4
  date: 2003/01/15 15:36:24; author: radim; state: Exp; lines: +6 -3
  parser for database, user/password dialog

No idea why; I'll remove them.

AFAIR, there was for a (short) time a tcl/tk based login
dialogue, but:

2004-10-25 19:09 radim
        * Makefile, db.c: login dialog removed

I thought it might be some kind of leftover (I haven't got the hang of looking back thru revision history yet).

So, will you remove it from 6.2 also?

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"I ache, therefore I am. Or in my case - I am, therefore I ache."

- Marvin

William Kyngesburye wrote on 07/04/2007 04:29 PM:

On Jul 4, 2007, at 7:36 AM, Markus Neteler wrote:

Those options were added in:

    revision 1.4
    date: 2003/01/15 15:36:24; author: radim; state: Exp; lines:
+6 -3
    parser for database, user/password dialog

No idea why; I'll remove them.

AFAIR, there was for a (short) time a tcl/tk based login
dialogue, but:

2004-10-25 19:09 radim
        * Makefile, db.c: login dialog removed

I thought it might be some kind of leftover (I haven't got the hang of
looking back thru revision history yet).

So, will you remove it from 6.2 also?

Yes. Both Makefiles cleaned. Thanks for catching.

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

William Kyngesburye wrote:

I thought it might be some kind of leftover (I haven't got the hang
of looking back thru revision history yet).

the CVS web interface is very nice for this,

http://freegis.org/cgi-bin/viewcvs.cgi/grass6/db/drivers/postgres/Makefile

(try "annotate" on an earlier revision to see when the change was made,
then look at the cvs comment for that rev, rinse, repeat)

Hamish