Thread: Postgres Win32 build broken?

Postgres Win32 build broken?

From
Ranier Vilela
Date:
Hi hackers,

I'm not a perl specialist and it seems to me that the Win32 build is broken.
The Win32 build is still important because of the 32-bit clients still in use.
I'm investigating the problem.

-----------------------------------------------------------------------------------------------
Detected hardware platform: Win32
Files src/bin/pgbench/exprscan.l
Files src/bin/pgbench/exprparse.y
Files src/bin/psql/psqlscanslash.l
Generating configuration headers...
Microsoft(R) Build Engine versão 16.11.0+0538acc04 para .NET Framework
Copyright (C) Microsoft Corporation. Todos os direitos reservados.

Compilando os projetos desta solução um por vez. Para habilitar o build paralelo, adicione a opção "-m".
Compilação de 31/08/2021 19:35:11 iniciada.
Projeto "C:\dll\postgres\postgres_head\pgsql.sln" no nó 1 (destinos padrão).
C:\dll\postgres\postgres_head\pgsql.sln.metaproj : error MSB4126: A configuração da solução especificada "Release|x86" é inválida. Especifique uma configuração de solução válida com as propriedades Configuratio
n e Platform (por exemplo, MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Qualquer CPU") ou deixe essas propriedades em branco para usar a configuração de solução padrão. [C:\dll\postgres\postgres
_head\pgsql.sln]
Projeto de compilação pronto "C:\dll\postgres\postgres_head\pgsql.sln" (destinos padrão) -- FALHA.


FALHA da compilação.

"C:\dll\postgres\postgres_head\pgsql.sln" (destino padrão) (1) ->
(ValidateSolutionConfiguration destino) ->
  C:\dll\postgres\postgres_head\pgsql.sln.metaproj : error MSB4126: A configuração da solução especificada "Release|x86" é inválida. Especifique uma configuração de solução válida com as propriedades Configurat
ion e Platform (por exemplo, MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Qualquer CPU") ou deixe essas propriedades em branco para usar a configuração de solução padrão. [C:\dll\postgres\postgr
es_head\pgsql.sln]
--------------------------------------------------------------------------------

regards,
Ranier Vilela

Re: Postgres Win32 build broken?

From
Michael Paquier
Date:
On Tue, Aug 31, 2021 at 07:49:40PM -0300, Ranier Vilela wrote:
> I'm not a perl specialist and it seems to me that the Win32 build is broken.
> The Win32 build is still important because of the 32-bit clients still in
> use.
> I'm investigating the problem.

Being able to see the command you are using for build.pl, your
buildenv.pl and/or config.pl, as well as your build dependencies
should help to know what's wrong.

MSVC builds are tested by various buildfarm members on a daily basis,
and nothing is red.  I also have a x86 and x64 configuration with
VS2015 that prove to work as of HEAD at de1d4fe, FWIW.  Now, by
experience, one could say that N Windows PG developpers finish with at
least (N+1) different environments.  Basically Simon Riggs's theorem
applied to Windows development..
--
Michael

Attachment

Re: Postgres Win32 build broken?

From
Ranier Vilela
Date:
Em ter., 31 de ago. de 2021 às 22:52, Michael Paquier <michael@paquier.xyz> escreveu:
On Tue, Aug 31, 2021 at 07:49:40PM -0300, Ranier Vilela wrote:
> I'm not a perl specialist and it seems to me that the Win32 build is broken.
> The Win32 build is still important because of the 32-bit clients still in
> use.
> I'm investigating the problem.

Being able to see the command you are using for build.pl, your
buildenv.pl and/or config.pl, as well as your build dependencies
should help to know what's wrong.
When I build Postgres to post, I basically don't change anything.
Everything is the head's default.
config.pl does not exist
command to build, either on x64 or Win32.
build.bat <enter>
 

MSVC builds are tested by various buildfarm members on a daily basis,
and nothing is red.  I also have a x86 and x64 configuration with
VS2015 that prove to work as of HEAD at de1d4fe, FWIW.  Now, by
experience, one could say that N Windows PG developpers finish with at
least (N+1) different environments.  Basically Simon Riggs's theorem
applied to Windows development..
I'm using the latest msvc 2019.
From the error message, there is no Release|x86, but Release|Win32.
But I still haven't found where are setting this "Release|x86"
 
