-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
Fix illegal instruction on RPi 4 #2223
Conversation
Just doing this before applying a patch. Signed-off-by: Julian Oes <[email protected]>
The absl library tries to make use of the crypto libraries on arm64 platforms. However, it turns out that the RPi 4 chip does not have the crypto extensions. Hence, we need to patch absl to refrain from using the hardware crypto stuff and fallback to slower software implementations. This is only required for a random back-off timer at the moment, so shouldn't matter too much. Note that the RPi 5 has the crypto extensions but our build is the same for both. Signed-off-by: Julian Oes <[email protected]>
Isn't it the same as abseil/abseil-cpp#662? Weird that they seem to have fixed it 🤔. In any case, if there really is a need for a patch, I would do it only for the relevant platform. But I wonder if that could not be solved somehow with ABSL_RANDOM_HWAES_ARM64_FLAGS, which is apparently used here 🤔. Or could it be the case that nobody uses absl with the RPi4? That would surprise me 😅. E.g. here they seem to have made it work for RPi4... |
waiting for this fix 🤞 |
@JonasVautherin it looks related. I'm not sure. What I found is that hardware crypto is enabled for aarch64, and that might make sense for most platforms, but the Broadcom BCM2711 chip is lacking the crypto extensions. |
Of course updating absl was a mistake and it breaks the build. Gosh I hate dependencies. |
Signed-off-by: Julian Oes <[email protected]>
Seems to work, thanks a lot! |
Thank you, we faced the exact same issue in AxoSyslog running in an alpine based container on an RPi4. This PR was a good confirmation for us. :) P.S.: OpenSSL does runtime checks in init time to determine which CPU features are available on the runner host for certain operations, it would be nice to have something similar in the upstream libabseil, too. |
The absl library tries to make use of the crypto libraries on arm64 platforms. However, it turns out that the RPi 4 chip does not have the crypto extensions. Hence, we need to patch absl to refrain from using the hardware crypto stuff and fallback to slower software implementations. This is only required for a random back-off timer at the moment, so shouldn't matter too much.
Note that the RPi 5 has the crypto extensions but our build is the same for both.
Fixes mavlink/MAVSDK-Python#654.
Fixes mavlink/MAVSDK-Python#651.