Building Qt from source on Windows failed with "-silent" option
-
Windows 7 Pro PS1 - Microsoft Windows [Version 6.1.7601]
MSVC 2015 - Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
Qt 5.9.0I was using the following batch script to build a static installation of Qt from source
CALL "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 SET _ROOT=C:\Qt\src SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH% SET _ROOT= CALL "C:\Qt\src\configure.bat" ^ -debug-and-release ^ -opensource ^ -confirm-license ^ -silent ^ -prefix "C:\Qt\Qt5.9.0\5.9\msvc2015-static" ^ -static ^ -optimize-size ^ -make libs ^ -nomake examples ^ -nomake tools ^ -platform win32-msvc ^ -no-icu ^ -strip ^ -no-dbus ^ -no-opengl ^ -no-sse2 -no-sse3 -no-sse4.1 -no-sse4.2 -no-ssse3 -no-avx -no-avx2 -no-avx512 "C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe" /j2 "C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe" install
The script failed within a few seconds after executing "jom.exe /j2".
Last few lines of the console output (with the error msg) islinking ..\..\..\bin\moc.exe cd tools\qfloat16-tables\ && ( if not exist Makefile C:\Qt\build\qtbase\bin\qmake.exe -o Makefile C:\Qt\src\qtbase\src\tools\qfloat16-tables\qfloat16-tables.pro ) && C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe -f Makefile C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe -f Makefile.Release compiling C:\Qt\src\qtbase\src\tools\qfloat16-tables\gen_qfloat16_tables.cpp gen_qfloat16_tables.cpp linking ..\..\..\bin\qfloat16-tables.exe cd corelib\ && ( if not exist Makefile C:\Qt\build\qtbase\bin\qmake.exe -o Makefile C:\Qt\src\qtbase\src\corelib\corelib.pro ) && C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe -f Makefile C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe -f Makefile.Debug all C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe -f Makefile.Release all && was unexpected at this time. jom: C:\Qt\build\qtbase\src\corelib\Makefile.Release [.pch\release\Qt5Core_pch.obj] Error 1 && was unexpected at this time. jom: C:\Qt\build\qtbase\src\corelib\Makefile.Debug [.pch\debug\Qt5Cored_pch.obj] Error 1 compiling C:\Qt\src\qtbase\src\3rdparty\zlib\adler32.c C:\Qt\src\qtbase\src\3rdp arty\zlib\compress.c C:\Qt\src\qtbase\src\3rdparty\zlib\crc32.c C:\Qt\src\qtbase \src\3rdparty\zlib\deflate.c C:\Qt\src\qtbase\src\3rdparty\zlib\gzclose.c C:\Qt\ src\qtbase\src\3rdparty\zlib\gzlib.c C:\Qt\src\qtbase\src\3rdparty\zlib\gzread.c C:\Qt\src\qtbase\src\3rdparty\zlib\gzwrite.c adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c Generating Code... jom: C:\Qt\build\qtbase\src\corelib\Makefile [debug-all] Error 2 jom: C:\Qt\build\qtbase\src\corelib\Makefile [release-all] Error 2 jom: C:\Qt\build\qtbase\src\Makefile [sub-corelib-make_first] Error 2 jom: C:\Qt\build\qtbase\Makefile [sub-src-make_first] Error 2 jom: C:\Qt\build\Makefile [module-qtbase-make_first] Error 2
Tried again without the "-silent" option when calling configure.bat, and it was a complete success.
Is there a bug with the "-silent" option or is there something more subtle?
-
Hi and welcome to devnet,
You may have found something. Can you run the build process using only one thread ? That will help find what failed exactly.
-
Call the following batch script (only modified -prefix and /j<n> from my previous post)
CALL "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 SET _ROOT=C:\Qt\src SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH% SET _ROOT= CALL "C:\Qt\src\configure.bat" ^ -debug-and-release ^ -opensource ^ -confirm-license ^ -silent ^ -prefix "C:\Qt\Qt5.9.0\5.9\msvc2015-static-test" ^ -static ^ -optimize-size ^ -make libs ^ -nomake examples ^ -nomake tools ^ -platform win32-msvc ^ -no-icu ^ -strip ^ -no-dbus ^ -no-opengl ^ -no-sse2 -no-sse3 -no-sse4.1 -no-sse4.2 -no-ssse3 -no-avx -no-avx2 -no-avx512 "C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe" /j1 "C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe" install
Last few lines of console output for "jom /j1" (output from jom install not included):
linking ..\..\..\bin\qfloat16-tables.exe cd corelib\ && ( if not exist Makefile C:\Qt\build\qtbase\bin\qmake.exe -o Makefile C:\Qt\src\qtbase\src\corelib\corelib.pro ) && C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe -f Makefile C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe -f Makefile.Debug all && was unexpected at this time. jom: C:\Qt\build\qtbase\src\corelib\Makefile.Debug [.pch\debug\Qt5Cored_pch.obj] Error 1 jom: C:\Qt\build\qtbase\src\corelib\Makefile [debug-all] Error 2 jom: C:\Qt\build\qtbase\src\Makefile [sub-corelib-make_first] Error 2 jom: C:\Qt\build\qtbase\Makefile [sub-src-make_first] Error 2 jom: C:\Qt\build\Makefile [module-qtbase-make_first] Error 2
Cannot attach complete files as I do not have enough privilege on the forum.
-
Can you try with only the the silent option to rule out interference with other options ?
-
batch script called:
CALL "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 SET _ROOT=C:\Qt\src SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH% SET _ROOT= CALL "C:\Qt\src\configure.bat" -silent "C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe" /j1 > qt-build.log 2>&1 "C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe" install
last few lines in "qt-build.log":
compilation header save succeeded; see C:\Qt\build\qtbase\src\angle\src\libGLESv2\libANGLE\renderer\d3d\d3d9\shaders\compiled\passthroughps.h fxc.exe /nologo /E luminanceps /T ps_2_0 /Fh libANGLE\renderer\d3d\d3d9\shaders\compiled\luminanceps.h C:\Qt\src\qtbase\src\3rdparty\angle\src\libANGLE\renderer\d3d\d3d9\shaders\Blit.ps compilation header save succeeded; see C:\Qt\build\qtbase\src\angle\src\libGLESv2\libANGLE\renderer\d3d\d3d9\shaders\compiled\luminanceps.h fxc.exe /nologo /E componentmaskps /T ps_2_0 /Fh libANGLE\renderer\d3d\d3d9\shaders\compiled\componentmaskps.h C:\Qt\src\qtbase\src\3rdparty\angle\src\libANGLE\renderer\d3d\d3d9\shaders\Blit.ps compilation header save succeeded; see C:\Qt\build\qtbase\src\angle\src\libGLESv2\libANGLE\renderer\d3d\d3d9\shaders\compiled\componentmaskps.h && was unexpected at this time. jom: C:\Qt\build\qtbase\src\angle\src\libGLESv2\Makefile.Debug [.obj\debug\mathutil.obj] Error 1 jom: C:\Qt\build\qtbase\src\angle\src\libGLESv2\Makefile [debug-all] Error 2 jom: C:\Qt\build\qtbase\src\angle\src\Makefile [sub-libGLESv2-make_first-ordered] Error 2 jom: C:\Qt\build\qtbase\src\angle\Makefile [sub-src-make_first] Error 2 jom: C:\Qt\build\qtbase\src\Makefile [sub-angle-make_first] Error 2 jom: C:\Qt\build\qtbase\Makefile [sub-src-make_first] Error 2 jom: C:\Qt\build\Makefile [module-qtbase-make_first] Error 2
If it matters at all:
- I'm shadow building.
- I modified "\src\qtbase\mkspecs\common\msvc-desktop.conf" so that all "-MD" are replaced with "-MT" for static linking with MSVC.
- only "qtbase", "gnuwin32", "coin" and files in the root folder are extracted from src archive. No other modules are present in the extracted src folder.
-
actually, for my last post, I probably should've included more lines in the output:
cd libGLESv2\ && ( if not exist Makefile C:\Qt\build\qtbase\bin\qmake.exe -o Makefile C:\Qt\src\qtbase\src\angle\src\libGLESv2\libGLESv2.pro ) && C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe -f Makefile Project MESSAGE: Enabling D3D11 mode for ANGLE C:\Qt\Qt5.9.0\Tools\QtCreator\bin\jom.exe -f Makefile.Debug all fxc.exe /nologo /E VS_Passthrough2D /T vs_4_0_level_9_3 /Fh libANGLE\renderer\d3d\d3d11\shaders\compiled\passthrough2d11vs.h C:\Qt\src\qtbase\src\3rdparty\angle\src\libANGLE\renderer\d3d\d3d11\shaders\Passthrough2D11.hlsl compilation header save succeeded; see C:\Qt\build\qtbase\src\angle\src\libGLESv2\libANGLE\renderer\d3d\d3d11\shaders\compiled\passthrough2d11vs.h [.......many many similar lines.......] [.......many many similar lines.......] fxc.exe /nologo /E luminanceps /T ps_2_0 /Fh libANGLE\renderer\d3d\d3d9\shaders\compiled\luminanceps.h C:\Qt\src\qtbase\src\3rdparty\angle\src\libANGLE\renderer\d3d\d3d9\shaders\Blit.ps compilation header save succeeded; see C:\Qt\build\qtbase\src\angle\src\libGLESv2\libANGLE\renderer\d3d\d3d9\shaders\compiled\luminanceps.h fxc.exe /nologo /E componentmaskps /T ps_2_0 /Fh libANGLE\renderer\d3d\d3d9\shaders\compiled\componentmaskps.h C:\Qt\src\qtbase\src\3rdparty\angle\src\libANGLE\renderer\d3d\d3d9\shaders\Blit.ps compilation header save succeeded; see C:\Qt\build\qtbase\src\angle\src\libGLESv2\libANGLE\renderer\d3d\d3d9\shaders\compiled\componentmaskps.h && was unexpected at this time. jom: C:\Qt\build\qtbase\src\angle\src\libGLESv2\Makefile.Debug [.obj\debug\mathutil.obj] Error 1 jom: C:\Qt\build\qtbase\src\angle\src\libGLESv2\Makefile [debug-all] Error 2 jom: C:\Qt\build\qtbase\src\angle\src\Makefile [sub-libGLESv2-make_first-ordered] Error 2 jom: C:\Qt\build\qtbase\src\angle\Makefile [sub-src-make_first] Error 2 jom: C:\Qt\build\qtbase\src\Makefile [sub-angle-make_first] Error 2 jom: C:\Qt\build\qtbase\Makefile [sub-src-make_first] Error 2 jom: C:\Qt\build\Makefile [module-qtbase-make_first] Error 2
-
I wonder if you are hitting something similar to QTBUG-28841.
-
In the case of my last two posts, I've tracked down the error to this target:
.obj\debug\mathutil.obj: C:\Qt\src\qtbase\src\3rdparty\angle\src\common\mathutil.cpp C:\Qt\src\qtbase\src\3rdparty\angle\src\common\mathutil.h \ C:\Qt\src\qtbase\src\3rdparty\angle\src\common\debug.h \ C:\Qt\src\qtbase\src\3rdparty\angle\src\common\angleutils.h \ C:\Qt\src\qtbase\src\3rdparty\angle\src\common\platform.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo.obj\debug\mathutil.obj C:\Qt\src\qtbase\src\3rdparty\angle\src\common\mathutil.cpp
in this makefile:
{build directory}\qtbase\src\angle\src\libGLESv2\Makefile.Debug
The error can be recreated by typing the following command into cmd:
jom.exe -f Makefile.Debug .obj\debug\mathutil.obj
error output:
> jom 1.1.2 - empower your cores > > && was unexpected at this time. > jom: C:\Qt\build\qtbase\src\angle\src\libGLESv2\Makefile.Debug [.obj\debug\mathutil.obj] Error 1
However, if I manually create the make command following normal makefile rules and use that command in cmd, there's no error message and compilation is successful. The command I put into cmd is:
@echo compiling C:\Qt\src\qtbase\src\3rdparty\angle\src\common\mathutil.cpp && cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zi -MTd -Oy- -Gy -GS -Gm- -RTC1 -utf-8 -EHsc -w44456 -w44457 -w44458 -W4 -wd4100 -wd4127 -wd4189 -wd4239 -wd4244 -wd4245 -wd4267 -wd4275 -wd4512 -wd4702 -wd4996 -wd4480 /Fd.obj\debug\libGLESv2d.vc.pdb -DUNICODE -DWIN32 -D_WINDOWS -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DWIN32_LEAN_AND_MEAN=1 -DANGLE_ENABLE_D3D11 -DANGLE_DEFAULT_D3D11=1 -D_DEBUG -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DLIBANGLE_IMPLEMENTATION -DLIBGLESV2_IMPLEMENTATION -DGL_APICALL= -DGL_GLEXT_PROTOTYPES= -DEGLAPI= -DANGLE_ENABLE_D3D9 -DANGLE_SKIP_DXGI_1_2_CHECK -D_WINDLL -IC:\Qt\src\qtbase\src\angle\src\libGLESv2 -I. -IC:\Qt\src\qtbase\src\angle\src\libGLESv2 -IC:\Qt\src\qtbase\src\angle\src -IC:/Qt/src/qtbase/src/angle/src/../include -IC:\Qt\src\qtbase\src\3rdparty\angle\src -IC:\Qt\src\qtbase\src\3rdparty\angle\include -I..\..\src -IC:\Qt\src\qtbase\src\3rdparty\angle\src\libANGLE -IC:\Qt\src\qtbase\mkspecs\win32-msvc -Fo.obj\debug\mathutil.obj C:\Qt\src\qtbase\src\3rdparty\angle\src\common\mathutil.cpp
success output:
compiling C:\Qt\src\qtbase\src\3rdparty\angle\src\common\mathutil.cpp mathutil.cpp
If I use nmake instead of jom, there's a warning message, but compilation on this single file still succeeds.
Command:nmake -f Makefile.Debug .obj\debug\mathutil.obj
output with warning:
Microsoft (R) Program Maintenance Utility Version 14.00.24210.0 Copyright (C) Microsoft Corporation. All rights reserved. NMAKE : warning U4006: special macro undefined : '$<' compiling mathutil.cpp
So... is this a bug in jom?
-
Might be or the Makefile generation does something wrong since there's a warning with nmake.
I'd recommend taking a longer look at the bug report system to see if there's anything related. If not then please consider opening a new report with your findings.