- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trying to compile Qt 6.4.1 with latest version oneAPI 2023.0
Was able to compile it with 2022.2.1 after changing the win32-icc qmake.conf QMAKE_CC = icx
and applying the patch referenced by https://bugreports.qt.io/browse/QTBUG-109015
Here is the configuration that worked with 2022.2.1
c:\QT\qt-everywhere-src-6.4.1\configure.bat -prefix c:\QT\Qt6.4.1_20 -debug -platform win32-icc -nomake examples -cmake-generator Ninja -c++std c++20 --disable-pch "MySQL_LIBRARY=c:/qt/mysql-8.0.28-winx64/lib/libmysql.lib" "MySQL_INCLUDE_DIR=c:/qt/mysql-8.0.28-winx64/include/"
With oneAPI 2023.0 icpx.exe now exists in the windows\bin so the configure.bat attempts to use it
Wondering if anyone else is having the same problem.
Rich
Here is the configure error I'm seeing
c:\Qt\Qt6.4.1_20>c:\QT\qt-everywhere-src-6.4.1\configure.bat -prefix c:\QT\Qt6.4.1_20 -debug -platform win32-icc -nomake examples -cmake-generator Ninja -c++std c++20 --disable-pch "MySQL_LIBRARY=c:/qt/mysql-8.0.28-winx64/lib/libmysql.lib" "MySQL_INCLUDE_DIR=c:/qt/mysql-8.0.28-winx64/include/"
c:\QT\qt-everywhere-src-6.4.1\configure.bat -prefix c:\QT\Qt6.4.1_20 -debug -platform win32-icc -nomake examples -cmake-generator Ninja -c++std c++20 --disable-pch "MySQL_LIBRARY=c:/qt/mysql-8.0.28-winx64/lib/libmysql.lib" "MySQL_INCLUDE_DIR=c:/qt/mysql-8.0.28-winx64/include/"
+ cd qtbase
+ c:\Qt\qt-everywhere-src-6.4.1\qtbase\configure.bat -top-level -prefix c:\QT\Qt6.4.1_20 -debug -platform win32-icc -nomake examples -cmake-generator Ninja -c++std c++20 --disable-pch "MySQL_LIBRARY=c:/qt/mysql-8.0.28-winx64/lib/libmysql.lib" "MySQL_INCLUDE_DIR=c:/qt/mysql-8.0.28-winx64/include/"
-- Windows 10 SDK version: 10.0.22000.0
'C:/Program Files/CMake/bin/cmake.exe' '-DBUILD_WITH_PCH=OFF' '-DCMAKE_INSTALL_PREFIX=c:/QT/Qt6.4.1_20' '-DQT_QMAKE_TARGET_MKSPEC=win32-icc' '-DQT_BUILD_EXAMPLES=FALSE' '-DCMAKE_BUILD_TYPE=Debug' '-DINPUT_cxx14=yes' '-DINPUT_cxx17=yes' '-DINPUT_cxx20=yes' '-G' 'Ninja' '-DMySQL_LIBRARY=c:/qt/mysql-8.0.28-winx64/lib/libmysql.lib' '-DMySQL_INCLUDE_DIR=c:/qt/mysql-8.0.28-winx64/include/' 'C:/Qt/qt-everywhere-src-6.4.1'
-- The CXX compiler identification is IntelLLVM 2023.0.0 with GNU-like command-line
-- The C compiler identification is IntelLLVM 2023.0.0 with MSVC-like command-line
-- The ASM compiler identification is IntelLLVM
-- Found assembler: C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/bin/icx.exe
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/bin/icpx.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/bin/icpx.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler
"C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/bin/icpx.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Qt/Qt6.4.1_20/CMakeFiles/CMakeTmp
Run Build Command(s):C:/PROGRA~1/CMake/bin/ninja.exe cmTC_494ab && [1/2] Building CXX object CMakeFiles\cmTC_494ab.dir\testCXXCompiler.cxx.obj
FAILED: CMakeFiles/cmTC_494ab.dir/testCXXCompiler.cxx.obj
C:\PROGRA~2\Intel\oneAPI\compiler\latest\windows\bin\icpx.exe /nologo /TP /DWIN32 /D_WINDOWS /EHsc /Zi /Ob0 /Od /RTC1 -MDd -QMD -QMT CMakeFiles\cmTC_494ab.dir\testCXXCompiler.cxx.obj -QMF CMakeFiles\cmTC_494ab.dir\testCXXCompiler.cxx.obj.d /FoCMakeFiles\cmTC_494ab.dir\testCXXCompiler.cxx.obj /FdCMakeFiles\cmTC_494ab.dir\ -c C:\Qt\Qt6.4.1_20\CMakeFiles\CMakeTmp\testCXXCompiler.cxx
icpx: error: unknown argument: '-nologo'
icpx: error: unknown argument: '-EHsc'
icpx: error: unknown argument: '-Zi'
icpx: error: unknown argument: '-MDd'
icpx: error: unknown argument: '-QMD'
icpx: error: unknown argument: '-QMT'
icpx: error: unknown argument: '-QMF'
icpx: error: no such file or directory: 'CMakeFiles\cmTC_494ab.dir\testCXXCompiler.cxx.obj'
icpx: error: no such file or directory: 'CMakeFiles\cmTC_494ab.dir\testCXXCompiler.cxx.obj.d'
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:17 (project)
-- Configuring incomplete, errors occurred!
See also "C:/Qt/Qt6.4.1_20/CMakeFiles/CMakeOutput.log".
See also "C:/Qt/Qt6.4.1_20/CMakeFiles/CMakeError.log".
CMake Error at C:/Qt/qt-everywhere-src-6.4.1/qtbase/cmake/QtProcessConfigureArgs.cmake:965 (message):
CMake exited with code 1.
c:\Qt\Qt6.4.1_20>
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in Intel Communities.
Could you please try using the icx compiler and let us know if you are facing any errors? (please provide us with the error log)
Please try using the icx compiler on windows as icx is the recommended default driver for Windows.
At our end, when we try to extract the files from the latest qt(6.4.1)(https://www.qt.io/offline-installers), we are unable to extract it.
Could you please let us know from where you have downloaded the qt and the steps to build it?
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I repeated the icpx command using icx and didn't get the unknown command line options errors but since it is part of the configuration script the temporary files were not available.
The Qt cmake configuration script sees the icpx.exe file and attempts to test it. It is ignoring the setting in the qtbase mkspecs win32-icc qmake.conf file where I changed QMAKE_CC = icx. It should use icx because
QMAKE_CXX = $$QMAKE_CC
So it is something in the cmake scripts that I haven't tracked down yet. I didn't expect icpx to fail on the basic documented command line options.
Will file a Qt bug report if you do not. Wanted to check here first so I can let Thiago Macieira know it has been addressed here.
The source files come from the same place you got them (https://www.qt.io/offline-installers), There is a problem extracting them because the file path was too long.
Extracting it to c:\tmp\ then moving it got around that problem.
See my previous question. Solved: error compiling Qt 6.3.0 on Windows with oneAPI icx using c++20 - Intel Communities
Other tricks I've used in the past to get around zip file extraction problems are
1 Extracting on a Linux box and mounting the drive and copying the files.
2 using tar eg tar.exe -xf archive zip
Windows 10 build 17063 or later is bundled with tar.exe which is capable of working with ZIP files from the command line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
icpx is set in the cmake module CMakeDetermineCXXCompiler.cmake
# finally list compilers to try
if(NOT CMAKE_CXX_COMPILER_INIT)
set(CMAKE_CXX_COMPILER_LIST CC ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ aCC cl bcc xlC icpx icx clang++)
endif()
Removing icpx from the list allows the Qt configuration to proceed with latest version oneAPI 2023.0.
Not the best solution.
need a cmake guru to figure out the correct way to either disable icpx or force icx for the CXX compiler on windows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the information.
>>Removing icpx from the list allows the Qt configuration to proceed with latest version oneAPI 2023.0.
Yes, since icpx is only supported on Linux(not for windows). Please find the below link:
Could you please let us know if you are facing any issues with building Qt with the Intel icx compiler? Since it is related to Qt compatibility not an error with the Intel compiler, could you please raise a ticket in the Qt forum?
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Qt 6.4.1 compiles and works using just 2023.0 icx.
If icpx is not the recommended compiler for Windows why is it included in the 2023.0 release for Windows?
Here is the Qt bug report.
[QTBUG-109793] configuration fails for oneAPI 2023.0 - Qt Bug Tracker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Qt asked to try without -platform win32-icc in configure. The compiler identification still tries to test icpx.exe as the CXX compiler and fails. see the new CMake logs added to Qt bug report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the detailed information.
"icpx" is a GNU-style driver for Windows. As such it does not support CL-compatible options as well as the CL-style option format.
>>either disable icpx or force icx for the CXX compiler on windows.
Since it is a script in the QT file and icx is supported(and also it is working) it is not the issue with Intel Compilers.
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have not heard back from you. Could you please let us know if you have any other queries?
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have not heard back from you. This thread will no longer be monitored by Intel. If you need additional information, please start a new thread.
Thanks & Regards,
Varsha
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page