Re: --with-tcl build on AIX (and others) fails - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: --with-tcl build on AIX (and others) fails
Date
Msg-id Pine.LNX.4.30.0202222336070.686-100000@peter.localdomain
Whole thread Raw
In response to Re: --with-tcl build on AIX (and others) fails  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane writes:

> I tried out the patch that Andreas sent in a couple weeks ago, and find
> that as-is it fails on HPUX.  The attached version works okay on both
> HPUX 10.20 and RH Linux 7.2, however.  Anyone want to try it on other
> platforms?  (Note this only covers Andreas' proposed changes for pltcl,
> not for libpgtcl.)

Back to this one...

I think we're hung up on this part:

> ! # Set up extra libs that must be mentioned in pltcl.so's link command.
> ! # Aside from libtcl.so, on many platforms we must mention the shared
> ! # libraries that libtcl.so depends on.  Don't forget -lc, which the
> ! # Tcl makefiles unaccountably exclude from $(TCL_LIBS).
>
>   ifneq ($(TCL_SHLIB_LD_LIBS),)
>   # link command for a shared lib must mention shared libs it uses
> ! SHLIB_LINK=$(TCL_LIB_SPEC) $(TCL_LIBS) -lc
>   else
>   ifeq ($(PORTNAME), hpux)
>   # link command for a shared lib must mention shared libs it uses,
>   # even though Tcl doesn't think so...
> ! SHLIB_LINK=$(TCL_LIB_SPEC) $(TCL_LIBS) -lc
>   else
>   # link command for a shared lib must NOT mention shared libs it uses
> ! SHLIB_LINK=$(TCL_LIB_SPEC)
>   endif
>   endif

This is still wrong because it depends on information that Tcl generated
during its build using its compiler and linker configuration.

Also, if you use GCC to link, specifying -lc is almost certainly wrong in
any case.

I think what should work is this:  Assign

SHLIB_LINK = $(TCL_LIB_SPEC) $(TCL_LIBS)

unconditionally.  If the port doesn't like mention of shared lib
dependencies, it should ignore SHLIB_LINK in Makefile.shlib.  If the port
wants to have -lc, it should add it to SHLIB_LINK in Makefile.shlib.

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Full 7.3 list
Next
From: Bruce Momjian
Date:
Subject: Re: elog() proposal