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 1w7vTx-0002GB-1p for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 13:19:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7vTv-00065Q-2t for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 13:19:40 +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 1w7vTu-00065I-36 for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 13:19:40 +0000 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w7vTt-000000000xj-1LCj for pgsql-hackers@postgresql.org; Wed, 01 Apr 2026 13:19:38 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id EEC47EC02B5; Wed, 1 Apr 2026 09:19:35 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Wed, 01 Apr 2026 09:19:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc: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=fm2; t=1775049575; x=1775135975; bh=uQjsGf8xpW RHRXVXmBBUMKkX8IsDJsCFjyKOA5DvqoE=; b=K9mVxmZHEVuzOeQsXdCIO6j8yl DbjF7Tbpj/OrUdhgI3nbQKGn7uJnFID2VzBgTAZuM0YP8Ah2Jnd3xDH6m/xY0mpU B59dmDC4+WCSheijsQxaEMcx/S/oI8/3inXUYZw12kVZN/N+vhTswlGXdYzgJi+l B0zHpL7l3UhCeQBq4AsPuJ+HcsyosQbd9UPg/IOtLV09yCzTCVgnHE2DzY7BLdG+ QwEtBS4ELk35aj2vu29Ep6fgS4gSj64b1MTBLzygeTILPvwhLYhlu8Mceu69C+Ne 5d4kJbH0hqvgu3Kq3aZBEp95zcse2z6a8vn18L0/KKPeiTGSdLIDnyyNxnYw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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= 1775049575; x=1775135975; bh=uQjsGf8xpWRHRXVXmBBUMKkX8IsDJsCFjyK OA5DvqoE=; b=f7f8R68QaAz/hkISt1GnJcPccxkrML/ZEb587MSVpIqczlPWD+d K5rv5dTPuqG8tQ05qODW77xCtPQuN8hs99qzXKl7/a/k7IHlmKdq6p7Aa47sBTNt ZV86xLlxfD2KfstGAOlKh7nSchlVZH1qPB3d59qd7PmzvBBdId3Pej4iqGBAH0Lw wqUQa3pvB3EafS/4Ke5Uw/uUsnaUFCv3dh8tGLqIv3sJ5H/GixGBn0BCVAKqatci lyvm2gYJsTzCYXN0uFSPRbfYbYrhjb0w7DEhQ7H/61Pg90LNw+MdaNxYVDLM2Bjr GgZco5fPFhPhdWsByE41AAeOZ213V92EOXQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdefvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epfffhvfevuffkfhggtggujgesthdtsfdttddtvdenucfhrhhomheptehnughrvghsucfh rhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrthhtvg hrnhepfeffgfelvdffgedtveelgfdtgefghfdvkefggeetieevjeekteduleevjefhueeg necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghnug hrvghssegrnhgrrhgriigvlhdruggvpdhnsggprhgtphhtthhopeefpdhmohguvgepshhm thhpohhuthdprhgtphhtthhopehpvghtvghrsegvihhsvghnthhrrghuthdrohhrghdprh gtphhtthhopegshigrvhhuiiekudesghhmrghilhdrtghomhdprhgtphhtthhopehpghhs qhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Apr 2026 09:19:35 -0400 (EDT) Date: Wed, 1 Apr 2026 09:19:34 -0400 From: Andres Freund To: Peter Eisentraut Cc: Nazir Bilal Yavuz , pgsql-hackers Subject: Re: meson vs. llvm bitcode files Message-ID: <3whtmw6twe442o3r44gsagheq5cs2clcghzjeo7rljstpdemrh@oojczkhk2mbt> References: <4286824f-40c3-4716-ad71-2085b83f3736@eisentraut.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2026-03-31 09:43:11 +0200, Peter Eisentraut wrote: > 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. At the moment you can't really build server extensions against a postgres built with a different compiler. E.g. building extensions with clang against a server built with gcc triggers hundreds of warnings. We just do too many detections at configure time to make that reliably work. I don't think this is a meson specific problem... > > > 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. I'm pretty confused - isn't what meson does the only reasonable thing? You can't reliably build an extension without having all the dependencies that the server was built against also installed, because we have headers that include the dependencies. If you e.g. don't have openssl or kerberos installed any [indirect ]include of libpq-be.h will fail. I don't understand how this would be a regression. And adding these dependencies to eitehr Requires or Requires.private seems pretty much required to ever get static linking to work. Greetings, Andres Freund