P-H-C / phc-winner-argon2

The password hash Argon2, winner of PHC
Other
4.77k stars 405 forks source link

ARM <emmintrin.h> not found #272

Open globaltoken opened 5 years ago

globaltoken commented 5 years ago

Hi guys,

Any ideas how I can compile this for arm?

fatal error: emmintrin.h: No such file or directory

include

                   ^

compilation terminated.

ZhangWei-bi commented 1 year ago

I know this is an old issue, but I am seeing something similar while trying to build on my m1 mac. Did you ever figure out the issue?

In file included from phc-winner-argon2/src/blake2/blamka-round-opt.h:23:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include/emmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include/mmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include/mmintrin.h:54:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
josephlr commented 4 months ago

It looks like you are attempting to build the optimized version of argon2, but this is only supported on x86. Are you building using the the Makefile? That should detect if the optimized build is supported and use the "reference" build if not.