QtCipherSqlitePlugin icon indicating copy to clipboard operation
QtCipherSqlitePlugin copied to clipboard

error: inlining failed in call to always_inline '_mm_aesimc_si128': target specific option mismatch

Open luppiterw opened this issue 3 years ago • 3 comments

E:\Applications\Qt\Tools\mingw730_64\lib\gcc\x86_64-w64-mingw32\7.3.0\include\wmmintrin.h:77: error: inlining failed in call to always_inline '_mm_aesimc_si128': target specific option mismatch
 _mm_aesimc_si128 (__m128i __X)
 ^~~~~~~~~~~~~~~~


E:/Applications/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/wmmintrin.h:77:1: error: inlining failed in call to always_inline '_mm_aesimc_si128': target specific option mismatch
 _mm_aesimc_si128 (__m128i __X)
 ^~~~~~~~~~~~~~~~
D:\Projects\GithubProjects\QtCipherSqlitePlugin\sqlitecipher\sqlite3\sqlite3mc_amalgamation.c:254177:26: note: called from here
         keySchedule[j] = _mm_aesimc_si128(tempKeySchedule[j]);
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mingw32-make[2]: *** [Makefile.Debug:300: .obj/debug/sqlite3mc_amalgamation.o] Error 1

SOS! How can I handle this error?

luppiterw avatar Jul 05 '22 08:07 luppiterw

Which version of Qt? Qt 5 or Qt 6?

devbean avatar Jul 09 '22 01:07 devbean

I'm having the same error message when building with my own buildsystem which doesn't pass -march=native like sqlitecipher.pro does. However AFAIU that flag can be problematic (code built on my machine might not run on a machine with an older CPU), so it would be better to use something like -march=core-avx2 which sets the bar much lower in terms of CPU requirement, no? I'm not 100% sure what the right flag would be, actually.

dfaure-kdab avatar Jun 12 '24 12:06 dfaure-kdab

Actually, I used the script from https://stackoverflow.com/questions/43128698/inlining-failed-in-call-to-always-inline-mm-mullo-epi32-target-specific-opti and it says the right flags are -maes -msse4.1.

_mm_aesimc_si128 requires -maes and _mm_extract_epi32 requires -msse4.1 (at least on gcc/linux).

dfaure-kdab avatar Jun 12 '24 13:06 dfaure-kdab