Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1puIag-0003GL-NS for pgsql-hackers@arkaria.postgresql.org; Wed, 03 May 2023 19:56:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1puIZh-0002hQ-9D for pgsql-hackers@arkaria.postgresql.org; Wed, 03 May 2023 19:55:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1puIZh-0002hH-0H for pgsql-hackers@lists.postgresql.org; Wed, 03 May 2023 19:55:41 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1puIZZ-000OxR-AV for pgsql-hackers@lists.postgresql.org; Wed, 03 May 2023 19:55:40 +0000 Received: (Authenticated sender: adsend@dunslane.net) by mail.gandi.net (Postfix) with ESMTPSA id 4D90C24000B; Wed, 3 May 2023 19:55:29 +0000 (UTC) Content-Type: multipart/alternative; boundary="------------u4Xl50k7hKGKLKAEo3CevjsP" Message-ID: Date: Wed, 3 May 2023 15:55:28 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: issue with meson builds on msys2 Content-Language: en-US From: Andrew Dunstan To: Andres Freund Cc: Tom Lane , pgsql-hackers@lists.postgresql.org References: <08dd6053-deee-52e9-954b-eb69232905c9@dunslane.net> <2506819.1681761221@sss.pgh.pa.us> <7d7dcc20-ba19-5340-9be8-f255e8b42edc@dunslane.net> <20230420150652.jciazjap223iznjp@awork3.anarazel.de> <5bddd941-9819-6655-7a71-3f346050583e@dunslane.net> <6efeb45a-07f9-2291-c8f8-9fb4abbb6ebc@dunslane.net> <20230427221828.2qo7z4xb4f7islln@awork3.anarazel.de> <236c0354-62b1-0ae1-a252-4c866bc1c5d6@dunslane.net> In-Reply-To: <236c0354-62b1-0ae1-a252-4c866bc1c5d6@dunslane.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------u4Xl50k7hKGKLKAEo3CevjsP Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2023-05-03 We 09:20, Andrew Dunstan wrote: > > > On 2023-04-27 Th 18:18, Andres Freund wrote: >> Hi, >> >> On 2023-04-26 09:59:05 -0400, Andrew Dunstan wrote: >>> Still running into this, and I am rather stumped. This is a blocker for >>> buildfarm support for meson: >>> >>> Here's a simple illustration of the problem. If I do the identical test with >>> a non-meson build there is no problem: >> This happens 100% reproducible? > > > For a sufficiently modern installation of msys2 (20230318 version) > this is reproducible on autoconf builds as well. > > For now it's off my list of meson blockers. I will pursue the issue > when I have time, but for now the IPC::Run workaround is sufficient. > > The main thing that's now an issue on Windows is support for various > options like libxml2. I installed the libxml2 distro from the package > manager scoop, generated .lib files for the libxml2 and libxslt DLLs, > and was able to build with autoconf on msys2, and with our MSVC > support, but not with meson in either case. It looks like we need to > expand the logic in meson.build for a number of these, just as we have > done for perl, python, openssl, ldap etc. > > > I've actually made some progress on this front. I grabbed and built https://github.com/pkgconf/pkgconf.git (with meson :-) ) After that I set PKG_CONFIG_PATH to point to where the libxml .pc files are installed, and lo and behold the meson/msvc build worked with libxml / libxslt. I did have to move libxml's openssl.pc file aside, as the distro's version of openssl is extremely old, and we don't want to use it (I'm using 3.1.0). Of course, this imposes an extra build dependency for Windows, but it's not too onerous. It also means that if anyone wants to use some dependency without a .pc file they would need to create one. I'll keep trying to expand the list of things I configure with. Next targets will include ldap, lz4 and zstd. I also need to test this with msys2, so fat I have only tested with MSVC. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------u4Xl50k7hKGKLKAEo3CevjsP Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit


On 2023-05-03 We 09:20, Andrew Dunstan wrote:


On 2023-04-27 Th 18:18, Andres Freund wrote:
Hi,

On 2023-04-26 09:59:05 -0400, Andrew Dunstan wrote:
Still running into this, and I am rather stumped. This is a blocker for
buildfarm support for meson:

Here's a simple illustration of the problem. If I do the identical test with
a non-meson build there is no problem:
This happens 100% reproducible?


For a sufficiently modern installation of msys2 (20230318 version) this is reproducible on autoconf builds as well.

For now it's off my list of meson blockers. I will pursue the issue when I have time, but for now the IPC::Run workaround is sufficient.

The main thing that's now an issue on Windows is support for various options like libxml2. I installed the libxml2 distro from the package manager scoop, generated .lib files for the libxml2 and libxslt DLLs, and was able to build with autoconf on msys2, and with our MSVC support, but not with meson in either case. It looks like we need to expand the logic in meson.build for a number of these, just as we have done for perl, python, openssl, ldap etc.




I've actually made some progress on this front. I grabbed and built https://github.com/pkgconf/pkgconf.git (with meson :-) )

After that I set PKG_CONFIG_PATH to point to where the libxml .pc files are installed, and lo and behold the meson/msvc build worked with libxml / libxslt. I did have to move libxml's openssl.pc file aside, as the distro's version of openssl is extremely old, and we don't want to use it (I'm using 3.1.0).

Of course, this imposes an extra build dependency for Windows, but it's not too onerous.

It also means that if anyone wants to use some dependency without a .pc file they would need to create one. I'll keep trying to expand the list of things I configure with.

Next targets will include ldap, lz4 and zstd.

I also need to test this with msys2, so fat I have only tested with MSVC.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com
--------------u4Xl50k7hKGKLKAEo3CevjsP--