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

Glynn Clements glynn at gclements.plus.com
Wed Jul 4 08:28:47 EDT 2007


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 at gclements.plus.com>




More information about the grass-dev mailing list