Re: AIX: Symbols are missing in libpq.a
От | Noah Misch |
---|---|
Тема | Re: AIX: Symbols are missing in libpq.a |
Дата | |
Msg-id | 20210830145256.GA2162070@rfd.leadboat.com обсуждение исходный текст |
Ответ на | RE: AIX: Symbols are missing in libpq.a ("REIX, Tony" <tony.reix@atos.net>) |
Ответы |
RE: AIX: Symbols are missing in libpq.a
|
Список | pgsql-hackers |
On Mon, Aug 30, 2021 at 02:33:32PM +0000, REIX, Tony wrote: > It appears that the Makefile in src/interfaces/libpq has been modified between v12 and v13, removing encnames.o (and wchar.o)from the object files being used for creating the static libpq.a file which is used for creating the libpq.so andlibpq.a AIX shared-library files. > And, since pg_encoding_to_char() is defined in encnames.o , it has disappeared from the libpq.exp file . > > # diff postgresql-12.8/32bit/src/interfaces/libpq/Makefile postgresql-13.1/32bit/src/interfaces/libpq/Makefile | grep encnames > < OBJS += encnames.o wchar.o > < encnames.c wchar.c: % : $(backend_src)/utils/mb/% > < rm -f encnames.c wchar.c > > Remember how the final libpq.a is built on AIX: > > rm -f libpq.a > /usr/bin/ar crs libpq.a fe-auth-scram.o ... > touch libpq.a > ../../../src/backend/port/aix/mkldexport.sh libpq.a libpq.so.5 >libpq.exp > /opt/freeware/bin/gcc -maix64 -O3 ..... -o libpq.so.5 libpq.a -Wl,-bE:libpq.exp ....... > rm -f libpq.a > /usr/bin/ar crs libpq.a libpq.so.5 > > 12.8 : /usr/bin/ar crs libpq.a fe-auth.o fe-auth-scram.o fe-connect.o fe-exec.o fe-lobj.o fe-misc.o fe-print.o fe-protocol2.ofe-protocol3.o > pqexpbuffer.o fe-secure.o legacy-pqsignal.o libpq-events.o encnames.o wchar.o fe-secure-openssl.ofe-secure-common.o > > 13.1 : /usr/bin/ar crs libpq.a fe-auth.o fe-auth-scram.o fe-connect.o fe-exec.o fe-lobj.o fe-misc.o fe-print.o fe-protocol2.ofe-protocol3.o > pqexpbuffer.o fe-secure.o legacy-pqsignal.o libpq-events.o fe-secure-common.ofe-secure-openssl.o > > > Maybe you can discover why these changes were made in v13 for src/interfaces/libpq/Makefile . > And mkldexport.sh , unchanged between v12 and v13, works perfectly. Thanks; that makes sense. Those files moved to libpgcommon_shlib.a. The $(MKLDEXPORT) call sees symbols in the .o files, but it doesn't see symbols pulled in via libpg*.a. Let's fix this by having Makefile.shlib skip $(MKLDEXPORT) when a $(SHLIB_EXPORTS) file is available and have it instead create lib$(NAME).exp from $(SHLIB_EXPORTS). That's more correct than merging, and it's simpler. Would you like to try that?
В списке pgsql-hackers по дате отправления: