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

WIN64: 'static assertion failed with "You've instantiated std::aligned_storage...' errors for bootstrap builds using Windows ICC with MSVC 15.8

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.12
    • Fix Version/s: 5.11.2
    • Labels:
      None
    • Environment:
      * Windows 10 x64,
      * ICC 2018 Update 3,
      * MSVC 2017 15.8.0,
      * Windows SDK 10.0.17134.12,
      * Qt5-dev-ab25e989b1e08a85eaab75a6d647fa9efdbbcf55.
    • Platform/s:
      Windows
    • Commits:
      0ef66e98ccf4946a0e4513ab5fc157df0f0aca4e

      Description

      Hello, everyone,

      For builds using Windows ICC got error:

              cd tools\bootstrap\ && ( if not exist Makefile C:\libQT-5.12-dev\build\qtbase\bin\qmake.exe -o Makefile C:\libQT-5.12-dev\build\qtbase\src\tools\bootstrap\bootstrap.pro ) && C:\Windows\jom.exe -f Makefile
              C:\Windows\jom.exe -f Makefile.Release
              icl -c -nologo -Zc:wchar_t -Qprec -Zm200 -Zc:forScope -O2 -MD -Qstd=c++14 -Qoption,cpp,--unicode_source_kind,UTF-8 -W3 -Qdiag-disable:673,809,1738,1744,3373 -DUNICODE -D_UNICODE -DWIN32 -DWIN64 -DQT_VERSION_STR="\"5.12.0\"" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=12 -DQT_VERSION_PATCH=0 -DQT_BOOTSTRAPPED -DQT_NO_CAST_TO_ASCII -DQT_NO_FOREACH -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_BOOTSTRAP_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_FORCE_ASSERTS -DNDEBUG -I. -I..\..\..\include -I..\..\..\include\QtCore -I..\..\..\include\QtCore\5.12.0 -I..\..\..\include\QtCore\5.12.0\QtCore -I..\..\..\include\QtXml -I..\..\..\include\QtXml\5.12.0 -I..\..\..\include\QtXml\5.12.0\QtXml -Itmp -IC:\libZLIB-1.2.11\ICC64RH\include -I..\..\..\mkspecs\win32-icc -Fo.obj\release\ @C:\Users\test\AppData\Local\Temp\qrandom.obj.928.78.jom
      qrandom.cpp
      C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include\type_traits(1271): error: static assertion failed with "You've instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)). Before VS 2017 15.8, the member type would non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this correctly, but the fix inherently changes layout and breaks binary
                compatibility (*only* for uses of aligned_storage with extended alignments). Please define either (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and that you actually want a type with an extended alignment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conformant behavior."
              static_assert(_Always_false<_Aligned>,
              ^
                detected during:
                  instantiation of class "std::_Aligned<_Len, _Align, double, 0> [with _Len=5004Ui64, _Align=64Ui64]" at line 1291
                  instantiation of class "std::_Aligned<_Len, _Align, int, 0> [with _Len=5004Ui64, _Align=64Ui64]" at line 1298
                  instantiation of class "std::_Aligned<_Len, _Align, short, 0> [with _Len=5004Ui64, _Align=64Ui64]" at line 1305
                  instantiation of class "std::_Aligned<_Len, _Align, char, 0> [with _Len=5004Ui64, _Align=64Ui64]" at line 1312
                  instantiation of class "std::aligned_storage<_Len, _Align> [with _Len=5004Ui64, _Align=64Ui64]" at line 402 of "..\..\corelib\global\qrandom.cpp"
      
      qoperatingsystemversion_win.cpp
      jom: C:\libQT-5.12-dev\build\qtbase\src\tools\bootstrap\Makefile.Release [.obj\release\qrandom.obj] Error 2
      jom: C:\libQT-5.12-dev\build\qtbase\src\tools\bootstrap\Makefile [release] Error 2
      

       

      Reproduced for:

      • builds using Windows ICC, integrated with MSVC 15.8.0,

      not reproduced for:

      • builds using Windows ICC, integrated with MSVC 15.7.3.

       

      Best,

      Alexander

       

        Attachments

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

          Activity

            People

            Assignee:
            sav sav
            Reporter:
            sav sav
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes