lavaio / lava

Lava is a Proof-of-Capacity backed global digital infrastructure where people can create, trade and manage real-world assets.
https://www.lavatech.org/
MIT License
23 stars 12 forks source link

mingw cross-compilation failed #54

Closed ventfang closed 4 years ago

ventfang commented 4 years ago

Build lava windows failed following the instruction https://github.com/lavaio/lava/blob/master/doc/build-windows.md#building-for-64-bit-windows

  CXX      libbitcoin_common_a-poc.o
In file included from /usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/immintrin.h:41:0,
                 from /usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/x86intrin.h:48,
                 from /usr/share/mingw-w64/include/winnt.h:1519,
                 from /usr/share/mingw-w64/include/minwindef.h:163,
                 from /usr/share/mingw-w64/include/windef.h:8,
                 from /usr/share/mingw-w64/include/windows.h:69,
                 from /usr/share/mingw-w64/include/winsock2.h:23,
                 from ./compat.h:25,
                 from ./util/system.h:18,
                 from ./dbwrapper.h:12,
                 from ./ticket.h:8,
                 from ./primitives/transaction.h:14,
                 from ./primitives/block.h:9,
                 from ./chain.h:11,
                 from poc.cpp:2:
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/avxintrin.h: In function ‘std::vector<unsigned char> genNonceChunk(uint64_t, uint64_t)’:
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/avxintrin.h:607:1: error: inlining failed in call to always_inline ‘void _mm256_zeroupper()’: target specific option mismatch
 _mm256_zeroupper (void)
 ^~~~~~~~~~~~~~~~
poc.cpp:15:47: note: called from here
 #define MMZEROUPPER()         _mm256_zeroupper()
                               ~~~~~~~~~~~~~~~~^~
poc.cpp:59:5: note: in expansion of macro ‘MMZEROUPPER’
     MMZEROUPPER();
     ^
In file included from /usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/immintrin.h:41:0,
                 from /usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/x86intrin.h:48,
                 from /usr/share/mingw-w64/include/winnt.h:1519,
                 from /usr/share/mingw-w64/include/minwindef.h:163,
                 from /usr/share/mingw-w64/include/windef.h:8,
                 from /usr/share/mingw-w64/include/windows.h:69,
                 from /usr/share/mingw-w64/include/winsock2.h:23,
                 from ./compat.h:25,
                 from ./util/system.h:18,
                 from ./dbwrapper.h:12,
                 from ./ticket.h:8,
                 from ./primitives/transaction.h:14,
                 from ./primitives/block.h:9,
                 from ./chain.h:11,
                 from poc.cpp:2:
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/avxintrin.h:607:1: error: inlining failed in call to always_inline ‘void _mm256_zeroupper()’: target specific option mismatch
 _mm256_zeroupper (void)
 ^~~~~~~~~~~~~~~~
poc.cpp:15:47: note: called from here
 #define MMZEROUPPER()         _mm256_zeroupper()
                               ~~~~~~~~~~~~~~~~^~
poc.cpp:59:5: note: in expansion of macro ‘MMZEROUPPER’
     MMZEROUPPER();
     ^
Makefile:7079: recipe for target 'libbitcoin_common_a-poc.o' failed
make[2]: *** [libbitcoin_common_a-poc.o] Error 1
make[2]: Leaving directory '/home/fun/lava/src'
Makefile:12589: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/fun/lava/src'
Makefile:775: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1