Postgres Win32 build broken?

Started by Ranier Vilelaover 4 years ago9 messages
#1Ranier Vilela
ranier.vf@gmail.com

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

#2Michael Paquier
michael@paquier.xyz
In reply to: Ranier Vilela (#1)
Re: Postgres Win32 build broken?

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

#3Ranier Vilela
ranier.vf@gmail.com
In reply to: Michael Paquier (#2)
Re: Postgres Win32 build broken?

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

#4Andrew Dunstan
andrew@dunslane.net
In reply to: Michael Paquier (#2)
Re: Postgres Win32 build broken?

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

#5Andrew Dunstan
andrew@dunslane.net
In reply to: Andrew Dunstan (#4)
Re: Postgres Win32 build broken?

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

#6Michael Paquier
michael@paquier.xyz
In reply to: Andrew Dunstan (#5)
Re: Postgres Win32 build broken?

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

#7Ranier Vilela
ranier.vf@gmail.com
In reply to: Andrew Dunstan (#5)
1 attachment(s)
Re: Postgres Win32 build broken?

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

Attachments:

doc_build_in_32bits.patchapplication/octet-stream; name=doc_build_in_32bits.patchDownload
diff --git a/doc/src/sgml/install-windows.sgml b/doc/src/sgml/install-windows.sgml
index ba794b8c93..7a38a49ee9 100644
--- a/doc/src/sgml/install-windows.sgml
+++ b/doc/src/sgml/install-windows.sgml
@@ -155,6 +155,10 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
   command (msbuild or vcbuild):
 <programlisting>
 $ENV{MSBFLAGS}="/m";
+ <para>
+  To build Postgres in 32 bits, set Platform before build command:
+<programlisting>
+$ENV{MSBFLAGS}="/p:Platform="Win32";
 </programlisting>
  </para>
#8Andrew Dunstan
andrew@dunslane.net
In reply to: Ranier Vilela (#7)
Re: Postgres Win32 build broken?

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

#9Andrew Dunstan
andrew@dunslane.net
In reply to: Ranier Vilela (#7)
Re: Postgres Win32 build broken?

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&gt;, your

buildenv.pl <http://buildenv.pl&gt; and/or config.pl

<http://config.pl&gt;, 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