regards,
Ranier Vilela

Re: Postgres Win32 build broken?

From
Andrew Dunstan
Date:
On 8/31/21 9:52 PM, Michael Paquier wrote:
> On Tue, Aug 31, 2021 at 07:49:40PM -0300, Ranier Vilela wrote:
>> I'm not a perl specialist and it seems to me that the Win32 build is broken.
>> The Win32 build is still important because of the 32-bit clients still in
>> use.
>> I'm investigating the problem.
> Being able to see the command you are using for build.pl, your
> buildenv.pl and/or config.pl, as well as your build dependencies
> should help to know what's wrong.
>
> MSVC builds are tested by various buildfarm members on a daily basis,
> and nothing is red.  I also have a x86 and x64 configuration with
> VS2015 that prove to work as of HEAD at de1d4fe, FWIW.  Now, by
> experience, one could say that N Windows PG developpers finish with at
> least (N+1) different environments.  Basically Simon Riggs's theorem
> applied to Windows development..



I am seeing the same result as Ranier using VS2017 and VS 2019.


cheers


andrew


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




Re: Postgres Win32 build broken?

From
Andrew Dunstan
Date:
On 9/1/21 4:00 PM, Andrew Dunstan wrote:
> On 8/31/21 9:52 PM, Michael Paquier wrote:
>> On Tue, Aug 31, 2021 at 07:49:40PM -0300, Ranier Vilela wrote:
>>> I'm not a perl specialist and it seems to me that the Win32 build is broken.
>>> The Win32 build is still important because of the 32-bit clients still in
>>> use.
>>> I'm investigating the problem.
>> Being able to see the command you are using for build.pl, your
>> buildenv.pl and/or config.pl, as well as your build dependencies
>> should help to know what's wrong.
>>
>> MSVC builds are tested by various buildfarm members on a daily basis,
>> and nothing is red.  I also have a x86 and x64 configuration with
>> VS2015 that prove to work as of HEAD at de1d4fe, FWIW.  Now, by
>> experience, one could say that N Windows PG developpers finish with at
>> least (N+1) different environments.  Basically Simon Riggs's theorem
>> applied to Windows development..
>
>
> I am seeing the same result as Ranier using VS2017 and VS 2019.
>
>

But not with VS2013. If you need to build 32 bit client libraries, using
an older VS release is probably your best bet.


chers


andrew

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




Re: Postgres Win32 build broken?

From
Michael Paquier
Date:
On Wed, Sep 01, 2021 at 06:49:31PM -0400, Andrew Dunstan wrote:
> On 9/1/21 4:00 PM, Andrew Dunstan wrote:
>> I am seeing the same result as Ranier using VS2017 and VS 2019.
>
> But not with VS2013. If you need to build 32 bit client libraries, using
> an older VS release is probably your best bet.

That's annoying.  Should we be more careful with the definition of
{platform} in DeterminePlatform for those versions of VS?
--
Michael

Attachment

Re: Postgres Win32 build broken?

From
Ranier Vilela
Date:
Em qua., 1 de set. de 2021 às 19:49, Andrew Dunstan <andrew@dunslane.net> escreveu:

On 9/1/21 4:00 PM, Andrew Dunstan wrote:
> On 8/31/21 9:52 PM, Michael Paquier wrote:
>> On Tue, Aug 31, 2021 at 07:49:40PM -0300, Ranier Vilela wrote:
>>> I'm not a perl specialist and it seems to me that the Win32 build is broken.
>>> The Win32 build is still important because of the 32-bit clients still in
>>> use.
>>> I'm investigating the problem.
>> Being able to see the command you are using for build.pl, your
>> buildenv.pl and/or config.pl, as well as your build dependencies
>> should help to know what's wrong.
>>
>> MSVC builds are tested by various buildfarm members on a daily basis,
>> and nothing is red.  I also have a x86 and x64 configuration with
>> VS2015 that prove to work as of HEAD at de1d4fe, FWIW.  Now, by
>> experience, one could say that N Windows PG developpers finish with at
>> least (N+1) different environments.  Basically Simon Riggs's theorem
>> applied to Windows development..
>
>
> I am seeing the same result as Ranier using VS2017 and VS 2019.
>
>

