Re: BUG #18995: Building with GCC 14 fails: incompatible pointer struct pam_message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: awatkins1966(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18995: Building with GCC 14 fails: incompatible pointer struct pam_message
Date: 2025-07-23 14:44:06
Message-ID: 1315195.1753281846@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Watkins 2025-07-23 15:31:10 Re: BUG #18995: Building with GCC 14 fails: incompatible pointer struct pam_message
Previous Message Tom Lane 2025-07-23 14:27:35 Re: BUG #18995: Building with GCC 14 fails: incompatible pointer struct pam_message