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 1w7Tkz-005MB0-06 for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 07:43:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7Tkw-008a2g-2N for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 07:43:23 +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.96) (envelope-from ) id 1w7Tkv-008a2Y-2U for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2026 07:43:22 +0000 Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w7Tks-000000028Kk-1Pyo for pgsql-hackers@postgresql.org; Tue, 31 Mar 2026 07:43:21 +0000 Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id 6A8721D00291; Tue, 31 Mar 2026 03:43:14 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Tue, 31 Mar 2026 03:43:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm1; t=1774942994; x=1775029394; bh=LuCizMDP/7GCFfhDVhqEaq7u4vs1ttHz X5oyCzlcqgQ=; b=OkSzk5AxC3WohsOebJC8VXA0NN3DMuaLNr7xcwkbOel+Nhqv taGn3wjTAlJn5lvTlpz2IhWgD3hmrTTfksLAZPlzS/UMLchmuA9PQwddKQH2Lqsh oTz+JzW7eGMqwHmJf1RL97Za825O8boBHAz3rB+KyZTVjg6CmK6cXsl9rDiDTBvk ArIsmwGcpNtKQKU7pEPFIqv5VIdjXUbdJAbdgzqzT3h89wp7tYpcs0405npaIUvM VTuUpPGJ3WH/UM0QovFM00IobqHJAR0ua1CSefpKv8tgkoP8CToawyzUpno7AxP2 JA6FVjSNv4Hwa57D7VRMb4XF0U8hxubBYD9Mcg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1774942994; x= 1775029394; bh=LuCizMDP/7GCFfhDVhqEaq7u4vs1ttHzX5oyCzlcqgQ=; b=u Ofj3TUgxby2IEJ39LtzXjAMBW9Pr46pVve0SULZmaHlYmS5NoJy+IvbpcUxxaxxe HbiabA+6aOrLhzGl9MiP+G5SBL/wsnHLMp9JjrKgNmt531KGvgrAmySBlhLtIGfA 2kBrE7WQ2p6OaKZxSM4eksCUhhfkPL3ImEIxjZ+xKIh9grQJIwDiefPdXPK7xqCy 2FjiDEftVKScsA5uVGPIPrrSzLxruCsSIWBYVG2TJ771zI7IEup/vYYlgBTK75Uj m6mf3Joydmpa0iULMl1C6khEcf4vP1If2eR/zyR2SAARAweKfnrm/YPN8AV+4sNV B2nO9aMJQFmgRkBPu2bWg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefgedufeduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgheqne cuggftrfgrthhtvghrnhepgfejtdfhkeeftdeugfeileehteeljeeghfeuledthfeutedv ffdukeefjefhgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgpdhnsggprhgtphhtthho peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegshigrvhhuiiekudesghhmrg hilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgv shhqlhdrohhrghdprhgtphhtthhopegrnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 31 Mar 2026 03:43:13 -0400 (EDT) Message-ID: Date: Tue, 31 Mar 2026 09:43:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: meson vs. llvm bitcode files To: Nazir Bilal Yavuz Cc: pgsql-hackers , Andres Freund References: <206b001d-1884-4081-bd02-bed5c92f02ba@eisentraut.org> <4286824f-40c3-4716-ad71-2085b83f3736@eisentraut.org> Content-Language: de-DE, en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 18.03.26 13:44, Nazir Bilal Yavuz wrote: >> The comment that introduces postgresql-extension-warnings.pc says >> >> +# Extension modules should likely also use -fwrapv etc. But it it's a >> bit odd >> +# to expose it to a .pc file? >> >> but then -fwrapv ends up in postgresql-extension.pc anyway. Not sure >> what was intended here. > > I asked Andres off-list and Andres said that we need to have these > flags inside the .pc file but it is not very nice since these flags > (-fwrapv for example) change the behavior. Maybe Andres could clarify > this better. Yes, it's probably right that extensions should build with the -f options that the server uses. You probably need -fwrapv and -fno-strict-aliasing at least. Then again, we don't know which compiler will consume the .pc file and whether it even supports these options in that particular spelling. >> The Requires list in my case is for example >> >> Requires: krb5-gssapi, icu-uc, icu-i18n, ldap, libxml-2.0 >= 2.6.23, >> liblz4, openssl, zlib, libzstd >= 1.4.0 >> >> but I don't think these are actually required for building extensions >> (unless a particular extension directly makes use of one of them, in >> which case they should declare that on their own). > > It seems that is how meson pkgconfig.generate() handles the > dependencies, please see [1]: > > ... > * Dependencies provided by pkg-config are added into Requires: or > Requires.private:. If a version was specified when declaring that > dependency it will be written into the generated file too. > ... Sure, but that doesn't make it right. ;-) It would be a quite a regression if extensions switched to using this .pc file (which we would want them to eventually), and then building an extension would require installing all these -dev packages. >> If we are going to install these .pc files, we also need to build them >> with with makefiles. Alternatively, we could not install them for now >> and just use them internally. > > Unfortunately, these .pc files are always installed in meson build. I > added a WIP patch (0007) for building .pc files with makefiles, I am > not sure if I am following the correct way. I would appreciate any > help on this. Seems reasonable as a start. (But there you have an empty Requires list.) >> I don't know if it's possible to make meson use a different file than >> meson.build, but if so, it might be better to keep these test >> meson.build files together with their extensions, like >> contrib/amcheck/meson-test.build. Similar to how we have "PGXS" build >> support in the makefiles. Otherwise, I'm afraid this will get >> annoying and error-prone if one has to remember to update other files >> under src/test/ when adding for example a new .sql file to amcheck. > > I don't think we can use something other than meson.build. I solved > that by editing the test_meson_extension script, now meson-test.build > files live under the actual contrib/${extension}/ directory and the > test script moves them to the correct directory. I needed to use the > get_option('meson_source_dir') hack to get paths of the source files. That seems more manageable. But I wonder whether it wouldn't be simpler to create a bespoke test module for testing this, rather than overlaying this onto production modules. That way, in the future, it would be easier to add more tests and variants and play around with this more freely without having to interfere with the real modules. >> v9-0003-meson-WIP-Add-docs-for-postgresql-extension.pc.patch >> >> Let's not rename existing ids. >> >> It seems to me that the .pc file can also be used without meson. >> Let's take that into account a bit. For example, the >> id="extend-postgres-meson" could be id="extend-postgres-pkg-config" or >> similar. > > Sorry but I didn't understand how we can add a pkg-config > documentation without renaming existing ids. 'Extension Building > Infrastructure' is covered by . I guess we > would want to add pkg-config documentation under the extension > building infrastructure, but it is something other than PGXS. So, it > being under '' doesn't sound correct to me. I mean stuff like - + seems unnecessary. You can keep the id of the existing section as "extend-pgxs" and add a new one in parallel. We don't need to have a perfect hierarchy of ids, especially if it means changing existing ones. I think at this point it's clear that this patch set needs quite a bit more consideration, so let's move it to PG20.