But not with VS2013. If you need to build 32 bit client libraries, using
an older VS release is probably your best bet.
Thanks Andrew, but I finally got a workaround for the problem.
set MSBFLAGS=/p:Platform="Win32"

Now Postgres builds fine in 32 bits with the latest msvc (2019).
Is it worth documenting this?

regards,
Ranier Vilela
Attachment

Re: Postgres Win32 build broken?

From
Andrew Dunstan
Date:


On Sep 1, 2021, at 8:01 PM, Ranier Vilela <ranier.vf@gmail.com> wrote:


Em qua., 1 de set. de 2021 às 19:49, Andrew Dunstan <andrew@dunslane.net> escreveu:

On 9/1/21 4:00 PM, Andrew Dunstan wrote:
> On 8/31/21 9:52 PM, Michael Paquier wrote:
>> On Tue, Aug 31, 2021 at 07:49:40PM -0300, Ranier Vilela wrote:
>>> I'm not a perl specialist and it seems to me that the Win32 build is broken.
>>> The Win32 build is still important because of the 32-bit clients still in
>>> use.
>>> I'm investigating the problem.
>> Being able to see the command you are using for build.pl, your
>> buildenv.pl and/or config.pl, as well as your build dependencies
>> should help to know what's wrong.
>>
>> MSVC builds are tested by various buildfarm members on a daily basis,
>> and nothing is red.  I also have a x86 and x64 configuration with
>> VS2015 that prove to work as of HEAD at de1d4fe, FWIW.  Now, by
>> experience, one could say that N Windows PG developpers finish with at
>> least (N+1) different environments.  Basically Simon Riggs's theorem
>> applied to Windows development..
>
>
> I am seeing the same result as Ranier using VS2017 and VS 2019.
>
>

But not with VS2013. If you need to build 32 bit client libraries, using
an older VS release is probably your best bet.
Thanks Andrew, but I finally got a workaround for the problem.
set MSBFLAGS=/p:Platform="Win32"

Now Postgres builds fine in 32 bits with the latest msvc (2019).
Is it worth documenting this?

Better to try to automate it.

Cheers

Andrew

Re: Postgres Win32 build broken?

From
Andrew Dunstan
Date:
On 9/1/21 8:01 PM, Ranier Vilela wrote:
> Em qua., 1 de set. de 2021 às 19:49, Andrew Dunstan
> <andrew@dunslane.net <mailto:andrew@dunslane.net>> escreveu:
>
>
>     On 9/1/21 4:00 PM, Andrew Dunstan wrote:
>     > On 8/31/21 9:52 PM, Michael Paquier wrote:
>     >> On Tue, Aug 31, 2021 at 07:49:40PM -0300, Ranier Vilela wrote:
>     >>> I'm not a perl specialist and it seems to me that the Win32
>     build is broken.
>     >>> The Win32 build is still important because of the 32-bit
>     clients still in
>     >>> use.
>     >>> I'm investigating the problem.
>     >> Being able to see the command you are using for build.pl
>     <http://build.pl>, your
>     >> buildenv.pl <http://buildenv.pl> and/or config.pl
>     <http://config.pl>, as well as your build dependencies
>     >> should help to know what's wrong.
>     >>
>     >> MSVC builds are tested by various buildfarm members on a daily
>     basis,
>     >> and nothing is red.  I also have a x86 and x64 configuration with
>     >> VS2015 that prove to work as of HEAD at de1d4fe, FWIW.  Now, by
>     >> experience, one could say that N Windows PG developpers finish
>     with at
>     >> least (N+1) different environments.  Basically Simon Riggs's
>     theorem
>     >> applied to Windows development..
>     >
>     >
>     > I am seeing the same result as Ranier using VS2017 and VS 2019.
>     >
>     >
>
>     But not with VS2013. If you need to build 32 bit client libraries,
>     using
>     an older VS release is probably your best bet.
>
> Thanks Andrew, but I finally got a workaround for the problem.
> set MSBFLAGS=/p:Platform="Win32"
>
> Now Postgres builds fine in 32 bits with the latest msvc (2019).
> Is it worth documenting this?
>
>


I think we should be able to detect this and do it automatically in
src/tools/msvc/build.pl, or possibly in the project files.


cheers


andrew

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