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

Search Discussions

  • Tom Lane at Dec 14, 2001 at 3:38 pm

    "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
  • Andreas Zeugswetter at Dec 14, 2001 at 4:02 pm

    Tom wrote:
    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.
    Unfortunately the issue is in both interfaces/libpgtcl and pl/tcl.
    libpgtcl is not prepared for the tclConfig.sh stuff, thus it would be
    more than a few lines.

    Second I do not understand why the Makefile in pl/tcl is so complicated,
    and not similar e.g. to the plpython one, so the first task should be to
    simplify the Makefile to use Makefile.shlib, and not cook it's own soup.

    Basically:
    NAME=pltcl
    OBJS=pltcl.o
    SHLIB_LINK=$(TCL_LIB_SPEC) $(TCL_LIBS)
    all: all-lib

    Third unfortunately my daughter is sick and my wife asked me to come home,
    so I won't be able to work on it till Monday :-(

    Andreas
  • Peter Eisentraut at Dec 15, 2001 at 6:08 pm

    Zeugswetter Andreas SB SD writes:

    Second I do not understand why the Makefile in pl/tcl is so complicated,
    and not similar e.g. to the plpython one, so the first task should be to
    simplify the Makefile to use Makefile.shlib, and not cook it's own soup.
    All the oddities in that makefile are there because presumably some system
    needed them in the past. Personally, I think the whole makefile is one
    big bug, but I wasn't too eager to touch it because it seemed to work.
    Now that we have an actual case where it doesn't I guess we need to look
    at it.
    Basically:
    NAME=pltcl
    OBJS=pltcl.o
    SHLIB_LINK=$(TCL_LIB_SPEC) $(TCL_LIBS)
    all: all-lib
    That seems about right. Please try it out at your convenience.

    --
    Peter Eisentraut peter_e@gmx.net
  • Tom Lane at Dec 15, 2001 at 6:20 pm

    Peter Eisentraut writes:
    Zeugswetter Andreas SB SD writes:
    Second I do not understand why the Makefile in pl/tcl is so complicated,
    and not similar e.g. to the plpython one, so the first task should be to
    simplify the Makefile to use Makefile.shlib, and not cook it's own soup.
    All the oddities in that makefile are there because presumably some system
    needed them in the past.
    No, it's a historical thing: the Makefile.shlib stuff didn't exist when
    pltcl was developed. I'm not entirely sure why I didn't try to fold
    pltcl in with the Makefile.shlib approach when we started doing that.
    Possibly I was just thinking "don't fix what ain't broken". But now
    I'd vote for changing over.

    regards, tom lane
  • Andreas Zeugswetter at Dec 17, 2001 at 1:43 pm

    Tom writes:
    Peter Eisentraut <peter_e@gmx.net> writes:
    Zeugswetter Andreas SB SD writes:
    Second I do not understand why the Makefile in pl/tcl is so complicated,
    and not similar e.g. to the plpython one, so the first task should be to
    simplify the Makefile to use Makefile.shlib, and not cook it's own soup.
    All the oddities in that makefile are there because presumably some system
    needed them in the past.
    No, it's a historical thing: the Makefile.shlib stuff didn't exist when
    pltcl was developed. I'm not entirely sure why I didn't try to fold
    pltcl in with the Makefile.shlib approach when we started doing that.
    Possibly I was just thinking "don't fix what ain't broken". But now
    I'd vote for changing over.
    Here is a patch per above thread.
    I tested the getDBs function in pgtclsh and a simple pltcl function.

    I duplicated the file mkMakefile.tcldefs.sh which is probably not good,
    but bin/pgtclsh already did it like that, so ...

    Andreas
  • Tom Lane at Dec 18, 2001 at 12:05 am

    "Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
    Here is a patch per above thread.
    Why did you change libpgtcl's build process? AFAIK no one was claiming
    that was broken.

    This does not seem the right time to be making undiscussed changes in
    Makefile.shlib, either. What's with that?

    regards, tom lane
  • Peter Eisentraut at Dec 18, 2001 at 10:23 pm

    Tom Lane writes:

    "Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
    Here is a patch per above thread.
    Why did you change libpgtcl's build process? AFAIK no one was claiming
    that was broken.

    This does not seem the right time to be making undiscussed changes in
    Makefile.shlib, either. What's with that?
    I wasn't under the impression that we wanted to get this patch into 7.2.
    AFAIK, the Tcl stuff has not built on AIX for quite a while, so it's not a
    regression from a previous release. Moreover, the chances that any
    significant number of people will test the Tcl build in the remaining test
    period is nearly zero.

    --
    Peter Eisentraut peter_e@gmx.net
  • Andreas Zeugswetter at Dec 18, 2001 at 11:26 am

    "Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
    Here is a patch per above thread.
    Why did you change libpgtcl's build process? AFAIK no one was claiming
    that was broken.
    It was definitely broken on AIX, and was also the original complaint.
    Since the make stopped there the next failure in pl/tcl was not reported.
    This does not seem the right time to be making undiscussed changes in
    Makefile.shlib, either. What's with that?
    I was presuming, that the patch was at this stage not applied without further
    review and testing on some other port.

    It is not a real big problem, but for some targets "make clean" fails to
    clean libxxx.2.0 (depending on what $(shlib) is on that port) and the
    libxxx.exp file without the patch.
    The patch brings "clean-lib" inline with "uninstall-lib".

    Unfortunately it misses to clean xxx.dll on Windows, very sorry :-(
    I thought I tripplechecked. Incremental patch attached.

    Andreas
  • Andreas Zeugswetter at Dec 19, 2001 at 9:29 am

    Here is a patch per above thread.
    Why did you change libpgtcl's build process? AFAIK no one was claiming
    that was broken.

    This does not seem the right time to be making undiscussed changes in
    Makefile.shlib, either. What's with that?
    I wasn't under the impression that we wanted to get this patch into 7.2.
    AFAIK, the Tcl stuff has not built on AIX for quite a while, so it's not a
    regression from a previous release. Moreover, the chances that any
    significant number of people will test the Tcl build in the remaining test
    period is nearly zero.
    It would have been nice, if you would have stated your concern when I asked
    if this patch had chance for inclusion, because if I had known that, I would
    have worked at a patch after new year, because we are quite busy here with
    the Euro coming.

    Andreas
  • Peter Eisentraut at Dec 19, 2001 at 6:48 pm

    Zeugswetter Andreas SB SD writes:

    It would have been nice, if you would have stated your concern when I asked
    if this patch had chance for inclusion, because if I had known that, I would
    have worked at a patch after new year, because we are quite busy here with
    the Euro coming.
    Sorry, I was always assuming you were working for a future release, since
    you indicated that you wouldn't have much time anyway. But you must
    understand that the Tcl code gets really little testing. The patch is
    still available for other interestd AIX users, so the work is not in vain.

    --
    Peter Eisentraut peter_e@gmx.net
  • Christopher Kings-Lynne at Dec 20, 2001 at 1:35 am

    It would have been nice, if you would have stated your concern
    when I asked
    if this patch had chance for inclusion, because if I had known
    that, I would
    have worked at a patch after new year, because we are quite busy
    here with
    the Euro coming.
    I saw a show about the first meeting to perhaps form an African Union. My
    friend then suggested that if it goes ahead, they should called their
    unified currency the 'Afro' :)

    Merry Christmas all,

    Chris

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedDec 14, '01 at 9:01a
activeDec 20, '01 at 1:35a
posts12
users4
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2022 Grokbase