> I want to compile libpgtcl on a AIX 4.3.2 RS6000 but I have 
> problem at the linking phase.
> I ran the ./configure like that:
> $ sh ./configure --with-CC=gcc --with-includes=/usr/local/include
> --with-libraries=/usr/local/lib --with-tclconfig=/usr/local/lib
> --with-tkconfig=/usr/local/lib
> 
> After everything whent fine until time for libpgtcl.so I had those errors.
> Can you help me
> Thank you
> Jacques Talbot
> 
> 
> gcc -O2 -pipe -Wall -Wmissing-prototypes 
> -Wmissing-declarations  -Wl,-H512
> -Wl,-bM:SRE -Wl,-bI:../../../src/backend/postgres.imp 
> -Wl,-bE:libpgtcl.exp -o
> libpgtcl.so libpgtcl.a   -L../../../src/interfaces/libpq -lpq   -lc
.....
> ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringInit
> ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringStartSublist
> collect2: ld returned 8 exit status
> make[3]: *** [libpgtcl.so] Error 1

configure unfortunately does not include the tcl library 
for linking libpgtcl.so on AIX :-(

In the meantime Jacques, your tcl installation should have a shared 
tcl library (libtcl8.2.so) or better yet an *.exp, which you can include
in the above link command. 

In the shell manually execute the link, like:

cd src/pl/tcl
gcc -O2 -pipe -Wall -Wmissing-prototypes \
 -Wmissing-declarations  -Wl,-H512 \
 -Wl,-bM:SRE -Wl,-bI:../../../src/backend/postgres.imp \
 -Wl,-bE:libpgtcl.exp -o \
 libpgtcl.so libpgtcl.a   -L../../../src/interfaces/libpq -lpq   -lc \  
 -L/usr/local/lib -Wl,-bI:/usr/local/lib/libtcl8.2.exp

The above addition could be generated with TCL_LIB_SPEC.
The -L/usr/local/lib is also essential to avoid runtime hassles,
why is this actually not automatic, since --with-libraries was used ?

Would a patch for src/pl/tcl/Makefile still be accepted for 7.2 ?

Andreas

Fri, 14 Dec 2001 10:00:49 +0100
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: Problem compiling postgres sql --with-tcl
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> Would a patch for src/pl/tcl/Makefile still be accepted for 7.2 ?

If it's simple and low-risk, probably so.  Please submit it anyway,
so we'll have it on file even if the decision is to hold it till
7.3.

			regards, tom lane

Fri, 14 Dec 2001 10:38:22 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Problem compiling postgres sql --with-tcl 