Re: ABI Compliance Checker GSoC Project - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: ABI Compliance Checker GSoC Project
Date
Msg-id 202506051705.7vbe3x67wllp@alvherre.pgsql
Whole thread Raw
In response to Re: ABI Compliance Checker GSoC Project  (Mankirat Singh <mankiratsingh1315@gmail.com>)
List pgsql-hackers
On 2025-Jun-04, Mankirat Singh wrote:

> Here's the workflow I tried to compile
> $ ./configure CFLAGS="-Og -g -fvisibility=hidden"
> --prefix=/home/mankirat/install/REL_17_4
> $ make -j$(nproc)
> ........
> /usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1154:
> undefined reference to `PQserverVersion'
> /usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1156:
> undefined reference to `appendPQExpBufferChar'
> /usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1155:
> undefined reference to `appendPQExpBufferStr'
> /usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1164:
> undefined reference to `appendPQExpBufferStr'
> /usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1165:
> undefined reference to `appendPQExpBuffer'
> /usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1169:
> undefined reference to `termPQExpBuffer'
> /usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1170:
> undefined reference to `termPQExpBuffer'

Ah yeah, that doesn't work.  What confused me is that we do use
-fvisibility=hidden in our builds already, just not in this way; what we
do is put it in the CFLAGS specifically for "modules".  By adding it to
the overall CFLAGS I think you're breaking things for the linker
somehow, though I don't understand exactly how or why.  Anyway, it
doesn't look to me like adding -fvisibility=hidden to CFLAGS is a
viable solution, though maybe it is possible to get the build to play
nice.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
Syntax error: function hell() needs an argument.
Please choose what hell you want to involve.



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Foreign key validation failure in 18beta1
Next
From: Jacob Champion
Date:
Subject: Re: macos exported symbols list not used for loadable modules