Re: MSVC builld of 9.5.12 is broken?

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: MSVC builld of 9.5.12 is broken?
Дата
Msg-id CABUevEwVKbv6pSOweUQTNT=7d8gKLxwBSg37vqCr3=g=K_qOAQ@mail.gmail.com
обсуждение исходный текст
Ответ на MSVC builld of 9.5.12 is broken?  (Victor Wagner <vitus@wagner.pp.ru>)
Ответы Re: MSVC builld of 9.5.12 is broken?
Re: MSVC builld of 9.5.12 is broken?
Re: MSVC builld of 9.5.12 is broken?
Список pgsql-hackers
On Tue, Feb 27, 2018 at 11:27 AM, Victor Wagner <vitus@wagner.pp.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?

--

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Victor Wagner
Дата:
Сообщение: MSVC builld of 9.5.12 is broken?
Следующее
От: Victor Wagner
Дата:
Сообщение: Re: MSVC builld of 9.5.12 is broken?