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 1pmCaU-0004uq-OP for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Apr 2023 11:55:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pmCaR-0000zA-RA for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Apr 2023 11:54:59 +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 1pmCaR-0000z0-GE for pgsql-hackers@lists.postgresql.org; Tue, 11 Apr 2023 11:54:59 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pmCaN-002EG0-S6 for pgsql-hackers@postgresql.org; Tue, 11 Apr 2023 11:54:58 +0000 Received: by mail-ej1-x629.google.com with SMTP id dm2so19746294ejc.8 for ; Tue, 11 Apr 2023 04:54:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin.org; s=google; t=1681214094; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=liNROYjjmLhfsKM4lYSYnkbi04gZk0Efiyz7sKdGx7E=; b=e6xL+71olJpZ5eF1Io4la0WqKtFzsNVFPIy38mJ3lwFIJRLUzm4jH0G51mvB1tIXUC osy6kRTS1cTmDao7DrVSOyreMvIBVYDnot7FLbn0YP2Zy898o+4H8E7q+pJFDdx/ZKyo Dtgb8bWQcEzlLuz7KOMRwOKQ+JDano6j15N27oH3cblXhb2aNVPm0j7Je38Jo3bDvD6n DegksoayQBLg7JRee6tXC6xmg8xJ81UjFd+ndWvjmKXSzYGkEyzNWdqQWHCZvlnWKn4T ARO1WnodomripfHRPPjPh+s/uxLd+/2n/N+dqcV2YhPv5WH77ZtkNyzvWz4oJe2BTjGE rPmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681214094; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=liNROYjjmLhfsKM4lYSYnkbi04gZk0Efiyz7sKdGx7E=; b=RBbNDUjPK4Ptl+dKzrnU1wpjDKVPxMD6PrX/VB+Wu9c6K48TZzXQxmIZjZf/TdJslz EcH3zj+ibGr34RsM049czgZd/zCYaTJN4OiivzKeGniSBODISKGUcqp2KpshBbjVghWD JLlb3HRyNqn6C7K/d4k3wxuumdHVuvNfqTY1wl4OL0415SCEjNqn8WiSRJIVL5u5u8cQ I1myXxr5QZQ6h4/6sKuaAS+0risO1ZCVHawjAY5Njlakf+H08U3GMmUwdlPPvNkbZKW6 H5dyNk6epd7iTlurDGgdfxoB6hvbbbsjjCEvnwv4fMhJTYJrEuzbuH98vcNIdQAjhHu+ RM0g== X-Gm-Message-State: AAQBX9eYv7AvNvQevoTexoFRJfVn2S7YACv1LJUDK8Q0MIVg6u7cZZsz BEeNF/13kNXN9zgF0MA2Qc3uMj3RyhtXPLYWO1mudA== X-Google-Smtp-Source: AKy350aS4W0W9bC5ZUxQFmzPqXxoyg4cqKZy9HpVLbCzWygJmyBWhLaaVwu8Xedf0MXH3FgOxAZoIHLHYjWXECd5n8s= X-Received: by 2002:a17:907:a707:b0:932:da0d:9375 with SMTP id vw7-20020a170907a70700b00932da0d9375mr5606964ejc.4.1681214093964; Tue, 11 Apr 2023 04:54:53 -0700 (PDT) MIME-Version: 1.0 References: <20230408191007.7lysd42euafwl74f@awork3.anarazel.de> <3611416.1680982220@sss.pgh.pa.us> <4179373.1681145767@sss.pgh.pa.us> <20230410222738.57fdxwdrdhwatnr4@awork3.anarazel.de> <1d342a44-710e-b302-7e2e-2cfbc53b3998@dunslane.net> In-Reply-To: <1d342a44-710e-b302-7e2e-2cfbc53b3998@dunslane.net> From: Dave Page Date: Tue, 11 Apr 2023 12:54:42 +0100 Message-ID: Subject: Re: When to drop src/tools/msvc support To: Andrew Dunstan Cc: Magnus Hagander , Andres Freund , Robert Haas , Alvaro Herrera , Amit Kapila , "Jonathan S. Katz" , Peter Geoghegan , Tom Lane , pgsql-hackers@postgresql.org Content-Type: multipart/alternative; boundary="000000000000dcd00505f90e2825" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000dcd00505f90e2825 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 11 Apr 2023 at 11:58, Andrew Dunstan wrote: > > On 2023-04-11 Tu 04:05, Dave Page wrote: > > > > On Tue, 11 Apr 2023 at 08:09, Magnus Hagander wrote= : > >> On Tue, Apr 11, 2023 at 12:27=E2=80=AFAM Andres Freund >> wrote: >> > >> > Hi, >> > >> > On 2023-04-10 19:55:35 +0100, Dave Page wrote: >> > > Projects other than the EDB installers use the MSVC build system - >> e.g. >> > > pgAdmin uses it=E2=80=99s own builds of libpq and other tools (psql,= pg_dump >> etc) >> > > that are pretty heavily baked into a fully automated build system >> (even the >> > > build servers and all their requirements are baked into Ansible). >> > > >> > > Changing that lot would be non-trivial, though certainly possible, >> and I >> > > suspect we=E2=80=99re not the only ones doing that sort of thing. >> > >> > Do you have a link to the code for that, if it's open? Just to get an >> > impression for how hard it'd be to switch over? >> >> >> The pgadmin docs/readme refers to >> https://github.com/pgadmin-org/pgadmin4/tree/master/pkg/win32 >> >> It clearly doesn't have the full automation stuff, but appears to have >> the parts about building the postgres dependency. >> > > Yeah, that's essentially the manual process, though I haven't tested it i= n > a while. The Ansible stuff is not currently public. I suspect (or rather, > hope) that we can pull in all the additional packages required using > Chocolatey which shouldn't be too onerous. > > Probably my main concern is that the Meson build can use the same version > of the VC++ compiler that we use (v14), which is carefully matched for > compatibility with all the various components, just in case anything pass= es > CRT pointers around. Python is the one thing we don't build ourselves on > Windows and the process will build modules like gssapi and psycopg (which > links with libpq of course), so we're basically following what they use. > > > > For meson you just need to to "pip install meson ninja" in your python > distro and you should be good to go (they will be installed in python's > Scripts directory). Don't use chocolatey to install meson/ninja - I ran > into issues doing that. > > AFAICT meson will use whatever version of VC you have installed, although > I have only been testing with VC2019. > OK, that sounds easy enough then (famous last words!) Thanks! --=20 Dave Page Blog: https://pgsnake.blogspot.com Twitter: @pgsnake EDB: https://www.enterprisedb.com --000000000000dcd00505f90e2825 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, 11 Apr 2023 at 11:58, Andrew = Dunstan <andrew@dunslane.net&= gt; wrote:
=20 =20 =20


