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.96) (envelope-from ) id 1vielR-00CT0D-1H for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jan 2026 20:25:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vielQ-0096HV-1H for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jan 2026 20:25:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vielP-0096HN-39 for pgsql-hackers@lists.postgresql.org; Wed, 21 Jan 2026 20:25:16 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vielN-001eQ8-29 for pgsql-hackers@lists.postgresql.org; Wed, 21 Jan 2026 20:25:15 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-6580dbdb41eso409720a12.0 for ; Wed, 21 Jan 2026 12:25:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769027112; cv=none; d=google.com; s=arc-20240605; b=GBQQHFgfeVvxCQMyY0LZn9DZeTcp9oD8796t9Qxe5LunCZGNKbT2foo8qAxQnM01qU njrNyxcXoga6paiO4Ru7Mig7ipuDXPAzCmTPAQDEp35gpRmt0OS8L6wSHV2ORu7FtCC3 SE1+uXhtTXXqOALKEqeINzpZXAcEHyyooQMrOnJ++fDHYYcwVIAzXkwwlDggE+2Lwryp lYf24MRKSIm4fdMI4XKIo/FQZyPyf9vbP92RW9PcnqvOWqOfFNEGkhqvAL3qfWC0mlqa 5XuzZJjrpnCjihF+e9lNRGlpYHuVVL+EpV0XMvqraFiVJuXZHhXKwCT4ONXmiNzGuX3e mpSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=q9DQAn4VXWZphEAYE2hGIclWhlgETBbfj1lafSxI04c=; fh=ZEgaWWLnnwLN/dJsH4ddbJC5tY4Kn+TFB6kY93m360c=; b=CPKfzZsGX0y1ZDtJt3mfRB4DNiXTzCbGQ/GDEQtdbBaoj1rhi0R2HTZcw1tVojlTyP jUIjkj483KIFEpYpUzdLYZ0ilwX7wiqKNcyo1DqYpQYiI5yj53GrCAPZsqFjro0Fq8Un vMXDhtzPYn6RDG3EG0wgmJubSVggO9SG0oXi7zFmXbeyNgozW1vunLioRUf3xB9V9pRX YblWoaQBQp4S44tBWey36wKVNOtXIIEm+WTZ2FjH2g1IllK6py/VJgEM21svX2h0/x9j uWid5trVdG7n+Zu2RaV+a9plo6v8kRq27yF4kwOdDKQ8Wf/QU9Ut2wwM6OFxI8EGrRxw mhZg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769027112; x=1769631912; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=q9DQAn4VXWZphEAYE2hGIclWhlgETBbfj1lafSxI04c=; b=jdjv8kM6iT9d4DYLoPNzRIeRvs4EJlvwrdopHLy3Cv68FZDEKfE79bMyJckYzAOMoP UgvXJjpY+L6BQEDyOvveyE6iZjzCKkj+8ILuI99xQY5mxUxPuLmnvWdte7cr+0zj01e6 nSBzEJmSVhWq2UPos3nyLRgnahHOyiFJGEecu0F8Sg0+Yg38e+EfR8oSQtg4xTvHQqYI D3KFnfCJh+lTXC5JvIajHFb1xmyGnwkhDdHfXD4oDt/fr6nx8IxxGYyciiURSzk9kkfX 5cf+eyGUSvclbdTMO3NjnZz1Cymy/jNeK49PTTjT/2I+GJ9nZpQFLWO122Sdd8Hy8BtS t/oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769027112; x=1769631912; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=q9DQAn4VXWZphEAYE2hGIclWhlgETBbfj1lafSxI04c=; b=J2IioLpaxZd6KbPgTxyhbOizNWGqLTKY5S3CKjvRK5LZ37b1rTeXrmekU7B3CfWWQg WlTBY9mK+zcj+roiyYVkZMUKZf5A65oEVbnlihwpKuw6BnKnm1chXlrsThRBChtH4luQ mBmUynnftEaljVcd8pzwIzaA75NMu912xhQ4lKUYFPRTPG/yKJPLlZeHP27+9sqKLgfX ofjLkIe4dGb7W7fE/quUxAnc6aQsWKSolLs556qmZnvkL5sOBdlpWUPRDYpz/gHK+2xa jz46FVAoB81c+1cIEGHXDQiThUmFj5AtuMOBvLm0MoGjTuowehwyfT2U9KfuFaQ4ixt6 ISMw== X-Gm-Message-State: AOJu0YzrOOVhN6SygCDSm55md8+2B/I4R9u8sxVhP5W246NgxJ3yh7Of n/h7wWwHc6Dfr+DrQt7pdenbU4IPwHq3ifBEbdlnUW4xC7JkumZXh2sdtFp0bsJ7worQ4rIhz2l obvcIymXrAdYuMVTY3lNoEBxdsMXuUCY= X-Gm-Gg: AZuq6aI9czEo77b4yP6EDAv326EumDV1JIKYRPfXmJ5QBh4ILhg+Pi0SYnM92fjT7EY jfumu0FIOPXN9Wp/009EAEgzOdHzrVZsAYTNqFDcK/NVYKnC4dy0jcZ5Q4np+Cn+BorrBDbr/lz PyTUM1n5h+1skXxWH+GjsdtZQbWkhHmgQQAaEclm35Rfz6Dio+eGqfhS4fcx6jUa5ulAHDnUHAt sUbb7Ujhl3+CLgBQE/Yw577gbz2qLHn465yDAzay3wQbg8n5NB8QCQbz9DEjINM3yAxma7ZUVKF wEXR+Uhb9e0ZeO6Z/XPshDq9sLoTaG6cpdH8oQ== X-Received: by 2002:a17:906:6a02:b0:b87:b22:f5eb with SMTP id a640c23a62f3a-b8800342ae8mr533247666b.31.1769027111654; Wed, 21 Jan 2026 12:25:11 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Robert Haas Date: Wed, 21 Jan 2026 15:25:00 -0500 X-Gm-Features: AZwV_QgxrqgrJyadI2OB8IDX-xUQ3C46mQzvXZV0oF6THIA3Ta55swaTCngls7Y Message-ID: Subject: Re: pgsql: tests: Add a test C++ extension module To: Peter Eisentraut Cc: PostgreSQL Hackers , Jelte Fennema Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jan 20, 2026 at 10:43=E2=80=AFAM Peter Eisentraut wrote: > tests: Add a test C++ extension module This patch caused my usual build process to fail. I have been setting CC=3D'ccache clang' in my environment, and I was able to fix make it work again by also setting CXX=3D'ccache clang'. Before that, I was getting my macPorts version of clang (21.1.2) for C source files but the OS version of clang (15.0.0) for c++ files. But I still don't really understand how that caused this failure, which doesn't look like it has anything to do with mixing compilers: [1/3] Compiling C++ object src/test/mo...plusext.dylib.p/test_cplusplusext.= cpp. FAILED: [code=3D1] src/test/modules/test_cplusplusext/test_cplusplusext.dylib.p/test_cplusplus= ext.cpp.o ccache c++ -Isrc/test/modules/test_cplusplusext/test_cplusplusext.dylib.p -Isrc/include -I../pgsql/src/include -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/libexec/openssl3/include -fdiagnostics-color=3Dalways -D_LIBCPP_ENABLE_ASSERTIONS=3D1 -Wall -Winvalid-pch -O2 -g -fno-strict-aliasing -fwrapv -Wmissing-prototypes -Wpointer-arith -Werror=3Dvla -Werror=3Dunguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wcast-function-type -Wformat-security -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -fvisibility=3Dhidden -fvisibility=3Dhidden -fvisibility-inlines-hidden -MD -MQ src/test/modules/test_cplusplusext/test_cplusplusext.dylib.p/test_cplusplus= ext.cpp.o -MF src/test/modules/test_cplusplusext/test_cplusplusext.dylib.p/test_cplus= plusext.cpp.o.d -o src/test/modules/test_cplusplusext/test_cplusplusext.dylib.p/test_cplusp= lusext.cpp.o -c ../pgsql/src/test/modules/test_cplusplusext/test_cplusplusext.cpp In file included from ../pgsql/src/test/modules/test_cplusplusext/test_cplusplusext.cpp:18: In file included from ../pgsql/src/include/postgres.h:48: ../pgsql/src/include/c.h:1113:10: error: expected parameter declarator alignas(MAXIMUM_ALIGNOF) char data[BLCKSZ]; ^ src/include/pg_config.h:342:25: note: expanded from macro 'MAXIMUM_ALIGNOF' #define MAXIMUM_ALIGNOF 8 ^ In file included from ../pgsql/src/test/modules/test_cplusplusext/test_cplusplusext.cpp:18: In file included from ../pgsql/src/include/postgres.h:48: ../pgsql/src/include/c.h:1113:10: error: expected ')' src/include/pg_config.h:342:25: note: expanded from macro 'MAXIMUM_ALIGNOF' #define MAXIMUM_ALIGNOF 8 ^ ../pgsql/src/include/c.h:1113:9: note: to match this '(' alignas(MAXIMUM_ALIGNOF) char data[BLCKSZ]; ^ ../pgsql/src/include/c.h:1113:2: error: a type specifier is required for all declarations alignas(MAXIMUM_ALIGNOF) char data[BLCKSZ]; ^ ../pgsql/src/include/c.h:1113:26: error: expected ';' at end of declaration= list alignas(MAXIMUM_ALIGNOF) char data[BLCKSZ]; ^ ; ../pgsql/src/include/c.h:1126:10: error: expected parameter declarator alignas(PG_IO_ALIGN_SIZE) char data[BLCKSZ]; ^ ../pgsql/src/include/pg_config_manual.h:223:27: note: expanded from macro 'PG_IO_ALIGN_SIZE' #define PG_IO_ALIGN_SIZE 4096 ^ In file included from ../pgsql/src/test/modules/test_cplusplusext/test_cplusplusext.cpp:18: In file included from ../pgsql/src/include/postgres.h:48: ../pgsql/src/include/c.h:1126:10: error: expected ')' ../pgsql/src/include/pg_config_manual.h:223:27: note: expanded from macro 'PG_IO_ALIGN_SIZE' #define PG_IO_ALIGN_SIZE 4096 ^ ../pgsql/src/include/c.h:1126:9: note: to match this '(' alignas(PG_IO_ALIGN_SIZE) char data[BLCKSZ]; ^ ../pgsql/src/include/c.h:1126:2: error: a type specifier is required for all declarations alignas(PG_IO_ALIGN_SIZE) char data[BLCKSZ]; ^ ../pgsql/src/include/c.h:1126:27: error: expected ';' at end of declaration= list alignas(PG_IO_ALIGN_SIZE) char data[BLCKSZ]; ^ ; ../pgsql/src/include/c.h:1132:10: error: expected parameter declarator alignas(PG_IO_ALIGN_SIZE) char data[XLOG_BLCKSZ]; ^ ../pgsql/src/include/pg_config_manual.h:223:27: note: expanded from macro 'PG_IO_ALIGN_SIZE' #define PG_IO_ALIGN_SIZE 4096 ^ In file included from ../pgsql/src/test/modules/test_cplusplusext/test_cplusplusext.cpp:18: In file included from ../pgsql/src/include/postgres.h:48: ../pgsql/src/include/c.h:1132:10: error: expected ')' ../pgsql/src/include/pg_config_manual.h:223:27: note: expanded from macro 'PG_IO_ALIGN_SIZE' #define PG_IO_ALIGN_SIZE 4096 ^ ../pgsql/src/include/c.h:1132:9: note: to match this '(' alignas(PG_IO_ALIGN_SIZE) char data[XLOG_BLCKSZ]; ^ ../pgsql/src/include/c.h:1132:2: error: a type specifier is required for all declarations alignas(PG_IO_ALIGN_SIZE) char data[XLOG_BLCKSZ]; ^ ../pgsql/src/include/c.h:1132:27: error: expected ';' at end of declaration= list alignas(PG_IO_ALIGN_SIZE) char data[XLOG_BLCKSZ]; ^ ; 12 errors generated. ninja: build stopped: subcommand failed. --=20 Robert Haas EDB: http://www.enterprisedb.com