-
Notifications
You must be signed in to change notification settings - Fork 417
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
40 tests fail on ARM32 (armv7hf): AssertionError: Got unexpected return code -4 #1483
Comments
My (not expert in arm) debugging attempts:
|
Can you try adding |
I added
Thanks! [1] Adding to
|
Okay, so that's the code that was causing the problem. Do you know how to do cycle counting on ARM32? If not, then ideally we would update the CMake configuration to automatically detect ARM32 and apply the flag you did. |
I'm not an expert in ARM32, so I don't have personal knowledge, but I have heard that djb does |
I tested and this (call to ps. I fear there cannot be single solution for ARM32 since they are very diverse. |
So probably we'll need to revert to using time rather than cycles. Do you happen to know a way to detect ARM32 in either CMake or C preprocessor macros? |
By this https://developer.arm.com/documentation/dui0774/e/Other-Compiler-specific-Features/Predefined-macros I think JFYI:
|
About cmake, my guess is if |
I'm not sure how to characterize which platforms it is acceptable on and which aren't, so the only strategy I have would be to turn it off on all ARM32 platforms. |
I've created #1485 as an attempt to fix it. But I wonder if it's actually a different problem -- it's not that the instructions aren't supported, but that they aren't available to user-space programs by default. It's my understanding this is a problem on ARMv8 (https://github.com/mupq/pqax#enable-access-to-performance-counters) but it might also be a problem on ARMv7 (https://neocontra.blogspot.com/2013/05/user-mode-performance-counters-for.html). The workaround on ARMv8 is to install a kernel module (see my first link) to turn on the Performance Monitor Unit (PMU) which then makes the required instructions available to user-space programs. In our benchmarking code we have a configure-time option that lets you decide whether to use those or not (but still depends on you having the kernel module enabled.) |
I think our infrastructure admins will not agree to install some 3rd party out-of-tree kernel module on build farm (not even all in-tree modules, due to security reasons) just to run some tests. Also (I tried to run but) tests do not work in aarch32 KVM virtual machine. So the best approach sounds like to have configure-time option. (And by default to disable this on all ARM32.) |
Describe the bug
I try to build
0.8.0-rc1
for ALT Linux and found that 40 tests failed on armv7hf arch.Environment (please complete the following information):
ALT Linux
1.1.1t
gcc 12.2.1
-DBUILD_SHARED_LIBS=ON -DOQS_DIST_BUILD=ON -DOQS_OPT_TARGET=generic
0.8.0.rc1
Full build log is temporary available there https://git.altlinux.org/tasks/321944/build/100/armh/log
The text was updated successfully, but these errors were encountered: