Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ueaRa-00C7Ih-39 for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Jul 2025 14:27:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ueaRZ-002YoO-2O for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Jul 2025 14:27:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ueaRY-002YoF-QV for pgsql-bugs@lists.postgresql.org; Wed, 23 Jul 2025 14:27:41 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ueaRV-000Qoa-2S for pgsql-bugs@lists.postgresql.org; Wed, 23 Jul 2025 14:27:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 56NERZCP1313567; Wed, 23 Jul 2025 10:27:35 -0400 From: Tom Lane To: awatkins1966@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18995: Building with GCC 14 fails: incompatible pointer struct pam_message In-reply-to: <18995-82058da9ab4337a7@postgresql.org> References: <18995-82058da9ab4337a7@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Wed, 23 Jul 2025 10:00:55 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1313565.1753280855.1@sss.pgh.pa.us> Date: Wed, 23 Jul 2025 10:27:35 -0400 Message-ID: <1313566.1753280855@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > First, PostgreSQL 17.5 with GCC v13 builds cleaning and runs on Solaris > 11.4, but building with GCC v14 I get the following: > gcc -m64 -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration-after-statement -Werror=vla -Wendif-labels > -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type > -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv > -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation > -O2 -I../../../src/include -D_POSIX_PTHREAD_SEMANTICS > -I/usr/include/libxml2 -c -o auth.o auth.c > auth.c:101:9: error: initialization of 'int (*)(int, struct pam_message **, > struct pam_response **, void *)' from incompatible pointer type 'int > (*)(int, const struct pam_message **, struct pam_response **, void *)' > [-Wincompatible-pointer-types] > 101 | &pam_passwd_conv_proc, > | ^ > auth.c:101:9: note: (near initialization for 'pam_passw_conv.conv') 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? On my Linux box I find this in /usr/include/security/_pam_types.h: struct pam_conv { int (*conv)(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr); void *appdata_ptr; }; but it seems that "const" is missing in yours. I guess an alternative theory is that it was inconsistent all along but you hadn't previously tried to build --with-pam. regards, tom lane