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

Поиск
Список
Период
Сортировка
От wieck@debis.com (Jan Wieck)
Тема Re: [HACKERS] Problems with src/pl/tcl/mkMakefile.tcldefs.sh.in in 6.5
Дата
Msg-id m11TYox-0003kLC@orion.SAPserv.Hamburg.dsh.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Problems with src/pl/tcl/mkMakefile.tcldefs.sh.in in 6.5  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [HACKERS] Problems with src/pl/tcl/mkMakefile.tcldefs.sh.in in 6.5  (Bruce Momjian <maillist@candle.pha.pa.us>)
Re: [HACKERS] Problems with src/pl/tcl/mkMakefile.tcldefs.sh.in in 6.5  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@thewrittenword.com)

--

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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Problems with src/pl/tcl/mkMakefile.tcldefs.sh.in in 6.5
Следующее
От: Bill Geddes
Дата:
Сообщение: Re: Installing PostgreSQL