jedisct1 / libsodium

A modern, portable, easy to use crypto library.
https://libsodium.org
Other
12.06k stars 1.72k forks source link

FreeBSD: aarch64 build fails #1372

Closed nunotexbsd closed 1 month ago

nunotexbsd commented 1 month ago

Hello,

While https://github.com/jedisct1/libsodium/issues/1313 issue was fixed, build is failing on aarch64.

In file included from crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c:35:
/usr/lib/clang/18/include/arm_neon.h:62502:32: error: always_inline function 'vget_high_p64' requires target feature 'crypto', but would be inlined into function 'vmull_high_p64' that is compiled without support for 'crypto'
 62502 |   __ret = vmull_p64((poly64_t)(vget_high_p64(__p0)), (poly64_t)(vget_high_p64(__p1)));

Full log: libsodium-1.0.19.log

Any clues on how to fix it?

Thanks

jedisct1 commented 1 month ago

Is that with 1.0.19-stable?

nunotexbsd commented 1 month ago

@jedisct1

Yes, libsodium 1.0.19. FreeBSD port

jedisct1 commented 1 month ago
In file included from crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c:35:

In 1.0.19-stable, this is an empty line, so having an error here wouldn't make sense.

I think this is an issue that was in the 1.0.19 point release, but that was shortly after in stable.

bb6e6a4b527194e3ca8e8bc7e96b166b361853e3 seems the relevant change for this.

FreeBSD can backport the changes from 1.0.19-stable, or wait for the 1.0.20 point release.

nunotexbsd commented 1 month ago

My bad, I was trying to backport https://github.com/jedisct1/libsodium/commit/fb4533b0a941b3a5b1db5687d1b008a5853d1f29 as it is already merged.

I will try https://github.com/jedisct1/libsodium/commit/bb6e6a4b527194e3ca8e8bc7e96b166b361853e3 asap!

nunotexbsd commented 1 month ago

Fixed!

Thanks for fast help.

Cheers

jedisct1 commented 1 month ago

libsodium 1.0.20 has been released, so you shouldn't need patches any more.