Re: BUG #18995: Building with GCC 14 fails: incompatible pointer struct pam_message
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: awatkins1966@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-07-23T14:44:06Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix build breakage on Solaris-alikes with late-model GCC.
- e6dfd068ed45 19 (unreleased) landed
- e4d585455509 16.10 landed
- b252ce31116f 15.14 landed
- 868b39a544ed 14.19 landed
- 635a856279ef 17.6 landed
- 3d039b53a133 18.0 landed
- 1ccb3851db5d 13.22 landed
I wrote: > This doesn't look like a GCC version problem, but like a discrepancy > in the PAM header files, to wit, "const" or not in the expected > signature of pam_passwd_conv_proc. Can you verify whether or not > pam_appl.h and its subsidiary headers changed? I had a feeling we'd seen this before, and after digging in the archives indeed we have: https://www.postgresql.org/message-id/flat/16415.1184285944%40sss.pgh.pa.us#a0a2fac693665cc517f761e24f222574 So I take back the guess that it's not about GCC version. What seems more likely now is that it's been a warning right along, which you have been ignoring, and GCC 14 has decided to promote it to an error. We could perhaps install a configure check to see if this argument is expected to be const or not. But given the shortage of reports, I think it'd be sufficient to do what I suggested in that 2007 thread: >> The main issue in my mind would be how to determine whether to use >> const or not. If all Solaris releases are like this, and can be >> expected to stay that way, I'd be inclined to just put a "#define >> PAM_CONV_PROC_NOT_CONST" in include/port/solaris.h and drive the >> function declaration off that. As a short-term workaround, GCC has probably got a command-line option to knock the error back down to a warning. regards, tom lane