Re: [systemd-devel] New developer building systemd
On Fr, 10.09.21 17:44, Marcus Harrison (mar...@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
Re: [systemd-devel] New developer building systemd
The function is used.. only when HAVE_LIBCRYPTSETUP. You either need to define it on an #ifdef HAVE_LIBCRYPTSETUP or add add an __attribute__(__unused__) to it, then the warning will shut up and the linker may garbage collect it later. On Fri, Sep 10, 2021 at 12:50 PM Marcus Harrison 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. > > Cheers, > Marcus
Re: [systemd-devel] New developer building systemd
On Freitag, 10. September 2021 17:44:56 CEST Marcus Harrison 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. > > Cheers, > Marcus That's embarrassing - it's GCC 9.3. Sorry for the noise. Questions still stand. Cheers, Marcus