Re: AIX: Symbols are missing in libpq.a

From: Noah Misch <noah(at)leadboat(dot)com>
To: "REIX, Tony" <tony(dot)reix(at)atos(dot)net>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "CHIGOT, CLEMENT" <clement(dot)chigot(at)atos(dot)net>
Subject: Re: AIX: Symbols are missing in libpq.a
Date: 2021-08-31 03:33:11
Message-ID: 20210831033311.GA2201912@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2021-08-31 03:40:52 Re: Added schema level support for publication.
Previous Message Michael Paquier 2021-08-31 03:20:14 Re: [PATCH] Tab completion for ALTER TABLE … ADD …