[systemd-devel] New developer building systemd

Marcus Harrison marcus at harrisonland.co.uk
Fri Sep 10 15:44:56 UTC 2021


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
-------------- next part --------------
FAILED: systemd-repart at exe/src_partition_repart.c.o
cc -Isystemd-repart at exe -I. -I.. -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I../ -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/shared -I../src/shared -I/usr/include/blkid -I/usr/include/libfdisk -I/usr/include/uuid -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99 -g -Wno-format-signedness -Wno-missing-field-initializers -Wno-unused-parameter -Wdate-time -Wendif-labels -Werror=format=2 -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=overflow -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=undef -Werror=unused-function -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wwrite-strings -Wno-maybe-uninitialized -Wno-unused-result -Werror=missing-declarations -Werror=missing-prototypes -fdiagnostics-show-option -ffast-math -fno-common -fno-strict-aliasing -fstack-protector -fstack-protector-strong -fvisibility=hidden --param=ssp-buffer-size=4 -Werror=shadow -include config.h -pthread -MD -MQ 'systemd-repart at exe/src_partition_repart.c.o' -MF 'systemd-repart at exe/src_partition_repart.c.o.d' -o 'systemd-repart at exe/src_partition_repart.c.o' -c ../src/partition/repart.c
In file included from ../src/partition/repart.c:61:
../src/partition/repart.c:209:49: error: ?encrypt_mode_to_string? defined but not used [-Werror=unused-function]
  209 | DEFINE_PRIVATE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(encrypt_mode, EncryptMode, ENCRYPT_KEY_FILE);
      |                                                 ^~~~~~~~~~~~
../src/basic/string-table.h:18:27: note: in definition of macro ?_DEFINE_STRING_TABLE_LOOKUP_TO_STRING?
   18 |         scope const char *name##_to_string(type i) {                    \
      |                           ^~~~
../src/basic/string-table.h:90:72: note: in expansion of macro ?_DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN?
   90 | #define DEFINE_PRIVATE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(name,type,yes) _DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(name,type,yes,static)
      |                                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/partition/repart.c:209:1: note: in expansion of macro ?DEFINE_PRIVATE_STRING_TABLE_LOOKUP_WITH_BOOLEAN?
  209 | DEFINE_PRIVATE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(encrypt_mode, EncryptMode, ENCRYPT_KEY_FILE);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
[22/439] Compiling C object 'systemd-analyze at exe/src_analyze_analyze.c.o'.
ninja: build stopped: subcommand failed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove_unused_function.patch
Type: text/x-patch
Size: 586 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20210910/9991290b/attachment.bin>


More information about the systemd-devel mailing list