[Interest] Wrong compiler caps check or missing /arch:avx?

Olivier B. perso.olivier.barthelemy at gmail.com
Tue Jan 22 13:41:53 CET 2019


It seems it is because i didn't have QT_COMPILER_SUPPORTS_SIMD_ALWAYS

Related config test :
Checking for Intrinsics without -mXXX argument...
+ cd /d C:\sdk\src\qt-everywhere-src-5.12.0\shadow_dbg\config.tests\x86_simd
&& C:\sdk\src\qt-everywhere-src-5.12.0\shadow_dbg\qtbase\bin\qmake.exe
"CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG +=
shared warn_off console single_arch" (stripped) "SIMD=aesni avx avx2
sse2 sse3 sse4_1 sse4_2 ssse3"
C:/sdk/src/qt-everywhere-src-5.12.0/qtbase/config.tests/x86_simd
+ cd /d C:\sdk\src\qt-everywhere-src-5.12.0\shadow_dbg\config.tests\x86_simd
&& set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake
> Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
> Copyright (C) Microsoft Corporation.  All rights reserved.
> del main.obj
> del x86_simd.exp
> Impossible de trouver C:\sdk\src\qt-everywhere-src-5.12.0\shadow_dbg\config.tests\x86_simd\x86_simd.exp
> Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
> Copyright (C) Microsoft Corporation.  All rights reserved.
> cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W0 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_COMPILER_SUPPORTS_AESNI -DQT_COMPILER_SUPPORTS_AVX -DQT_COMPILER_SUPPORTS_AVX2 -DQT_COMPILER_SUPPORTS_SSE2 -DQT_COMPILER_SUPPORTS_SSE3 -DQT_COMPILER_SUPPORTS_SSE4_1 -DQT_COMPILER_SUPPORTS_SSE4_2 -DQT_COMPILER_SUPPORTS_SSSE3 -DNDEBUG (stripped) -IC:\sdk\src\qt-everywhere-src-5.12.0\qtbase\mkspecs\win32-msvc -Fo @C:\cygwin\tmp\nm8037.tmp
> main.cpp
> link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:x86_simd.exe @C:\cygwin\tmp\nm80D4.tmp
> LINK : fatal error LNK1104: cannot open file 'x86_simd.exe'
> NMAKE : fatal error U1077: 'C:\vs2015\vc\bin\amd64\link.EXE' : return code '0x450'
> Stop.
test config.qtbase.tests.x86SimdAlways FAILED

Strange how the link failed. And after a rebuild, the test now passes.
Something else on the computer probably took too much memory and the
linker crashed



Le lun. 21 janv. 2019 à 18:02, Thiago Macieira
<thiago.macieira at intel.com> a écrit :
>
> On Monday, 21 January 2019 08:18:16 PST Olivier B. wrote:
> > It seems that code of the cpp that is compiled "if defined
> > QT_COMPILER_SUPPORTS_SSE4_1" (present in my qconfig.h) references code
> > of qdrawingprimitive_sse2_p.h that is defined "if
> > QT_COMPILER_SUPPORTS_HERE(SSE4_1)" (absent because __SSE_4_1__ is not
> > defined in qsimd_p.h, because configure does not add /arch:avx on the
> > command line)
>
> That's an incorrect conclusion. The correct branch of qsimd_p.h for MSVC 2015
> is this:
>
> #elif defined(Q_PROCESSOR_X86) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS)
> #  define QT_COMPILER_SUPPORTS_HERE(x)    ((__ ## x ## __) ||
> QT_COMPILER_SUPPORTS(x))
>
> The second condition of that macro is QT_COMPILER_SUPPORTS_SSE4_1 again.
>
> > I did not pass any cpu-specific type flags to configure, and i am not
> > sure i want to. What is the proper fix of the cpu checks and flags
> > that will make this build, without making the code dependant on avx or
> > SSE4.1?
>
> MSVC 2015 compiles out of the box and this code is enabled. Your problem is
> elsewhere.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest



More information about the Interest mailing list