-
-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
failure to build on arm #253
Comments
I can reproduce this problem with this command
which was commit 0f6bf14 at the time this gives:
lsb_release
gcc --version
lscpu
uname -r
|
@brettowe please, may I ask you to verify if it's still the case? Some of |
looks like there is still some issues. [ 97%] Linking CXX static library libSMHasherSupport.a lsb_release -a gcc --version |
i also tested on opensuse tumbleweed, has the same error gcc --version |
Similarly here. Culprit is that the hardware-acceleretard T1HA code is only compiled on Intel But the hardware accelerated t1ha test is included whenever AES instructions are available There are ARM processor nowadays which do have AES hardware acceleration (in my case, RK3399S powered PinePhone Pro). So the function Suggested(*) fix: $ git diff
diff --git a/Hashes.h b/Hashes.h
index d1631d7..e77968a 100644
--- a/Hashes.h
+++ b/Hashes.h
@@ -466,7 +466,7 @@ inline void mum_low_test ( const void * key, int len, uint32_t seed, void * out
//-----------------------------------------------------------------------------
#define T1HA0_RUNTIME_SELECT 0
-#ifdef HAVE_AESNI
+#if defined(HAVE_AESNI) && ((defined(__i686__) || defined(__x86_64__)))
# define T1HA0_AESNI_AVAILABLE 1
#else
# define T1HA0_AESNI_AVAILABLE 0 (*): I haven't checked the actual code inside t1ha0_ia32aes_noavx.c to see if it could compile (my knowledge of intrinsics is too rusty), but just by the name of the function (IA32) I would expect it's written targeting Intel CPUs. |
(Note: that maybe my fix is wrong and using sse2neon and/or SIMDe it would be possible to instead get the hardware accelerated to compile on ARM. Again don't trust my (very limited) level of knowledge about intrinsic) |
i'll rather add the aes build to arm archs, if possible. as with gxhash |
while attempting to build this I get the below linking error:
[ 98%] Linking CXX executable SMHasher
/usr/bin/ld: /tmp/SMHasher.NXV2q9.ltrans0.ltrans.o: in function
t1ha0_ia32aes_noavx_test(void const*, int, unsigned int, void*)': <artificial>:(.text+0x8518): undefined reference to
t1ha0_ia32aes_noavx'/usr/bin/ld: SMHasher: hidden symbol `t1ha0_ia32aes_noavx' isn't defined
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/SMHasher.dir/build.make:104: SMHasher] Error 1
make[2]: Leaving directory '/root/smhasher/build'
make[1]: *** [CMakeFiles/Makefile2:125: CMakeFiles/SMHasher.dir/all] Error 2
make[1]: Leaving directory '/root/smhasher/build'
make: *** [Makefile:160: all] Error 2
make: Leaving directory '/root/smhasher/build'
device is a odroid hc4
cat /proc/cpuinfo
processor : 0
BogoMIPS : 48.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x1
CPU part : 0xd05
CPU revision : 0
The text was updated successfully, but these errors were encountered: