Skip to content

build: fixup check for HAVE_GOOD_LIBSODIUM#7907

Merged
rustyrussell merged 1 commit intoElementsProject:masterfrom
fanquake:fix_libsodium_check
Jan 22, 2025
Merged

build: fixup check for HAVE_GOOD_LIBSODIUM#7907
rustyrussell merged 1 commit intoElementsProject:masterfrom
fanquake:fix_libsodium_check

Conversation

@fanquake
Copy link
Contributor

@fanquake fanquake commented Dec 5, 2024

The current check fails when building with newer GCC, i.e:

error: ‘crypto_secretstream_xchacha20poly1305_init_push’ reading 32 bytes from a region of size 3 [-Werror=stringop-overread]
   12 |         crypto_secretstream_xchacha20poly1305_init_push(&crypto_state, header,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   13 |                                                         data);

This inadvertently results in the release binaries for Ubuntu 22.04 & 24.04, not having a runtime libsodium dependency, but instead using the bundled lib.

It's not clear to me this is actually enough to fix (all) the release builds, as the build containers need to have libsodium-dev, not just libsodium in them, and it's not clear to me which packages are actually present looking at the repro build scripts.

Changelog-Fixed: build: libsodium configure check fixed to work with newer GCC.

The current check fails when building with newer GCC, i.e:
```bash
error: ‘crypto_secretstream_xchacha20poly1305_init_push’ reading 32 bytes from a region of size 3 [-Werror=stringop-overread]
   12 |         crypto_secretstream_xchacha20poly1305_init_push(&crypto_state, header,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   13 |                                                         data);
```

This inadvertently results in the release binaries for Ubuntu 22.04 &
24.04, not having a runtime libsodium dependency, but instead using the
bundled lib.

It's not clear to me this is actually enough to fix (all) the release builds,
as the build containers need to have `libsodium-dev`, not just `libsodium`
in them, and it's not clear to me which packages are actually present
looking at the repro build scripts.

Changelog-Fixed: build: libsodium configure check fixed to work with newer GCC.
@rustyrussell rustyrussell added this to the v25.02 milestone Jan 22, 2025
@rustyrussell rustyrussell merged commit f054b3b into ElementsProject:master Jan 22, 2025
@fanquake fanquake deleted the fix_libsodium_check branch January 23, 2025 09:43
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.

2 participants