open-quantum-safe / liboqs

C library for prototyping and experimenting with quantum-resistant cryptography
https://openquantumsafe.org/
Other
1.91k stars 465 forks source link

Compilation error: <instantiation>:16:5: error: instruction requires: sha3 #1933

Open fwh-dc opened 2 months ago

fwh-dc commented 2 months ago

Describe the bug

Compilation for ios fails:

13:23:30  liboqs/src/kem/kyber/oldpqclean_kyber512_aarch64/feat.S:147:5: note: while in macro instantiation
13:23:30      round
13:23:30      ^
13:23:30  <instantiation>:16:5: error: instruction requires: sha3
13:23:30      rax1.2d v29, v27, v29 ; d[3] = rotl(p[4], 1) ^ p[2]

I've found this stackoverflow question that suggests adding sha3 to the -march option. Doing that seems to solve the issue.

Additional question: We want to support macos and ios arm/intel variants. How do we add some CI pipeline that tests compilation for those platforms?

SWilson4 commented 2 months ago

Hi @fwh-dc, thanks for the report. Could you please provide details about your environment and your build commands so that I can try to reproduce the error?

fwh-dc commented 2 months ago

I am running XCode 16 on an intel mac with macos 14.

Here's the toolchain files + the cmake cache. cmake-env.zip

Please let me know if you need more.

baentsch commented 2 months ago

We want to support macos and ios arm/intel variants. How do we add some CI pipeline that tests compilation for those platforms?

I'm a bit surprised: I thought we already have that. Did you check out https://github.com/open-quantum-safe/liboqs/blob/main/.github/workflows/apple.yml and https://github.com/open-quantum-safe/liboqs/blob/main/.github/workflows/macos.yml ? Any enhancements e.g. testing setups not tested obviously welcome by PR.

fwh-dc commented 2 months ago

We want to support macos and ios arm/intel variants. How do we add some CI pipeline that tests compilation for those platforms?

I'm a bit surprised: I thought we already have that. Did you check out https://github.com/open-quantum-safe/liboqs/blob/main/.github/workflows/apple.yml and https://github.com/open-quantum-safe/liboqs/blob/main/.github/workflows/macos.yml ? Any enhancements e.g. testing setups not tested obviously welcome by PR.

No I did not see those. Ok so probably our toolchainfile is different from yours. Thanks for the pointer. I'll need some time to get a better understanding of what is wrong. But good to know that there is support.