randombit / botan

Cryptography Toolkit

Home Page:https://botan.randombit.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build failure, 3.3.0 amalgamation arm64

bazineta opened this issue · comments

When building using clang 16.0.6, on Ubuntu arm64, I found that I had to modify:

src/lib/hash/sha2_64/sha2_64_armv8/sha2_64_armv8.cpp

to specify BOTAN_FUNC_ISA("+crypto,sha3"), instead of just "+crypto", as without doing so, the compilation failed with errors of the format:

botan_all.cpp:88261:30: error: always_inline function 'vsha512su0q_u64' requires target feature 'sha3', but would be inlined into function 'compress_digest_armv8' that is compiled without support for 'sha3'

Excessive compiler spew omitted for brevity; many such errors.

Unlikely to be an optimal solution, but it did resolve the issue for me.

I'm guessing this is the relevant discussion: #3860 (comment). Probably your fix is actually correct and we just overlooked that the BOTAN_FUNC_ISA() macros had to be changed as well. :( @securitykernel can you confirm?

Confirmed.

@bazineta Please feel free to submit a pull request with your patch. :) Thanks for looking into it.

@reneme I think this is related to #3774 and my failed attempt to fix it in #3780.

Thanks for the pointers. I'm going to dig deeper on this.