RE: AIX: Symbols are missing in libpq.a - Mailing list pgsql-hackers

From REIX, Tony
Subject RE: AIX: Symbols are missing in libpq.a
Date
Msg-id PR3PR02MB63961E3CD08A6C46E2AFF8EC86CD9@PR3PR02MB6396.eurprd02.prod.outlook.com
Whole thread Raw
In response to Re: AIX: Symbols are missing in libpq.a  (Noah Misch <noah@leadboat.com>)
Responses Re: AIX: Symbols are missing in libpq.a
Re: AIX: Symbols are missing in libpq.a
List pgsql-hackers
Thanks for your help!
That wasn't so difficult, once I've refreshed my memory.
Here is a new patch, using the export.txt whenever it does exist.
I have tested it with v13.4 : it's OK.
Patch for 14beta3 should be the same since there was no change for src/Makefile.shlib between v13 and v14.

Regards/Cordialement,

Tony Reix

tony.reix@atos.net

ATOS / Bull SAS
ATOS Expert
IBM-Bull Cooperation Project: Architect & OpenSource Technical Leader
1, rue de Provence - 38432 ECHIROLLES - FRANCE

De : Noah Misch <noah@leadboat.com>
Envoyé : mardi 31 août 2021 05:33
À : REIX, Tony <tony.reix@atos.net>
Cc : pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>; CHIGOT, CLEMENT <clement.chigot@atos.net>
Objet : Re: AIX: Symbols are missing in libpq.a
 
Caution! External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.

On Mon, Aug 30, 2021 at 03:35:23PM +0000, REIX, Tony wrote:
> Yes, trying to use the create lib$(NAME).exp from $(SHLIB_EXPORTS) when it exists was my first idea, too.
> However, I do not master (or I forgot) this kind of "if...." in a Makefile and I was unable to find a solution by reading Makefile manuals or by searching for a similar example. So, I did it in an easier (to me!) and quicker way: merge with a new command line in the Makefile rule.
> Now that we have a clear understanding of what is happenning, I may have a deeper look at a clean Makefile solution. However, if you know how to manage this, I would really appreciate some example. I'm asking my colleague too if he can help me here.

Here's an example from elsewhere in Makefile.shlib:

# If SHLIB_EXPORTS is set, the rules below will build a .def file from that.
# Else we just use --export-all-symbols.
ifeq (,$(SHLIB_EXPORTS))
$(shlib): $(OBJS) | $(SHLIB_PREREQS)
        $(CC) $(CFLAGS)  -shared -static-libgcc -o $@  $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) -Wl,--export-all-symbols -Wl,--out-implib=$(stlib)
else
DLL_DEFFILE = lib$(NAME)dll.def

$(shlib): $(OBJS) $(DLL_DEFFILE) | $(SHLIB_PREREQS)
        $(CC) $(CFLAGS)  -shared -static-libgcc -o $@  $(OBJS) $(DLL_DEFFILE) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) -Wl,--out-implib=$(stlib)

UC_NAME = $(shell echo $(NAME) | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')

$(DLL_DEFFILE): $(SHLIB_EXPORTS)
        echo 'LIBRARY LIB$(UC_NAME).dll' >$@
        echo 'EXPORTS' >>$@
        sed -e '/^#/d' -e 's/^\(.*[      ]\)\([0-9][0-9]*\)/    \1@ \2/' $< >>$@
endif

Attachment

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: pg_receivewal: remove extra conn = NULL; in StreamLog
Next
From: Daniel Gustafsson
Date:
Subject: Re: Add option --drop-cascade for pg_dump/restore