Re: [HACKERS] Problems with src/pl/tcl/mkMakefile.tcldefs.sh.in in 6.5

From: wieck(at)debis(dot)com (Jan Wieck)
To: maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian)
Cc: pgsql-hackers(at)thewrittenword(dot)com, pgsql-hackers(at)postgreSQL(dot)org, pgsql-admin(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Problems with src/pl/tcl/mkMakefile.tcldefs.sh.in in 6.5
Date: 1999-09-21 22:55:35
Message-ID: m11TYox-0003kLC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:

>
> I believe this is fixed.

Again one of the frequently appearing items. So I would call
it more "hacked quiet - for now" instead of "fixed".

The script is only called if PostgreSQL is configured
--with_tcl. In that case, missing the Tcl(/Tk) includes
and/or libs would cause errors and a compilation abort. Can't
we assume that if the user configured with Tcl, she would at
least have a working tclsh(1)? I think we can. I don't know
of any "normal" Tcl-installation where the libs are present
but no working tclsh(1).

Since Tcl itself has much better capabilities than a sh(1) or
sed(1), it might be reasonable to source in the tclConfig.sh
into mkMakefile.tclsh.sh and pipe a "set" trough a tcl script
that does the real conversion into proper Makefile escaping.

An advantage would be that the Tcl script could check if the
version of the systems default tclsh(1) is the same as the
one in the choosen tclConfig.sh file and notice the user if
not. Using different Tcl versions in the libs and includes
than in the tclsh(1) executable could cause horrible
problems. I'm unhappy with the current libpgtcl for a long
time, but the changes I have in mind would make it
incompatible with pre-8.0 Tcl. So the changes will cause a
bunch of #if...#else...#endif that MUST match the later used
tclsh(1) at compile time or the dynamic loader of Tcl would
fail.

Jan

BTW: Is it only me or do others too wonder why their private
wish-list is sometimes longer than our official TODO?

>
> > For Digital UNIX 4.0D, shared libraries are created by:
> > $ ld -shared -expect_unresolved "*" -o foo.so [objects]
> >
> > This presents a problem for mkMakefile.tcldefs.sh.in. In tclConfig.sh:
> > TCL_SHLIB_LD='ld -shared -expect_unresolved "*"'
> >
> > In mkMakefile.tcldefs.sh.in:
> > cat @TCL_CONFIG_SH@ |
> > egrep '^TCL_|^TK_' |
> > while read inp
> > do
> > eval eval echo $inp
> > done >Makefile.tcldefs
> >
> > Because of this, we wind up with the following in Makefile.tcldefs to
> > created shared libraries on Digital UNIX because of the eval:
> > TCL_SHLIB_LD=ld -shared -expect_unresolved *
> >
> > The "*" needs to be quoted to avoid shell expansion. How about the
> > following:
> > cat @TCL_CONFIG_SH@ |
> > egrep '^TCL_|^TK_' |
> > sed -e "s/^\([^=]*\)='\(.*\)'$/\1=\2/"
> >
> > --
> > albert chin (china(at)thewrittenword(dot)com)

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck(at)debis(dot)com (Jan Wieck) #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message frankpit 1999-09-21 23:06:53 Re: [HACKERS] Early evaluation of constant expresions (with PATCH)
Previous Message Vince Vielhaber 1999-09-21 21:59:07 RE: INSTALL file (was Re: [HACKERS] Re: HISTORY for 6.5.2)