Re: Regression tests fail with musl libc because libpq.so can't be loaded

Wolfgang Walther <walther@technowledgy.de>

From: walther@technowledgy.de
To: Bruce Momjian <bruce@momjian.us>, Thomas Munro <thomas.munro@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>, Christophe Pettus <xof@thebuild.com>, Andrew Dunstan <andrew@dunslane.net>, PostgreSQL Bugs <pgsql-bugs@lists.postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2024-03-22T08:33:38Z
Lists: pgsql-bugs, pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Allow "make check"-style testing to work with musl C library.

  2. Fix compiler warnings on MSYS2

Bruce Momjian:
> I suggest we use the #ifdef test to continue our existing behavior for
> the libraries we know about, like glibc, and use the LD_* process title
> truncation hack for libc's we don't recognize.
> 
> Attached is a prototype patch which implements this based on previous
> patches.

The condition to check for linux/glibc in your patch is slightly off:

   #if ! defined(__linux__) || (! defined(__GLIBC__) && 
defined(__UCLIBC__ ))

should be

   #if defined(__linux__) && ! (defined(__GLIBC__) || defined(__UCLIBC__ ))

With the latter, it passes tests with musl.

Best,

Wolfgang