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

From REIX, Tony
Subject AIX: Symbols are missing in libpq.a
Date
Msg-id PR3PR02MB6396742E2FC3E77D37A920BC86C79@PR3PR02MB6396.eurprd02.prod.outlook.com
Whole thread Raw
Responses Re: AIX: Symbols are missing in libpq.a  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
Hi,

While porting postgresql-odbc v13 to AIX, we have found that (at least) 2 symbols are missing in libpq.a provided by the port of PostgreSQL v13.1 to AIX 7.1 by the BullFreeware project : 
pg_char_to_encoding
pg_encoding_to_char
Looking at details, it appears that these symbols are present in version 12.8 .
They were still missing in 13.4 .
Something has changed between v12 and v13.

Looking at more details, the way libpq.a is built on AIX is different from the way libpq.so is built on Linux.
On Linux, the file "exports.txt" is used for building the list of symbols to be exported.
On AIX, the tool  mkldexport.sh is used for dynamically generating the symbols to be exported.
And it appears that 5 symbols (including the 2 above) are missing on AIX. Don't know why.

A solution is to merge the two list of symbols to be exported in one list.
This is done by the patch attached here.
This patch does:
  - add a new 11-lines script  ./src/backend/port/aix/mergeldexport.sh which makes the merge only if the file exports.txt does exist.
  - add the use of this script in:  ./src/Makefile.shlib  to be used for AIX only
  - add the definition of variable MERGELDEXPORT in: ./src/makefiles/Makefile.aix
Very simple.

I suggest to apply the change for 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
Attachment

pgsql-hackers by date:

Previous
From: Ronan Dunklau
Date:
Subject: Re: pg_receivewal starting position
Next
From: Masahiko Sawada
Date:
Subject: Re: Skipping logical replication transactions on subscriber side