Closed whalley closed 1 year ago
When buliding on MacOS and Linux we are encountering errors which seem to be related to the
HAS_AES_HARDWARE
detection insqlite3mc_amalgamation.c
.On Linux (x86_64) we get the following errors: https://app.circleci.com/pipelines/github/moneymanagerex/moneymanagerex/202/workflows/46c66745-80fa-42e8-a46a-0d314d0ea47b/jobs/201
Yes, this error is related to the detection of AES hardware support on x86/x86_64 platforms. However, it is more a compiler issue. While MSVC++ does not need any special compile time options, GCC does, namely you have to specify the compile time options -msse4.2 -maes
, so that GCC activates support for compiling the AES hardware related function calls.
On MacOS if I build with arm64 it works fine, however if I build for just x86_64 or build a universal binary with both arm64 and x86_64 I get failures similar to Linux.
If compiling for x86_64, the above mentioned compile time options are always required. Compiling for ARM usually doesn't require any specific compile time options.
Can you offer any advice on this - what extra is need for Linux and MacOS x86_64 builds?
Add the compile time options -msse4.2 -maes
. That should solve the issue.
I can hack the
sqlite3mc_amalgamation.c
file to force#define HAS_AES_HARDWARE AES_HARDWARE_NONE
(there seems no way of doing this without changing the source).
Maybe I should add an option to enable or disable AES hardware support. However, all modern x86/x86_64 processors have AES hardware support. So disabling AES hardware support would be a strong disadvantage.
See moneymanagerex/moneymanagerex#5302 for further info.
Your advice would be appreciated,
I will add a comment to that issue as well.
@utelle Thanks for the speedy and concise response. All good, now builds.
@utelle When buliding on MacOS and Linux we are encountering errors which seem to be related to the
HAS_AES_HARDWARE
detection insqlite3mc_amalgamation.c
.On Linux (x86_64) we get the following errors: https://app.circleci.com/pipelines/github/moneymanagerex/moneymanagerex/202/workflows/46c66745-80fa-42e8-a46a-0d314d0ea47b/jobs/201
On MacOS if I build with arm64 it works fine, however if I build for just x86_64 or build a universal binary with both arm64 and x86_64 I get failures similar to Linux.
Can you offer any advice on this - what extra is need for Linux and MacOS x86_64 builds?
I can hack the
sqlite3mc_amalgamation.c
file to force#define HAS_AES_HARDWARE AES_HARDWARE_NONE
(there seems no way of doing this without changing the source).See https://github.com/moneymanagerex/moneymanagerex/issues/5302 for further info.
Your advice would be appreciated,