BUG #18672: failing to link postgresql

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: bastian(dot)thierry(at)laposte(dot)net
Subject: BUG #18672: failing to link postgresql
Date: 2024-10-24 18:35:12
Message-ID: 18672-66509a1043077366@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 18672
Logged by: Thierry Bastian
Email address: bastian(dot)thierry(at)laposte(dot)net
PostgreSQL version: 16.4
Operating system: macOS
Description:

In short, in src/interfaces/libpq/Makefile there is a check for lib-a to not
contain a call to exit. But the issue is that on macOS, it still uses
_atexit and pthread_exitm which are fine.
My fix to this is to apply the following patch:

diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile
index 0919d8f..65b07d3 100644
--- a/src/interfaces/libpq/Makefile
+++ b/src/interfaces/libpq/Makefile
@@ -118,7 +118,7 @@ backend_src = $(top_srcdir)/src/backend
libpq-refs-stamp: $(shlib)
ifneq ($(enable_coverage), yes)
ifeq (,$(filter aix solaris,$(PORTNAME)))
- @if nm -A -u $< 2>/dev/null | grep -v __cxa_atexit | grep exit; then \
+ @if nm -A -u $< 2>/dev/null | grep -v __cxa_atexit | grep -v _atexit |
grep -v pthread_exit | grep exit; then \
echo 'libpq must not be calling any function which invokes exit'; exit 1;
\
fi
endif

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2024-10-24 20:30:44 Re: BUG #18672: failing to link postgresql
Previous Message David G. Johnston 2024-10-24 15:31:54 Re: BUG #18671: Unable to Run PostgreSQL on EndeavourOS without Modifying visudo