Re: BUG #18995: Building with GCC 14 fails: incompatible pointer struct pam_message - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18995: Building with GCC 14 fails: incompatible pointer struct pam_message
Date
Msg-id 1315195.1753281846@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #18995: Building with GCC 14 fails: incompatible pointer struct pam_message  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18995: Building with GCC 14 fails: incompatible pointer struct pam_message
Next
From: Andrew Watkins
Date:
Subject: Re: BUG #18995: Building with GCC 14 fails: incompatible pointer struct pam_message