Skip to content
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

Update pqcrypto-internals build.rs to support iOS SDK 18.1 #72

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

gridbox
Copy link
Contributor

@gridbox gridbox commented Jan 2, 2025

I was still experiencing sha3 error even with version 0.2.7. I noticed the OP in #68 was using iOS SDK 17.2. I have since updated to Xcode 16 which is at iOS SDK 18.1 and the build flag did not fix it. However, through some searching I found that updating the build flag to -march=armv8-a+sha3 seems to work.

Unfortunately, I'm not using the library directly but it is an indirect dependency of another dependency that I am using to build a Flutter mobile app backed by a custom Rust library. I'm not sure if my fix is universal or is just appropriate for my specific use case.

LukasPukenis added a commit to NordSecurity/libtelio that referenced this pull request Jan 9, 2025
Darwin runners fail after the update of this crate
which is a transient dependency. Using `[patch]` doesn't
update properly so this is a manual attempt.

There's outstanding PR which claims to fix the issue:
rustpq/pqcrypto#72

The error in question from compilation:
```
cargo:warning=<instantiation>:79:5: error: instruction requires: sha3
```

Signed-off-by: Lukas Pukenis <[email protected]>
LukasPukenis added a commit to NordSecurity/libtelio that referenced this pull request Jan 9, 2025
Darwin runners fail after the update of this crate
which is a transient dependency. Using `[patch]` doesn't
update properly so this is a manual attempt.

There's outstanding PR which claims to fix the issue:
rustpq/pqcrypto#72

The error in question from compilation:
```
cargo:warning=<instantiation>:79:5: error: instruction requires: sha3
```

Signed-off-by: Lukas Pukenis <[email protected]>
@thomwiggers thomwiggers enabled auto-merge (squash) January 19, 2025 15:18
auto-merge was automatically disabled January 24, 2025 13:47

Head branch was pushed to by a user without write access

@SamuelScheit
Copy link

SamuelScheit commented Jan 28, 2025

@gridbox Thank you very much for this fix, this worked for me and fixed the compiling issue when trying to build for aarch64-apple-ios

Copy link
Member

@thomwiggers thomwiggers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to re-do this in a quick PR of my own, but thanks for the suggestion and sorry for taking a while to get to testing this.

pqcrypto-internals/build.rs Outdated Show resolved Hide resolved
@thomwiggers thomwiggers enabled auto-merge (squash) January 28, 2025 14:10
@thomwiggers thomwiggers merged commit b399374 into rustpq:main Jan 28, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants