Re: Problem compiling postgres sql --with-tcl

From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: <pgsql-hackers(at)postgresql(dot)org>
Cc: <jacques(dot)talbot(at)muhc(dot)mcgill(dot)ca>
Subject: Re: Problem compiling postgres sql --with-tcl
Date: 2001-12-14 09:00:49
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA41EB45A@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Luis Amigo 2001-12-14 09:48:36 can someone explain that?
Previous Message Doug McNaught 2001-12-14 05:17:19 Re: Platform testing (last call?)