-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Can't build Crypto++ 8.6.0 for iOS in the M1 architecture #1074
Comments
Thanks @brutalkeso, Unfortunately I cannot test this. I have an M1, and the GCC Compile Farm has a M1. Neither machine has Xcode. I believe what changed is, we enabled CRC and GCM (polynomail multiply) in Crypto++ 8.6. You may need to define |
How would I define that? |
Add it to
to
|
That solved the compilation error in my case. But I haven't tested the library yet, will comment back here once that's done. |
I confirm that the invoked functions from the library work as they should when adding the flag that @noloader mentioned (I haven't done any extensive testing though). |
Thanks @JlidiBorhen. I think we may be able to sidestep this issue on iOS, but we need to hack-in some byte codes instead of mnemonics. We should probably do it to avoid the compile error. |
@brutalkeso, @erikbylow-vol, @JlidiBorhen, If you have time could you test Master, please? I think we cleared this issue with some recent changes to the makefiles. If not I would like to take another shot at it before the Crypto++ 8.7 release. |
Wouldn't |
Function Multiversioning works well in C, but not C++. We tried it and it failed miserably. I can't find the bug report I used to track a similar cut-in. But it was ugly. And then we had to pull it all back out because it caused so many problems. |
Oh, sorry, I don’t mean the multi-targeting feature of the Using the target attribute in this way tells the compiler that it has carte blanche to use those extended instructions where it feels like in that function—and allow the programmer to explicitly use those within the function. It’s like passing additional The advantage is that you can do runtime feature detection. If you were to pass, say, This page mentions the feature: One minor annoyance I’ve noticed is that for ARM, Clang expects Crypto++ supports a much wider target/platform/compiler range than my own code, so this may not feasible. |
@noloader I don't know if you got a reply from them but I just tried to cross compile on a MacBookAir M1 for iPhoneOS15.4.sdk with the latest master of today (28.04) and got the same error as @brutalkeso. EDIT: Hit me up if I should test something for you! |
Hello, I have the same issue. |
I believe the issue is specific to a M1. The problem at the time of the bug report was, Apple Clang did not accept the CRC option. Then, we enabled the option anyways. The bug here is, we need to fix the "anyways". We should only enable CRC option when Apple Clang supports it. To do that, I need a test machine. |
I will test it tomorrow on a Intel and let you know 👍.
What machine do you need? A Mac with M1? |
I have the same compilation problems on a
|
I'm getting the same error building with xcode 10.1. (The newest version I can install on my old 2011 iMac.) |
Crypto++ Issue Report
This works fine with
8_5_0
, but not with8_6_0
. Then I get errors like:Mac mini (M1, 2020) macOs BigSur 11.6
Xcode Version 13.0
The text was updated successfully, but these errors were encountered: