[systemd-devel] New developer building systemd

Lennart Poettering lennart at poettering.net
Tue Sep 14 15:47:36 UTC 2021


On Fr, 10.09.21 17:44, Marcus Harrison (marcus at harrisonland.co.uk) wrote:

> Hey folks,
>
> I've downloaded the systemd sources and am attempting to build with GCC 9.4 on
> KDE Neon and am receiving the build error described in build-error.txt on
> updated main branch (as of writing).
>
> I've patched around it using the change described in
> remove_unused_function.patch, which allows the build to follow through, but
> the test suite has multiple failures, and requires manual intervention
> multiple times - for example, dropping to a BusyBox recovery shell or log-in
> shell, and some of the tests will hang indefinitely.
>
> I'm wondering how much of this is intended, and if my patch broke
> anything.

You are building without libcryptsetup. Apparently this combination of
build options is currently not tested (i.e. repart on, but
libcryptsetup off).


> diff --git a/src/partition/repart.c b/src/partition/repart.c
> index 926dbb2ae4..8ee78c9b08 100644
> --- a/src/partition/repart.c
> +++ b/src/partition/repart.c
> @@ -206,7 +206,7 @@ static const char *encrypt_mode_table[_ENCRYPT_MODE_MAX] = {
>          [ENCRYPT_KEY_FILE_TPM2] = "key-file+tpm2",
>  };
>
> -DEFINE_PRIVATE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(encrypt_mode, EncryptMode, ENCRYPT_KEY_FILE);
> +DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING_WITH_BOOLEAN(encrypt_mode, EncryptMode, ENCRYPT_KEY_FILE);
>

Patch looks OK, but instead of replacing the line unconditionally, it
should be one or the other depending on `#if HAVE_LIBCRYPTSETUP`, so
that it then works in both cases.

Would be delighted if you could submit such a patch via github PR.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list