Trying to compile Qt 5.9.1: No such file or directory
I'm trying to compile Qt 5.9.1 from source on Windows 10 using msvc 2015. My process was as follows:
- Installed python 2.7.13, added it to PATH
- Set up the qt5vars.cmd file as specified in the documentation (which calls vcvarsall.bat amd64 and sets up PATH)
- Installed jom
- mkdir build-release, cd build-release
- ..\configure -prefix C:\Qt\5.9.1\msvc2015 -nomake examples -opensource
- jom (started compilation)
After a long time, this error pops up:
Code:
Microsoft (R) Program Maintenance Utility Version 14.10.25019.0
Copyright (C) Microsoft Corporation. All rights reserved.
call C:\Users\i00202504\Downloads\qt-everywhere-opensource-src-5.9.1\build-release\qtwebengine\src\core\ninja_wrapper.bat -C C:\Users\i00202504\Downloads\qt-everywhere-opensource-src-5.9.1\build-release\qtwebengine\src\core\Debug_x64 QtWebEngineCore
ninja: Entering directory `C:\Users\i00202504\Downloads\qt-everywhere-opensource-src-5.9.1\build-release\qtwebengine\src\core\Debug_x64'
[109/15221] COPY ../../../../../qtwebengine/src/3rdparty/c...emulated_devices/google-nexus-5-horizontal-keyboard-1x.png
FAILED: resources/inspector/emulated_devices/google-nexus-5-horizontal-keyboard-1x.png
python ../../../../../qtwebengine/src/3rdparty/chromium/build/toolchain/win/tool_wrapper.py recursive-mirror ../../../../../qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/devtools/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-1x.png resources/inspector/emulated_devices/google-nexus-5-horizontal-keyboard-1x.png
Traceback (most recent call last):
File "../../../../../qtwebengine/src/3rdparty/chromium/build/toolchain/win/tool_wrapper.py", line 324, in <module>
sys.exit(main(sys.argv[1:]))
File "../../../../../qtwebengine/src/3rdparty/chromium/build/toolchain/win/tool_wrapper.py", line 27, in main
exit_code = executor.Dispatch(args)
File "../../../../../qtwebengine/src/3rdparty/chromium/build/toolchain/win/tool_wrapper.py", line 69, in Dispatch
return getattr(self, method)(*args[1:])
File "../../../../../qtwebengine/src/3rdparty/chromium/build/toolchain/win/tool_wrapper.py", line 108, in ExecRecursiveMirror
shutil.copy2(source, dest)
File "C:\Python27\lib\shutil.py", line 130, in copy2
copyfile(src, dst)
File "C:\Python27\lib\shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '../../../../../qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/devtools/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-1x.png'
[114/15221] CXX obj/v8/v8_libbase/time.obj
ninja: build stopped: subcommand failed.
NMAKE : fatal error U1077: 'call' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '(' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
What am I doing wrong?
Re: Trying to compile Qt 5.9.1: No such file or directory
Quote:
What am I doing wrong?
Who knows? It's hard to build Qt from source. The Qt 5.9.1 binaries are available for download from the Qt web site for MSVC 2015 (and others), so just download, install it, and start developing instead of spinning your wheels trying to understand obscure build problems that you'll probably never be able to fix?
Re: Trying to compile Qt 5.9.1: No such file or directory
The reason I'm compiling it is because I'd like to target x64.
Re: Trying to compile Qt 5.9.1: No such file or directory
Huh, I stand corrected. I have a commercial license for Qt, and when I go in thorough my login there, I see this distribution:
Quote:
Package includes following prebuilt binaries:
Qt for MinGW 5.3.0 32-bit desktop
Qt for MSVC 2013 64-bit desktop
Qt for MSVC 2015 32- & 64-bit desktop
Qt for MSVC 2015 UWP x86, x64 & ARMv7
Qt for MSVC 2017 64-bit desktop
Qt for MSVC 2017 UWP x86, x64 & ARMv7
Qt for Android x86 and ARMv7
It really sucks that this is not available for download to people who go through the open source route. It really diminishes my respect for The Qt Company if this really is the case.
Re: Trying to compile Qt 5.9.1: No such file or directory
On the downloads page, the only option I see is "Qt 5.9.1 for Windows (2.3 GB)", which is the 32-bit package.
What I ended up doing is not building the QtWebEngine component with:
Code:
configure -skip qtwebengine
Since in my case I don't need it, this is fine.
Re: Trying to compile Qt 5.9.1: No such file or directory
Quote:
On the downloads page, the only option I see is "Qt 5.9.1 for Windows (2.3 GB)", which is the 32-bit package.
Yes, that's all I see when I go into the site without logging in. I mistakenly assumed that the distributions I see when I log in are available to everyone.
But it also sucks that The Qt Company has an open-source source code release that can't be built in its entirety. So not only can you not download pre-built binaries for certain configurations, you also can't build them yourself without excluding parts of them. QtWebEngine -is- part of the pre-built MSVC 2013 x64 release, so obviously The Qt Company can build it internally.
Re: Trying to compile Qt 5.9.1: No such file or directory
Hi TheComet.
I know some time has passed but I was facing the same problem as you for 5.9.2.
Failing for the same error.
But I've found the solution.
You can find it here https://wiki.qt.io/Building_Qt_5_from_Git
Where it says
"""
Windows
Note that if you're shadow-building Qt, the source directory and build directory must be on the same drive, nested equally deeply. Also, make sure there are no old build artifacts in the source directory.
"""
When they build chromium the have encoded relative paths in the build script.
So I had the sources in
c:\qt-5.9.2\
and I was building in
c:\build\qt-5.9.2-x64\
and the build failed
I changed the build directory to
c:\build-qt-5.9.2-x64
and now it works
I hope this will help you too and the next one will reach this page.