Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-98253

Failed to build from source through clang-cl 13.0.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.3.0 Beta1
    • 6.2, 6.3
    • Build System
    • None
    • MSVC 2022, llvm clang-cl 13.0.0
    • Windows
    • b94e204861 (qt/tqtc-qtbase/dev) 84a0adffe8 (qt/qtbase/6.3) 84a0adffe8 (qt/tqtc-qtbase/6.3)

    Description

      When building Qt through clang-cl 13.0.0, I got the following error:

      [301/1764] Building CXX object src\corelib\CMakeFiles\Core.dir\Debug\global\qfloat16.cpp.obj
      FAILED: src/corelib/CMakeFiles/Core.dir/Debug/global/qfloat16.cpp.obj
      D:\zyh\llvm\LLVM-13.0.0-win64\bin\clang-cl.exe  /nologo -TP -DCore_EXPORTS -DPCRE2_CODE_UNIT_WIDTH=16 -DPCRE2_STATIC -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_MOC_COMPAT -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_USING_NAMESPACE -DQT_TYPESAFE_FLAGS -DQT_USE_QSTRINGBUILDER -DUNICODE -DWIN32 -DWIN64 -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_USE_MATH_DEFINES -D_WIN64 -D_WINDLL -DCMAKE_INTDIR=\"Debug\" -ID:\zyh\qt\cache\src\corelib\Core_autogen\include_Debug -ID:\zyh\qt\cache\include -ID:\zyh\qt\cache\include\QtCore -ID:\zyh\qt\qtbase\src\corelib -ID:\zyh\qt\cache\src\corelib -ID:\zyh\qt\cache\src\corelib\global -ID:\zyh\qt\cache\src\corelib\kernel -ID:\zyh\qt\qtbase\src\corelib\..\3rdparty\tinycbor\src -ID:\zyh\qt\cache\include\QtCore\6.3.0 -ID:\zyh\qt\cache\include\QtCore\6.3.0\QtCore -ID:\zyh\qt\qtbase\src\corelib\..\3rdparty\zlib\src -ID:\zyh\qt\qtbase\src\corelib\..\3rdparty\double-conversion\double-conversion -ID:\zyh\qt\qtbase\src\corelib\..\3rdparty\double-conversion -ID:\zyh\qt\cache\src\corelib\.rcc -ID:\zyh\qt\qtbase\mkspecs\win32-msvc -ID:\zyh\qt\qtbase\src\3rdparty\pcre2\src /DWIN32 /D_WINDOWS /GR /Zi     /RTC1 -MDd /W3 /EHsc -Zc:__cplusplus -permissive- -utf-8 -Wno-ignored-attributes -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:wchar_t -std:c++17 /YuD:/zyh/qt/cache/src/corelib/CMakeFiles/Core.dir/Debug/cmake_pch.hxx /FpD:/zyh/qt/cache/src/corelib/CMakeFiles/Core.dir/Debug/cmake_pch.cxx.pch /FID:/zyh/qt/cache/src/corelib/CMakeFiles/Core.dir/Debug/cmake_pch.hxx /showIncludes /Fosrc\corelib\CMakeFiles\Core.dir\Debug\global\qfloat16.cpp.obj /Fdsrc\corelib\CMakeFiles\Core.dir\Debug\ -c -- D:\zyh\qt\qtbase\src\corelib\global\qfloat16.cpp
      D:\zyh\qt\qtbase\src\corelib\global\qfloat16.cpp(206,64): error: use of undeclared identifier '_mm256_loadu_ps'; did you mean '_mm_loadu_ps'?
              _mm_storeu_si128((__m128i *)(out + i), _mm256_cvtps_ph(_mm256_loadu_ps(in + i), 0));
                                                                     ^~~~~~~~~~~~~~~
                                                                     _mm_loadu_ps
      D:\zyh\llvm\LLVM-13.0.0-win64\lib\clang\13.0.0\include\xmmintrin.h(1740,1): note: '_mm_loadu_ps' declared here
      _mm_loadu_ps(const float *__p)
      ^
      D:\zyh\qt\qtbase\src\corelib\global\qfloat16.cpp(206,48): error: use of undeclared identifier '_mm256_cvtps_ph'
              _mm_storeu_si128((__m128i *)(out + i), _mm256_cvtps_ph(_mm256_loadu_ps(in + i), 0));
                                                     ^
      D:\zyh\qt\qtbase\src\corelib\global\qfloat16.cpp(208,48): error: use of undeclared identifier '_mm_cvtps_ph'; did you mean '_mm_cvtss_sd'?
              _mm_storel_epi64((__m128i *)(out + i), _mm_cvtps_ph(_mm_loadu_ps(in + i), 0));
                                                     ^~~~~~~~~~~~
                                                     _mm_cvtss_sd
      D:\zyh\llvm\LLVM-13.0.0-win64\lib\clang\13.0.0\include\emmintrin.h(1449,1): note: '_mm_cvtss_sd' declared here
      _mm_cvtss_sd(__m128d __a, __m128 __b)
      ^
      D:\zyh\qt\qtbase\src\corelib\global\qfloat16.cpp(208,83): error: cannot initialize a parameter of type '__m128' (vector of 4 'float' values) with an rvalue of type 'int'
              _mm_storel_epi64((__m128i *)(out + i), _mm_cvtps_ph(_mm_loadu_ps(in + i), 0));
                                                                                        ^
      D:\zyh\llvm\LLVM-13.0.0-win64\lib\clang\13.0.0\include\emmintrin.h(1449,34): note: passing argument to parameter '__b' here
      _mm_cvtss_sd(__m128d __a, __m128 __b)
                                       ^
      D:\zyh\qt\qtbase\src\corelib\global\qfloat16.cpp(213,36): error: use of undeclared identifier '_mm_cvtps_ph'; did you mean '_mm_cvtss_sd'?
              out[i] = _mm_extract_epi16(_mm_cvtps_ph(_mm_set_ss(in[i]), 0), 0);
                                         ^~~~~~~~~~~~
                                         _mm_cvtss_sd
      D:\zyh\llvm\LLVM-13.0.0-win64\lib\clang\13.0.0\include\emmintrin.h(4359,70): note: expanded from macro '_mm_extract_epi16'
        (int)(unsigned short)__builtin_ia32_vec_ext_v8hi((__v8hi)(__m128i)(a), \
                                                                           ^
      D:\zyh\llvm\LLVM-13.0.0-win64\lib\clang\13.0.0\include\emmintrin.h(1449,1): note: '_mm_cvtss_sd' declared here
      _mm_cvtss_sd(__m128d __a, __m128 __b)
      ^
      D:\zyh\qt\qtbase\src\corelib\global\qfloat16.cpp(213,68): error: cannot initialize a parameter of type '__m128' (vector of 4 'float' values) with an rvalue of type 'int'
              out[i] = _mm_extract_epi16(_mm_cvtps_ph(_mm_set_ss(in[i]), 0), 0);
                                                                         ^
      D:\zyh\llvm\LLVM-13.0.0-win64\lib\clang\13.0.0\include\emmintrin.h(4359,70): note: expanded from macro '_mm_extract_epi16'
        (int)(unsigned short)__builtin_ia32_vec_ext_v8hi((__v8hi)(__m128i)(a), \
                                                                           ^
      D:\zyh\llvm\LLVM-13.0.0-win64\lib\clang\13.0.0\include\emmintrin.h(1449,34): note: passing argument to parameter '__b' here
      _mm_cvtss_sd(__m128d __a, __m128 __b)
                                       ^
      D:\zyh\qt\qtbase\src\corelib\global\qfloat16.cpp(222,35): error: use of undeclared identifier '_mm256_cvtph_ps'; did you mean '_mm_cvtpd_ps'?
              _mm256_storeu_ps(out + i, _mm256_cvtph_ps(_mm_loadu_si128((const __m128i *)(in + i))));
                                        ^~~~~~~~~~~~~~~
                                        _mm_cvtpd_ps
      D:\zyh\llvm\LLVM-13.0.0-win64\lib\clang\13.0.0\include\emmintrin.h(1295,1): note: '_mm_cvtpd_ps' declared here
      _mm_cvtpd_ps(__m128d __a)
      ^
      D:\zyh\qt\qtbase\src\corelib\global\qfloat16.cpp(222,9): error: use of undeclared identifier '_mm256_storeu_ps'; did you mean '_mm_storeu_ps'?
              _mm256_storeu_ps(out + i, _mm256_cvtph_ps(_mm_loadu_si128((const __m128i *)(in + i))));
              ^~~~~~~~~~~~~~~~
              _mm_storeu_ps
      D:\zyh\llvm\LLVM-13.0.0-win64\lib\clang\13.0.0\include\xmmintrin.h(1983,1): note: '_mm_storeu_ps' declared here
      _mm_storeu_ps(float *__p, __m128 __a)
      ^
      D:\zyh\qt\qtbase\src\corelib\global\qfloat16.cpp(224,32): error: use of undeclared identifier '_mm_cvtph_ps'; did you mean '_mm_cvtpd_ps'?
              _mm_storeu_ps(out + i, _mm_cvtph_ps(_mm_loadl_epi64((const __m128i *)(in + i))));
                                     ^~~~~~~~~~~~
                                     _mm_cvtpd_ps
      D:\zyh\llvm\LLVM-13.0.0-win64\lib\clang\13.0.0\include\emmintrin.h(1295,1): note: '_mm_cvtpd_ps' declared here
      _mm_cvtpd_ps(__m128d __a)
      ^
      D:\zyh\qt\qtbase\src\corelib\global\qfloat16.cpp(229,32): error: use of undeclared identifier '_mm_cvtph_ps'; did you mean '_mm_cvtpd_ps'?
              out[i] = _mm_cvtss_f32(_mm_cvtph_ps(_mm_cvtsi32_si128(in[i])));
                                     ^~~~~~~~~~~~
                                     _mm_cvtpd_ps
      D:\zyh\llvm\LLVM-13.0.0-win64\lib\clang\13.0.0\include\emmintrin.h(1295,1): note: '_mm_cvtpd_ps' declared here
      _mm_cvtpd_ps(__m128d __a)
      ^
      10 errors generated.
      

      CMake configuration parameters:

      cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="%~dp0install" -DQT_QMAKE_TARGET_MKSPEC=win32-msvc -DQT_BUILD_TESTS=OFF -DQT_BUILD_EXAMPLES=OFF -GNinja "%~dp0qtbase"
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              allan.jensen Allan Sandfeld Jensen
              wangwenx190 赵 宇航
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes