Re: MSVC builld of 9.5.12 is broken?

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>, Noah Misch <noah(at)leadboat(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: MSVC builld of 9.5.12 is broken?
Date: 2018-02-27 10:43:34
Message-ID: CABUevEwVKbv6pSOweUQTNT=7d8gKLxwBSg37vqCr3=g=K_qOAQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 27, 2018 at 11:27 AM, Victor Wagner <vitus(at)wagner(dot)pp(dot)ru> wrote:

> Hello, hackers.
>
> I've tried to build last state of REL9_5_STABLE branch (commit
> 1f19e46124eee8c6a54834) and under Win32 encountered following errors:
>
>
> C:\Program Files (x86)\Microsoft Visual Studio
> 12.0\VC\bin\amd64\link.exe /ERRORREPORT:QUEUE /OUT:".\Release\createdb\
> createdb.exe"
> /INCREMENTAL:NO /NOLOGO
> "C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\dependencies\zlib\lib\zdll.
> lib"
> "C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\dependencies\openssl\lib\VC\
> ssleay32MD.lib"
> "C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\dependencies\openssl\lib\VC\
> libeay32MD.lib"
> "C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\dependencies\libintl\lib\
> libintl.lib"
> "C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\
> dependencies\iconv\lib\iconv.lib"
> "C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\dependencies\libxml2\lib\
> libxml2.lib"
> "C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\dependencies\libxslt\lib\
> libxslt.lib"
> "C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\dependencies\icu\lib\icuin.
> lib"
> "C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\dependencies\icu\lib\icuuc.
> lib"
> "C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\dependencies\wineditline\
> lib64\edit.lib"
> Release/libpq/libpq.lib Release/libpgcommon/libpgcommon.lib
> Release/libpgport/libpgport.lib ws2_32.lib kernel32.lib user32.lib
> gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib
> oleaut32.lib uuid.lib odbc32.lib
> odbccp32.lib /NODEFAULTLIB:libc /MANIFEST /MANIFESTUAC:"level='asInvoker'
> uiAccess='false'" /manifest:embed /DEBUG /PDB:".\Release\createdb\
> createdb.pdb"
> /SUBSYSTEM:CONSOLE /STACK:"4194304" /TLBID:1 /DYNAMICBASE:NO /NXCOMPAT
> /IMPLIB:".\Release\createdb\createdb.lib"
> /MACHINE:X64 /ignore:4197 .\Release\createdb\win32ver.res
> .\Release\createdb\createdb.obj
> "C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\
> postgresql\postgrespro-9.5.12.1\Release\libpq\libpq.lib"
> "C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\
> postgresql\postgrespro-9.5.12.1\Release\libpgcommon\libpgcommon.lib"
> "C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\
> postgresql\postgrespro-9.5.12.1\Release\libpgport\libpgport.lib"
> createdb.obj : error LNK2019: unresolved external symbol
> handle_help_version_opts referenced in function main
> [C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\
> postgresql\postgrespro-9.5.12.1\createdb.vcxproj]
> createdb.obj : error LNK2019: unresolved external symbol
> connectMaintenanceDatabase referenced in function main
> [C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\
> postgresql\postgrespro-9.5.12.1\createdb.vcxproj]
> createdb.obj : error LNK2019: unresolved external symbol fmtId
> referenced in function main
> [C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\
> postgresql\postgrespro-9.5.12.1\createdb.vcxproj]
> createdb.obj : error LNK2019: unresolved external symbol
> appendStringLiteralConn referenced in function main
> [C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\
> postgresql\postgrespro-9.5.12.1\createdb.vcxproj]
> .\Release\createdb\createdb.exe :
> fatal error LNK1120: 4 unresolved externals
> [C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\
> postgresql\postgrespro-9.5.12.1\createdb.vcxproj]
> Done Building Project
> "C:\pgbuild\pgpro-9.5-msvc2013-amd64\builddir\
> postgresql\postgrespro-9.5.12.1\createdb.vcxproj" (default
> targets) -- FAILED.
>
> And much more similar errors for all applications in src/bin/scripts
> Problem is reproducible with both MSVC 2010 and MSVC2013 and both 32
> and 64 bit builds.
>
> These errors seems to be caused by commit 91f3ffc5249
> which improves readability of src/bin/scripts/Makefile for
> humans by moving list of common object files into variable.
>
> Unfortunately, it makes this Makefile unreadable for perl scripts
> in src/tools/msvc, which generate Microsift Visual Studio projects.
>
> So, Mkvcbuild.pm should be somehow fixed as well. As this module all
> consists of special cases and hidden knowledge, the simplest way to fix
> is to add special parsing of SCRIPTS_COMMON variable.
>

(This can also be seen on the buildfarm which is red for 9.5 and earlier
with msvc)

It's also interesting to note that this did not break in HEAD, 10 or 9.6.
And none of those actually have the SCRIPTS_COMMON code.

I'm unsure why this was introduced in 9.5 and earlier, but not in the newer
ones. This smells like a possible backpatch mistake, in which case that
part should probably be backed out of the old branches rather than teaching
mkvcbuild about it.

Noah? Can you confirm if it was intentional?

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Victor Wagner 2018-02-27 10:53:03 Re: MSVC builld of 9.5.12 is broken?
Previous Message Victor Wagner 2018-02-27 10:27:22 MSVC builld of 9.5.12 is broken?