Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.0
-
None
-
Microsoft Windows 11 Pro, OSVersion 10.0.22621
PowerShell> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.22621.963
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.963
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1Microsoft Windows 11 Pro, OSVersion 10.0.22621 PowerShell> $PSVersionTable Name Value ---- ----- PSVersion 5.1.22621.963 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.22621.963 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
-
-
e5d7a3920 (dev), 2f3e271f8 (6.5), 5cf79c2b9 (dev), afdf9bfec (6.5), 22af26890 (tqtc/lts-6.2)
Description
I try to build Qt via LLVM on Windows. The cmake configure succeeds, but the build failes with:
/qglobal.cpp:5:10: fatal error: 'qplatformdefs.h' file not found
#include "qplatformdefs.h"
^~~~~~~~~~~~~~~~~
You should be able to reproduce this by the following steps via PowerShell:
Set path to the tools which should be used (CMake, Ninja, Python, LLVM):
# Set environement variable PATH
$env:Path = 'C:\Temp\llvm\bin;C:\Temp\python;C:\Temp\cmake\bin;C:\Temp\ninja;C:\Windows\system32;C:\Windows;C:\Windows\System32\WindowsPowerShell\v1.0\'
Install these tools to the paths we set:
cd C:\Temp
Invoke-WebRequest -Uri "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip" -OutFile ninja.zip
Expand-Archive ninja.zip -DestinationPath ninja
Invoke-WebRequest -Uri "https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3-windows-x86_64.zip" -OutFile cmake.zip
Expand-Archive cmake.zip -DestinationPath .
mv cmake-3.26.3-windows-x86_64 cmake
Invoke-WebRequest -Uri "https://www.python.org/ftp/python/3.11.3/python-3.11.3-embed-amd64.zip" -OutFile python.zip
Expand-Archive python.zip -DestinationPath python
Invoke-WebRequest -Uri "https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.3/LLVM-16.0.3-win64.exe" -OutFile llvm.exe
##############################################################
# Execute the installer or use 7-Zip to unpack the EXE-File. #
# LLVM currently doesn't provide a non-installer version. #
# - https://github.com/llvm/llvm-project/issues/62492 #
# - https://github.com/llvm/llvm-project/issues/24684 #
##############################################################
Download and extract Qt:
Invoke-WebRequest -Uri "https://ftp.fau.de/qtproject/archive/qt/6.5/6.5.0/single/qt-everywhere-src-6.5.0.zip" -OutFile qt.zip
Expand-Archive qt.zip -DestinationPath .
Configure Qt:
{{mkdir -p C:\Temp\build
cd C:\Temp\build
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DQT_BUILD_SUBMODULES=qtbase -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DBUILD_WITH_PCH=OFF -DQT_BUILD_TOOLS_BY_DEFAULT=OFF -DFEATURE_precompile_header=OFF -DCMAKE_INSTALL_PREFIX=c:\Temp\install c:\Temp\qt-everywhere-src-6.5.0
}}
My output is:
-- The CXX compiler identification is Clang 16.0.3 with GNU-like command-line
-- The C compiler identification is Clang 16.0.3 with GNU-like command-line
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: C:/Temp/llvm/bin/clang.exe
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Temp/llvm/bin/clang++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Temp/llvm/bin/clang.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking dependencies of submodule 'qtbase'
-- Configuring submodule 'qtbase'
-DCMAKE_C_FLAGS_DEBUG=-O0 -g -Xclang -gcodeview
-DCMAKE_C_FLAGS_RELEASE=-O3 -DNDEBUG
-DCMAKE_C_FLAGS_RELWITHDEBINFO=-O2 -DNDEBUG -g -Xclang -gcodeview
-DCMAKE_CXX_FLAGS_DEBUG=-O0 -g -Xclang -gcodeview
-DCMAKE_CXX_FLAGS_RELEASE=-O3 -DNDEBUG
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-O2 -DNDEBUG -g -Xclang -gcodeview
-DCMAKE_OBJCOPY=C:/Temp/llvm/bin/llvm-objcopy.exe
-DCMAKE_C_STANDARD=11
-DCMAKE_C_STANDARD_REQUIRED=ON
-DCMAKE_CXX_STANDARD=17
-DCMAKE_CXX_STANDARD_REQUIRED=ON
-DCMAKE_MODULE_PATH:STRING=C:/Temp/qt-everywhere-src-6.5.0/qtbase/cmake/platforms
-- Configuration summary shown below. It has also been written to C:/Temp/build/config.summary
-- Configure with --log-level=STATUS or higher to increase CMake's message verbosity. The log level does not persist across reconfigurations.
-- Configure summary:
Building for: (x86_64, CPU features: mmx sse sse2)
Compiler: clang 16.0.3
Build options:
Mode ................................... release
Optimize release build for size ........ no
Fully optimize release builds (-O3) .... no
Building shared libraries .............. no
Using C standard ....................... C11
Using C++ standard ..................... C++17
Relocatable ............................ no
Using precompiled headers .............. no
Using Link Time Optimization (LTCG) .... no
Using Intel CET ........................ no
Target compiler supports:
x86 Intrinsics ....................... Basic VAES
Sanitizers:
Addresses ............................ no
Threads .............................. no
Memory ............................... no
Fuzzer (instrumentation only) ........ no
Undefined ............................ no
Build parts ............................ libs tools
App store compliance ................... no
Qt modules and options:
Qt Concurrent .......................... yes
Qt D-Bus ............................... yes
Qt D-Bus directly linked to libdbus .... no
Qt Gui ................................. yes
Qt Network ............................. yes
Qt PrintSupport ........................ yes
Qt Sql ................................. yes
Qt Testlib ............................. yes
Qt Widgets ............................. yes
Qt Xml ................................. yes
Support enabled for:
Using pkg-config ....................... no
udev ................................... no
OpenSSL ................................ no
Qt directly linked to OpenSSL ........ no
OpenSSL 1.1 ............................ no
OpenSSL 3.0 ............................ no
Using system zlib ...................... no
Zstandard support ...................... no
Thread support ......................... yes
Common build options:
Linker can resolve circular dependencies yes
Qt Core:
backtrace .............................. no
DoubleConversion ....................... yes
Using system DoubleConversion ........ no
GLib ................................... no
ICU .................................... no
Using system libb2 ..................... no
Built-in copy of the MIME database ..... yes
cpp/winrt base ......................... no
Tracing backend ........................ <none>
Logging backends:
journald ............................. no
syslog ............................... no
slog2 ................................ no
PCRE2 .................................. yes
Using system PCRE2 ................... no
Application permissions ................ no
Qt Sql:
SQL item models ........................ yes
Qt Network:
getifaddrs() ........................... no
IPv6 ifname ............................ no
libproxy ............................... no
Schannel ............................... yes
DTLS ................................... no
OCSP-stapling .......................... no
SCTP ................................... no
Use system proxies ..................... yes
GSSAPI ................................. no
Brotli Decompression Support ........... no
qIsEffectiveTLD() ...................... yes
Built-in publicsuffix database ....... yes
System publicsuffix database ......... no
Core tools:
Android deployment tool ................ yes
macOS deployment tool .................. no
Windows deployment tool ................ yes
qmake .................................. yes
Qt Gui:
Accessibility .......................... yes
FreeType ............................... yes
Using system FreeType ................ no
HarfBuzz ............................... yes
Using system HarfBuzz ................ no
Fontconfig ............................. no
Image formats:
GIF .................................. yes
ICO .................................. yes
JPEG ................................. yes
Using system libjpeg ............... no
PNG .................................. yes
Using system libpng ................ no
Text formats:
HtmlParser ........................... yes
CssParser ............................ yes
OdfWriter ............................ yes
MarkdownReader ....................... yes
Using system libmd4c ............... no
MarkdownWriter ....................... yes
EGL .................................... no
OpenVG ................................. no
OpenGL:
Desktop OpenGL ....................... no
Dynamic OpenGL ....................... yes
OpenGL ES 2.0 ........................ no
OpenGL ES 3.0 ........................ no
OpenGL ES 3.1 ........................ no
OpenGL ES 3.2 ........................ no
Vulkan ................................. no
Session Management ..................... yes
Features used by QPA backends:
evdev .................................. no
libinput ............................... no
HiRes wheel support in libinput ........ no
INTEGRITY HID .......................... no
mtdev .................................. no
tslib .................................. no
xkbcommon .............................. no
X11 specific:
XLib ................................. no
XCB Xlib ............................. no
EGL on X11 ........................... no
xkbcommon-x11 ........................ no
xcb-sm ............................... no
QPA backends:
DirectFB ............................... no
EGLFS .................................. no
EGLFS details:
EGLFS OpenWFD ........................ no
EGLFS i.Mx6 .......................... no
EGLFS i.Mx6 Wayland .................. no
EGLFS RCAR ........................... no
EGLFS EGLDevice ...................... no
EGLFS GBM ............................ no
EGLFS VSP2 ........................... no
EGLFS Mali ........................... no
EGLFS Raspberry Pi ................... no
EGLFS X11 ............................ no
LinuxFB ................................ no
VNC .................................... no
VK_KHR_display ......................... no
QNX:
lgmon ................................ no
IMF .................................. no
XCB:
Using system-provided xcb-xinput ..... no
GL integrations:
GLX Plugin ......................... no
XCB GLX .......................... no
EGL-X11 Plugin ..................... no
Windows:
Direct 2D ............................ yes
Direct 2D 1.1 ........................ yes
DirectWrite .......................... yes
DirectWrite 3 ........................ yes
Qt Widgets:
GTK+ ................................... no
Styles ................................. Fusion Windows WindowsVista
Qt Testlib:
Tester for item models ................. yes
Batch tests ............................ no
Qt PrintSupport:
CUPS ................................... no
Qt Sql Drivers:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. no
OCI (Oracle) ........................... no
ODBC ................................... yes
PostgreSQL ............................. no
SQLite ................................. yes
Using system provided SQLite ......... no
Note: Using static linking will disable the use of dynamically loaded plugins. Make sure to import all needed static plugins, or compile needed modules into the library.
WARNING: Basic cpp/winrt support missing. Some features might not be available.
--
Qt is now configured for building. Just run 'cmake --build . --parallel'
Once everything is built, you must run 'cmake --install .'
Qt will be installed into 'C:/Temp/install'
To configure and build other Qt modules, you can use the following convenience script:
C:/Temp/install/bin/qt-configure-module.bat
If reconfiguration fails for some reason, try removing 'CMakeCache.txt' from the build directory
Alternatively, you can add the --fresh flag to your CMake flags.
-- Configuring done (58.9s)
-- Generating done (2.0s)
-- Build files have been written to: C:/Temp/build
Build Qt:
cmake --build . --parallel 1
The error message is:
[2/1731] Compiling syncqt
ninja: no work to do.
[34/1731] Building CXX object qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/_/_/corelib/global/qassert.cpp.obj
In file included from C:/Temp/qt-everywhere-src-6.5.0/qtbase/src/corelib/global/qassert.cpp:4:
In file included from C:/Temp/qt-everywhere-src-6.5.0/qtbase/src/tools/bootstrap/../../corelib/global/qassert.h:7:
In file included from C:/Temp/build/qtbase/include\QtCore/qcompilerdetection.h:1:
In file included from C:/Temp/build/qtbase/include/QtCore/../../../../qt-everywhere-src-6.5.0/qtbase/src/corelib/global/qcompilerdetection.h:6:
In file included from C:/Temp/build/qtbase/include\QtCore/qglobal.h:1:
In file included from C:/Temp/build/qtbase/include/QtCore/../../../../qt-everywhere-src-6.5.0/qtbase/src/corelib/global/qglobal.h:69:
In file included from C:/Temp/build/qtbase/include\QtCore/qversiontagging.h:1:
C:/Temp/build/qtbase/include/QtCore/../../../../qt-everywhere-src-6.5.0/qtbase/src/corelib/global/qversiontagging.h:90:13: warning: known but unsupported action 'shared' for '#pragma section' - ignored [-Wignored-pragmas]
# pragma section(".qtversion",read,shared)
^
1 warning generated.
[35/1731] Building CXX object qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/_/_/corelib/global/qendian.cpp.obj
In file included from C:/Temp/qt-everywhere-src-6.5.0/qtbase/src/corelib/global/qendian.cpp:5:
In file included from C:/Temp/qt-everywhere-src-6.5.0/qtbase/src/tools/bootstrap/../../corelib/global/qendian.h:12:
In file included from C:/Temp/build/qtbase/include\QtCore/qfloat16.h:1:
In file included from C:/Temp/build/qtbase/include/QtCore/../../../../qt-everywhere-src-6.5.0/qtbase/src/corelib/global/qfloat16.h:8:
In file included from C:/Temp/build/qtbase/include\QtCore/qglobal.h:1:
In file included from C:/Temp/build/qtbase/include/QtCore/../../../../qt-everywhere-src-6.5.0/qtbase/src/corelib/global/qglobal.h:69:
In file included from C:/Temp/build/qtbase/include\QtCore/qversiontagging.h:1:
C:/Temp/build/qtbase/include/QtCore/../../../../qt-everywhere-src-6.5.0/qtbase/src/corelib/global/qversiontagging.h:90:13: warning: known but unsupported action 'shared' for '#pragma section' - ignored [-Wignored-pragmas]
# pragma section(".qtversion",read,shared)
^
1 warning generated.
[36/1731] Building CXX object qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/_/_/corelib/global/qfloat16.cpp.obj
In file included from C:/Temp/qt-everywhere-src-6.5.0/qtbase/src/corelib/global/qfloat16.cpp:5:
In file included from C:/Temp/qt-everywhere-src-6.5.0/qtbase/src/tools/bootstrap/../../corelib/global/qfloat16.h:8:
In file included from C:/Temp/build/qtbase/include\QtCore/qglobal.h:1:
In file included from C:/Temp/build/qtbase/include/QtCore/../../../../qt-everywhere-src-6.5.0/qtbase/src/corelib/global/qglobal.h:69:
In file included from C:/Temp/build/qtbase/include\QtCore/qversiontagging.h:1:
C:/Temp/build/qtbase/include/QtCore/../../../../qt-everywhere-src-6.5.0/qtbase/src/corelib/global/qversiontagging.h:90:13: warning: known but unsupported action 'shared' for '#pragma section' - ignored [-Wignored-pragmas]
# pragma section(".qtversion",read,shared)
^
1 warning generated.
[37/1731] Building CXX object qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/_/_/corelib/global/qglobal.cpp.obj
FAILED: qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/_/_/corelib/global/qglobal.cpp.obj
C:\Temp\llvm\bin\clang+.exe -DHAVE_CONFIG_H -DPCRE2_CODE_UNIT_WIDTH=16 -DPCRE2_DISABLE_JIT -DPCRE2_STATIC -DQT_BOOTSTRAPPED -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_TYPESAFE_FLAGS -DQT_USE_QSTRINGBUILDER -DQT_VERSION_MAJOR=6 -DQT_VERSION_MINOR=5 -DQT_VERSION_PATCH=0 -DQT_VERSION_STR=\"6.5.0\" -DUNICODE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -IC:/Temp/build/qtbase/src/corelib/Core_autogen/include -IC:/Temp/build/qtbase/include -IC:/Temp/build/qtbase/include/QtCore -IC:/Temp/qt-everywhere-src-6.5.0/qtbase/src/corelib -IC:/Temp/build/qtbase/src/corelib -IC:/Temp/build/qtbase/src/corelib/global -IC:/Temp/build/qtbase/src/corelib/kernel -IC:/Temp/qt-everywhere-src-6.5.0/qtbase/src/corelib/../3rdparty/tinycbor/src -IC:/Temp/build/qtbase/include/QtCore/6.5.0 -IC:/Temp/build/qtbase/include/QtCore/6.5.0/QtCore -IC:/Temp/qt-everywhere-src-6.5.0/qtbase/src/corelib/../3rdparty/double-conversion/double-conversion -IC:/Temp/qt-everywhere-src-6.5.0/qtbase/src/corelib/../3rdparty/double-conversion -IC:/Temp/build/qtbase/src/corelib/.rcc -IC:/Temp/qt-everywhere-src-6.5.0/qtbase/mkspecs -IC:/Temp/build/qtbase/include/QtZlib -IC:/Temp/qt-everywhere-src-6.5.0/qtbase/src/3rdparty/zlib -IC:/Temp/build/qtbase/src/3rdparty/zlib -IC:/Temp/qt-everywhere-src-6.5.0/qtbase/src/3rdparty/pcre2/src -IC:/Temp/qt-everywhere-src-6.5.0/qtbase/src/tools/bootstrap/../../corelib/global -IC:/Temp/qt-everywhere-src-6.5.0/qtbase/src/tools/bootstrap/.. -IC:/Temp/qt-everywhere-src-6.5.0/qtbase/src/tools/bootstrap/../../3rdparty/tinycbor/src -IC:/Temp/qt-everywhere-src-6.5.0/qtbase/src/tools/bootstrap/../../3rdparty/pcre2/src -DNDEBUG -O2 -std=gnu+17 -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -fvisibility-inlines-hidden -Wall -Wextra -ffunction-sections -fdata-sections -Wno-ignored-attributes -MD -MT qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/_//corelib/global/qglobal.cpp.obj -MF qtbase\src\tools\bootstrap\CMakeFiles\Bootstrap.dir__\corelib\global\qglobal.cpp.obj.d -o qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir//_/corelib/global/qglobal.cpp.obj -c C:/Temp/qt-everywhere-src-6.5.0/qtbase/src/corelib/global/qglobal.cpp
C:/Temp/qt-everywhere-src-6.5.0/qtbase/src/corelib/global/qglobal.cpp:5:10: fatal error: 'qplatformdefs.h' file not found
#include "qplatformdefs.h"
^~~~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
Attachments
For Gerrit Dashboard: QTBUG-113630 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
478695,6 | Make sure that QT_QMAKE_TARGET_MKSPEC is not empty | dev | qt/qtbase | Status: MERGED | +2 | 0 |
478731,5 | Fix Clang platform detecting mechanism | dev | qt/qtbase | Status: MERGED | +2 | 0 |
479357,2 | Make sure that QT_QMAKE_TARGET_MKSPEC is not empty | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
479358,1 | Make sure that QT_QMAKE_TARGET_MKSPEC is not empty | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: ABANDONED | 0 | 0 |
480917,2 | Fix Clang platform detecting mechanism | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
480921,2 | Fix Clang platform detecting mechanism | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |