Re: AIX compilation problems (was Re: [HACKERS] Proposal ...)

From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: <pgsql-patches(at)postgresql(dot)org>
Cc: "PostgreSQL Development" <pgsql-hackers(at)postgresql(dot)org>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Subject: Re: AIX compilation problems (was Re: [HACKERS] Proposal ...)
Date: 2002-10-02 16:42:51
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA4887A4C@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


> > > Attached is a patch to fix the mb linking problems on AIX. As a nice side effect
> > > it reduces the duplicate symbol warnings to linking libpq.so and libecpg.so
> > > (all shlibs that are not postmaster loadable modules).
> >
> > Can you explain the method behind your patch? Have you tried -bnogc?
>
> -bnogc would (probably) have been the correct switch reading
> the man page,
> but the method was previously not good since it involved the
> following:
>
> 1. create a static postgres executable from the SUBSYS.o's
> 2. create an exports file from above
> 3. recreate a shared postgres executable
>
> This naturally had a cyclic dependency, that could not properly be
> reflected in the Makefile (thus a second make sometimes left you with
> a static postgres unless you manually removed postgres.imp).
>
> Now it does:
> postgres.imp: $(OBJS)
> create a temporary SUBSYS.o from all $(OBJS)
> create a postgres.imp from SUBSYS.o
> rm temporary SUBSYS.o
>
> postgres: postgres.imp
> link a shared postgres
>
> A second change was to move the import and export files to
> the end of the link line,
> then the linker knows not to throw a duplicate symbol
> warning, and keeps all symbols
> that are mentioned in the exports file (== -bnogc restricted
> to $(OBJS) symbols).
>
> Thus now only libpq.so and libecpg.so still show the
> duplicate symbol warnings since their
> link line should actually not include postgres.imp . I did
> not see how to make a difference
> between loadable modules (need postgres.imp) and interface
> libraries (do not need postgres.imp),
> but since the resulting libs are ok, I left it at that.

Note that this behavior did thus not change.

>
> I tested both gcc and xlc including regression tests.

What happens with this now ?

Thanx
Andreas

Attachment Content-Type Size
mb_link_patch4.gz application/x-gzip 1.5 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Mario Weilguni 2002-10-02 17:12:45 Diff for reindexdb
Previous Message scott.marlowe 2002-10-02 16:30:48 Re: Fwd: int type problem in 7.3

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2002-10-02 18:46:36 Re: HISTORY fixes
Previous Message Bruce Momjian 2002-10-02 16:26:59 GUC log_min_error_statement