On 2023-04-11 Tu 04:05, Dave Page wrote:
=20


On Tue, 11 Apr 2023 at 08:09, Magnus Hagander <magnus@hagander.net> wrote:
On Tue, Apr 11, 2023 at 12:27=E2=80=AFAM Andres Freund <andres@anarazel.de> wrote:
>
> Hi,
>
> On 2023-04-10 19:55:35 +0100, Dave Page wrote:
> > Projects other than the EDB installers use the MSVC build system - e.g.
> > pgAdmin uses it=E2=80=99s own builds of libpq and oth= er tools (psql, pg_dump etc)
> > that are pretty heavily baked into a fully automated build system (even the
> > build servers and all their requirements are baked into Ansible).
> >
> > Changing that lot would be non-trivial, though certainly possible, and I
> > suspect we=E2=80=99re not the only ones doing that so= rt of thing.
>
> Do you have a link to the code for that, if it's open? Just to get an
> impression for how hard it'd be to switch over?


The pgadmin docs/readme refers to
https://github.com/pgadmin-= org/pgadmin4/tree/master/pkg/win32

It clearly doesn't have the full automation stuff, but appears to have
the parts about building the postgres dependency.

Yeah, that's essentially the manual process, though I haven't tested it in a while. The Ansible stuff is not currently public. I suspect (or rather, hope) that we can pull in all the additional packages required using Chocolatey which shouldn't be too onerous.

Probably my main concern is that the Meson build can use the same version of the VC++ compiler that we use (v14), which is carefully matched for compatibility with all the various components, just in case anything passes CRT pointers around. Python is the one thing we don't build ourselves on Windows and the process will build modules like gssapi and psycopg (which links with libpq of course), so we're basically following what they use.



For meson you just need to to "pip install meson ninja" in= your python distro and you should be good to go (they will be installed in python's Scripts directory). Don't use chocolatey to insta= ll meson/ninja - I ran into issues doing that.

AFAICT meson will use whatever version of VC you have installed, although I have only been testing with VC2019.

=
OK, that sounds easy enough then (famous last words!)

Thanks!=C2=A0

--
<= div dir=3D"ltr">Dave Page
Blog: https://pgsnake.blogspot.com
Twitter: @pgsnake
EDB: https:= //www.enterprisedb.com

--000000000000dcd00505f90e2825--