错误:内联调用always_inline'_mm_aesenc_si128'失败:目标特定选项不匹配,添加-msse4.1不够

时间:2017-11-22 20:46:00

标签: cmake cross-compiling

我正在尝试将cryptonote gui钱包从Linux(Fedora)交叉编译到Windows。

在没有任何额外标志的情况下编译时,我收到此错误:

In file included from /home/etienne/Documents/Brokertech/bkc/brokercoins/guiwallet-win/cryptonote/src/crypto/slow-hash.c:9:0:
/usr/lib/gcc/i686-w64-mingw32/7.2.0/include/emmintrin.h:1290:1: error: inlining failed in call to always_inline '_mm_xor_si128': target specific option mismatch
  _mm_xor_si128 (__m128i __A, __m128i __B)
  ^~~~~~~~~~~~~
/home/etienne/Documents/Brokertech/bkc/brokercoins/guiwallet-win/cryptonote/src/crypto/slow-hash.c:100:11: note: called from here
   *tmp3 = _mm_xor_si128(*tmp3, tmp4);

然后我尝试为C和CXX添加-msse4.1标志,我仍然遇到相同的错误,但是在另一个文件上:

In file included from 
/home/etienne/Documents/Brokertech/bkc/brokercoins/guiwallet-win/cryptonote/src/crypto/slow-hash.c:10:0:
/usr/lib/gcc/i686-w64-mingw32/7.2.0/include/wmmintrin.h:61:1: error: inlining failed in call to always_inline '_mm_aesenc_si128': target specific option mismatch
   _mm_aesenc_si128 (__m128i __X, __m128i __Y)
   ^~~~~~~~~~~~~~~~
In file included from 
/home/etienne/Documents/Brokertech/bkc/brokercoins/guiwallet-win/cryptonote/src/crypto/slow-hash.c:167:0:
/home/etienne/Documents/Brokertech/bkc/brokercoins/guiwallet-win/cryptonote/src/crypto/slow-hash.inl:159:21: note: called from here
   xmminput[0] = _mm_aesenc_si128(xmminput[0], expkey[j]);

我不明白为什么解决方案适用于第一个文件但现在阻止了? 非常感谢!

1 个答案:

答案 0 :(得分:0)

你没有得到同样的错误。您有2个完全不同的错误。第一个内联失败是SSE- 2 128位XOR指令,它通过添加-msse4.1得到解决。第二个是AES NI内在的,我相信你需要-maes