[systemd-devel] Vague build failure related to systemd-executor
Luca Boccassi
luca.boccassi at gmail.com
Wed Nov 8 18:42:46 UTC 2023
On Wed, 8 Nov 2023 at 18:31, František Šumšal <frantisek at sumsal.cz> wrote:
>
> On 11/8/23 16:21, Luca Boccassi wrote:
> > On Wed, 8 Nov 2023 at 15:00, daechir <daechir at protonmail.com> wrote:
> >>
> >> Hello,
> >> I have been unable to build systemd from around the systemd-executor commit here: https://github.com/systemd/systemd/commit/bb5232b6a3b8af075ee06cc87416e5f49a6170d3. The error received is very vague and even when using verbose mode it's generally unhelpful.
> >> The error is as follows:
> >>
> >> FAILED: systemd-executor.p/src_core_exec-invoke.c.o
> >> cc -Isystemd-executor.p -I. -I../systemd -Isrc/basic -I../systemd/src/basic -Isrc/fundamental -I../systemd/src/fundamental -Isrc/systemd -I../systemd/src/systemd -I../systemd/src/libsystemd/sd-bus -I../systemd/src/libsystemd/sd-device -I../systemd/src/libsystemd/sd-event -I../systemd/src/libsystemd/sd-hwdb -I../systemd/src/libsystemd/sd-id128 -I../systemd/src/libsystemd/sd-journal -I../systemd/src/libsystemd/sd-netlink -I../systemd/src/libsystemd/sd-network -I../systemd/src/libsystemd/sd-resolve -Isrc/shared -I../systemd/src/shared -Isrc/core -I../systemd/src/core -I/usr/include/security -flto=auto -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -Wno-missing-field-initializers -Wno-unused-parameter -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=strict-flex-arrays -Werror=undef -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 -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong -fstrict-flex-arrays --param=ssp-buffer-size=4 -Wno-maybe-uninitialized -Wno-unused-result -ftrivial-auto-var-init=zero -Werror=shadow -march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fPIE -fno-strict-aliasing -fstrict-flex-arrays=1 -fvisibility=hidden -ffunction-sections -fdata-sections -include config.h -MD -MQ systemd-executor.p/src_core_exec-invoke.c.o -MF systemd-executor.p/src_core_exec-invoke.c.o.d -o systemd-executor.p/src_core_exec-invoke.c.o -c ../systemd/src/core/exec-invoke.c
> >> ../systemd/src/core/exec-invoke.c: In function ‘exec_invoke’:
> >> ../systemd/src/core/exec-invoke.c:4341:79: error: ‘INIT_PROCESS’ undeclared (first use in this function); did you mean ‘PRIO_PROCESS’?
> >> 4341 | context->utmp_mode == EXEC_UTMP_INIT ? INIT_PROCESS :
> >> | ^~~~~~~~~~~~
> >> | PRIO_PROCESS
> >> ../systemd/src/core/exec-invoke.c:4341:79: note: each undeclared identifier is reported only once for each function it appears in
> >> ../systemd/src/core/exec-invoke.c:4342:79: error: ‘LOGIN_PROCESS’ undeclared (first use in this function); did you mean ‘PRIO_PROCESS’?
> >> 4342 | context->utmp_mode == EXEC_UTMP_LOGIN ? LOGIN_PROCESS :
> >> | ^~~~~~~~~~~~~
> >> | PRIO_PROCESS
> >> ../systemd/src/core/exec-invoke.c:4343:39: error: ‘USER_PROCESS’ undeclared (first use in this function); did you mean ‘KILL_PROCESS’?
> >> 4343 | USER_PROCESS,
> >> | ^~~~~~~~~~~~
> >> | KILL_PROCESS
> >> [688/1337] Linking target src/shared/libsystemd-shared-255.r68519.a9d942aeb0-1.so
> >> ninja: build stopped: subcommand failed.
> >
> > That's a libc define - which glibc version are you using?
>
> This is caused by -Dutmp=false:
>
> $ meson setup build-noutmp -Dutmp=false
> ...
> $ ninja -C build-noutmp/
> ninja: Entering directory `build-noutmp/'
> [898/2336] Compiling C object systemd-executor.p/src_core_exec-invoke.c.o
> FAILED: systemd-executor.p/src_core_exec-invoke.c.o
> ccache cc -Isystemd-executor.p -I. -I.. -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -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 -Isrc/core -I../src/core -I/usr/include/security -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=strict-flex-arrays -Werror=undef -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 -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong -fstrict-flex-arrays --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fno-strict-aliasing -fstrict-flex-arrays=1 -fvisibility=hidden -fno-omit-frame-pointer -include config.h -MD -MQ systemd-executor.p/src_core_exec-invoke.c.o -MF systemd-executor.p/src_core_exec-invoke.c.o.d -o systemd-executor.p/src_core_exec-invoke.c.o -c ../src/core/exec-invoke.c
> ../src/core/exec-invoke.c: In function ‘exec_invoke’:
> ../src/core/exec-invoke.c:4378:79: error: ‘INIT_PROCESS’ undeclared (first use in this function); did you mean ‘PRIO_PROCESS’?
> 4378 | context->utmp_mode == EXEC_UTMP_INIT ? INIT_PROCESS :
> | ^~~~~~~~~~~~
> | PRIO_PROCESS
> ../src/core/exec-invoke.c:4378:79: note: each undeclared identifier is reported only once for each function it appears in
> ../src/core/exec-invoke.c:4379:79: error: ‘LOGIN_PROCESS’ undeclared (first use in this function); did you mean ‘PRIO_PROCESS’?
> 4379 | context->utmp_mode == EXEC_UTMP_LOGIN ? LOGIN_PROCESS :
> | ^~~~~~~~~~~~~
> | PRIO_PROCESS
> ../src/core/exec-invoke.c:4380:39: error: ‘USER_PROCESS’ undeclared (first use in this function); did you mean ‘KILL_PROCESS’?
> 4380 | USER_PROCESS,
> | ^~~~~~~~~~~~
> | KILL_PROCESS
> [907/2336] Compiling C object test-sd-dhcp-lease.p/src_libsystemd-network_test-sd-dhcp-lease.c.o
> ninja: build stopped: subcommand failed.
>
> Not sure how supported such builds are, if at all.
utmp is going the way of the dodo so yeah we should support it:
https://github.com/systemd/systemd/pull/29942
More information about the systemd-devel
mailing list