Re: Postgres Windows build system doesn't work with python installed in Program Files

From: David Zhang <david(dot)zhang(at)highgo(dot)ca>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
Cc: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>, Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postgres Windows build system doesn't work with python installed in Program Files
Date: 2020-06-02 00:05:50
Message-ID: 2d8d5be1-110c-eb54-b03e-0721d069b6bf@highgo.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Michael,

I performed a quick test for the path "msvc-build-init-v2.patch" using
below cases:

1. perl build.pl
2. perl build.pl debug psql
3. perl build.pl RELEASE psql
4. perl build.pl deBUG psql
5. perl build.pl psql
The above cases (case-insensitive) are all working great without any
warning for latest master branch.

When build with more than 3 parameters, yes, I got below expected
message as well.

c:\Users\david\Downloads\postgres\src\tools\msvc>perl build.pl DEbug
psql pg_baseback
Usage: build.pl [ [ <configuration> ] <component> ]
Options are case-insensitive.
configuration: Release | Debug. This sets the configuration
to build. Default is Release.
component: name of component to build. An empty value means
to build all components.

However, if I ask for help in a typical Windows' way, i.e, "perl
build.pl -help" or "perl build.pl /?", I got some messages like below,

c:\Users\david\Downloads\postgres\src\tools\msvc>perl build.pl -help
Detected hardware platform: Win32
Files src/bin/pgbench/exprscan.l
Files src/bin/pgbench/exprparse.y
Files src/bin/psql/psqlscanslash.l
Files contrib/cube/cubescan.l
Files contrib/cube/cubeparse.y
Files contrib/seg/segscan.l
Files contrib/seg/segparse.y
Generating configuration headers...
Microsoft (R) Build Engine version 16.5.1+4616136f8 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1001: Unknown switch.
Switch: -help.vcxproj

For switch syntax, type "MSBuild -help"

c:\Users\david\Downloads\postgres\src\tools\msvc>perl build.pl /?
Detected hardware platform: Win32
Files src/bin/pgbench/exprscan.l
Files src/bin/pgbench/exprparse.y
Files src/bin/psql/psqlscanslash.l
Files contrib/cube/cubescan.l
Files contrib/cube/cubeparse.y
Files contrib/seg/segscan.l
Files contrib/seg/segparse.y
Generating configuration headers...
Microsoft (R) Build Engine version 16.5.1+4616136f8 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1001: Unknown switch.
Switch: /?.vcxproj

For switch syntax, type "MSBuild -help"

It would be a bonus if the build.pl can support the "help" in Windows' way.

Thanks,

David

On 2020-05-06 10:45 p.m., Michael Paquier wrote:
> On Wed, May 06, 2020 at 12:17:03AM +0200, Juan José Santamaría Flecha wrote:
>> Please forgive me if I am being too nitpicky, but I find the comments a
>> little too verbose, a usage format might be more visual and easier to
>> explain:
>>
>> Usage: build [[CONFIGURATION] COMPONENT]
>>
>> The options are case-insensitive.
>> CONFIGURATION sets the configuration to build, "debug" or "release" (by
>> default).
>> COMPONENT defines a component to build. An empty option means all
>> components.
> Your comment makes sense to me. What about the attached then? On top
> of documenting the script usage in the code, let's trigger it if it
> gets called with more than 3 arguments. What do you think?
>
> FWIW, I forgot to mention that I don't think those warnings are worth
> a backpatch. No objections with improving things on HEAD of course.
> --
> Michael
--
David

Software Engineer
Highgo Software Inc. (Canada)
www.highgo.ca

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martín Marqués 2020-06-02 00:41:13 Re: Read access for pg_monitor to pg_replication_origin_status view
Previous Message Etsuro Fujita 2020-06-02 00:02:10 Re: [POC] Fast COPY FROM command for the table with foreign partitions