From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: mario@emmenlauer.de
Subject: BUG #16336: Undefined symbols since upgrade of VS to 2019.5.2, and other issues
Date: Thu, 02 Apr 2020 09:58:25 +0000
Message-ID: <16336-756c24e637b7a336@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16336
Logged by: Mario Emmenlauer
Email address: mario@emmenlauer.de
PostgreSQL version: 12.2
Operating system: Windows 10 with Visual Studio 2019.5.2
Description:
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,
and now
version 12.2 (from which I report this issue).
First, in order to build with VS2019.5.2, I needed to make a small change
to
`src/tools/msvc/gendef.pl` because dumpbin fails for me when using
backward
slashes. So after the line
my $tmpfile = "$ARGV[0]/tmp.sym";
I added:
$tmpfile =~ s@\\@/@g;
The build then continues, but later fails with 0 Warning(s), 2922 Error(s).
The
errors are due to undefined symbols. I did not change my build from
VS2019.3,
and I can also not reproduce the issue in VS2017, so it must be related to
the
upgrade of Visual Studio. I include a few of the undefined symbols here,
but
not the full list, for brevity:
```
Creating library Debug/plpgsql/plpgsql.lib and object
Debug/plpgsql/plpgsql.exp
pl_comp.obj : error LNK2019: unresolved external symbol pg_snprintf
referenced in function do_compile [C:\gitlabci\postgres\plpgsql.vcxproj]
pl_gram.obj : error LNK2001: unresolved external symbol pg_snprintf
[C:\gitlabci\postgres\plpgsql.vcxproj]
pl_scanner.obj : error LNK2001: unresolved external symbol errstart
[C:\gitlabci\postgres\plpgsql.vcxproj]
pl_comp.obj : error LNK2001: unresolved external symbol errstart
[C:\gitlabci\postgres\plpgsql.vcxproj]
pl_exec.obj : error LNK2001: unresolved external symbol errstart
[C:\gitlabci\postgres\plpgsql.vcxproj]
pl_gram.obj : error LNK2001: unresolved external symbol errstart
[C:\gitlabci\postgres\plpgsql.vcxproj]
pl_handler.obj : error LNK2001: unresolved external symbol errstart
[C:\gitlabci\postgres\plpgsql.vcxproj]
pl_scanner.obj : error LNK2001: unresolved external symbol errfinish
[C:\gitlabci\postgres\plpgsql.vcxproj]
pl_comp.obj : error LNK2001: unresolved external symbol errfinish
[C:\gitlabci\postgres\plpgsql.vcxproj]
pl_exec.obj : error LNK2001: unresolved external symbol errfinish
[C:\gitlabci\postgres\plpgsql.vcxproj]
pl_gram.obj : error LNK2001: unresolved external symbol errfinish
[C:\gitlabci\postgres\plpgsql.vcxproj]
pl_handler.obj : error LNK2001: unresolved external symbol errfinish
[C:\gitlabci\postgres\plpgsql.vcxproj]
pl_scanner.obj : error LNK2001: unresolved external symbol errcode
[C:\gitlabci\postgres\plpgsql.vcxproj]
pl_comp.obj : error LNK2001: unresolved external symbol errcode
[C:\gitlabci\postgres\plpgsql.vcxproj]
pl_exec.obj : error LNK2001: unresolved external symbol errcode
[C:\gitlabci\postgres\plpgsql.vcxproj]
[...]
```
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: noreply@postgresql.org, mario@emmenlauer.de
Subject: Re: BUG #16336: Undefined symbols since upgrade of VS to 2019.5.2, and other issues
In-Reply-To: <16336-756c24e637b7a336@postgresql.org>
References: <16336-756c24e637b7a336@postgresql.org>
* 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