pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mario Emmenlauer <mario@emmenlauer.de>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16336: Undefined symbols since upgrade of VS to 2019.5.2, and other issues
Date: Mon, 6 Apr 2020 16:06:28 +0200
Message-ID: <f2496c70-4980-3710-ecb2-3e378bc0e25f@emmenlauer.de> (raw)
In-Reply-To: <798d4a9b-1516-a151-4b4b-fba9b5374dc4@emmenlauer.de>
References: <16336-756c24e637b7a336@postgresql.org>
	<798d4a9b-1516-a151-4b4b-fba9b5374dc4@emmenlauer.de>

On 02.04.20 13:59, Mario Emmenlauer wrote:
> 
> On 02.04.20 11:58, PG Bug reporting form wrote:
>> The following bug has been logged on the website:
>> I've recently upgraded Visual Studio from 2019.3 to 2019.5.2. This broke
>> my
>> build of PostgreSQL. First I tried 11.5 which fails with the same errors,
> 
> Sorry for this, but it seems that PostgreSQL is not (directly) at fault for
> this problem. I can now isolate that within some of the Perl methods of the
> build, the PATH gets reset to the default Windows PATH. This seems to be
> related to the recent update of Visual Studio.
> 
> Now this in turn triggers some unfortunate events:
>  - I ensure that a native Perl is in PATH before any other Perl
>  - I furthermore set the native Perl path in buildenv.pl
>  - I start the build from the native Perl
>  - But this PATH is reset to the default system PATH somewhere in the build
>  - In the default system PATH, there is Cygwin Perl, which I require for
>    building a few other packages

So I've finally found the root cause of the problem. I'm reporting
this here in the hope it may be useful to somebody else in the future.
Since more recent versions of Visual Studio 2019 (somewhere between
VS 2019.3 and VS2019.5.2) a behavior with respect to PATH was changed.
Since VS2017, the script `vcvarsall.bat` preserves the PATH before
adding Visual Studio directories in `__VSCMD_PREINIT_PATH`. However
as far as I could see, it is not used later anywhere again. This has
changed in recent Visual Studio, where __VSCMD_PREINIT_PATH is later
appended to PATH again!

It turns out in my environment I clean Cygwin from PATH before
building PostgreSQL, but I did not clean __VSCMD_PREINIT_PATH. So
via this route, Cygwin was re-added to PATH, leading to build
problems.

Please close this issue, and thanks for your consideration.

All the best,

    Mario Emmenlauer





view thread (3+ messages)

Message-ID: <f2496c70-4980-3710-ecb2-3e378bc0e25f@emmenlauer.de>
Permalink:  ../f2496c70-4980-3710-ecb2-3e378bc0e25f@emmenlauer.de/
Also on:    postgresql.org/message-id/f2496c70-4980-3710-ecb2-3e378bc0e25f@emmenlauer.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: mario@emmenlauer.de
  Subject: Re: BUG #16336: Undefined symbols since upgrade of VS to 2019.5.2, and other issues
  In-Reply-To: <f2496c70-4980-3710-ecb2-3e378bc0e25f@emmenlauer.de>
  References: <16336-756c24e637b7a336@postgresql.org> <798d4a9b-1516-a151-4b4b-fba9b5374dc4@emmenlauer.de> <f2496c70-4980-3710-ecb2-3e378bc0e25f@emmenlauer.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox