sys-apps/systemd-253.4 fails to emerge with gcc version 13.1.0 As a work-around I have to use clang Reproducible: Always Steps to Reproduce: 1.install gcc 13 2.emerge sys-apps/systemd 3. Actual Results: INFO: calculating backend command to run: /usr/bin/ninja -j 4 -v * ERROR: sys-apps/systemd-253.4::gentoo failed (compile phase): * compile failed * * Call stack: * ebuild.sh, line 136: Called src_compile * environment, line 4185: Called meson-multilib_src_compile * environment, line 2614: Called multilib-minimal_src_compile * environment, line 2861: Called multilib_foreach_abi 'multilib-minimal_abi_src_compile' * environment, line 3128: Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile' * environment, line 2821: Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile' * environment, line 2819: Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_compile' * environment, line 646: Called multilib-minimal_abi_src_compile * environment, line 2855: Called multilib_src_compile * environment, line 3348: Called meson_src_compile * environment, line 2673: Called die * The specific snippet of code: * "$@" || die "compile failed" * * If you need support, post the output of `emerge --info '=sys-apps/systemd-253.4::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-apps/systemd-253.4::gentoo'`. * The complete build log is located at '/var/tmp/portage/sys-apps/systemd-253.4/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-apps/systemd-253.4/temp/environment'. * Working directory: '/var/tmp/portage/sys-apps/systemd-253.4/work/systemd-stable-253.4-.lp64d' * S: '/var/tmp/portage/sys-apps/systemd-253.4/work/systemd-stable-253.4' Expected Results: emerge completes successfuly See Attached logs
Created attachment 861531 [details] Build log
Created attachment 861532 [details] Environment
Created attachment 861533 [details] Info log
Created attachment 861534 [details] pqv log
FAILED: src/shared/libsystemd-shared-253.a.p/install.c.o riscv64-unknown-linux-gnu-gcc -Isrc/shared/libsystemd-shared-253.a.p -Isrc/shared -I../systemd-stable-253.4/src/shared -Isrc/basic -I../systemd-stable-253.4/src/basic -Isrc/fundamental -I../systemd-stable-253.4/src/fundamental -Isrc/systemd -I../systemd-stable-253.4/src/systemd -I. -I../systemd-stable-253.4 -I../systemd-stable-253.4/src/libsystemd/sd-bus -I../systemd-stable-253.4/src/libsystemd/sd-device -I../systemd-stable-253.4/src/libsystemd/sd-event -I../systemd-stable-253.4/src/libsystemd/sd-hwdb -I../systemd-stable-253.4/src/libsystemd/sd-id128 -I../systemd-stable-253.4/src/libsystemd/sd-journal -I../systemd-stable-253.4/src/libsystemd/sd-netlink -I../systemd-stable-253.4/src/libsystemd/sd-network -I../systemd-stable-253.4/src/libsystemd/sd-resolve -I/usr/include/blkid -I/usr/include/libmount -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=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -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 -fstrict-flex-arrays -Wno-maybe-uninitialized -Wno-unused-result -Werror=missing-declarations -Werror=missing-prototypes -fdiagnostics-show-option -fno-common -fno-strict-aliasing -fstack-protector -fstack-protector-strong -fstrict-flex-arrays=1 -fvisibility=hidden --param=ssp-buffer-size=4 -ffunction-sections -fdata-sections -fno-omit-frame-pointer -Werror=shadow -include config.h -mabi=lp64d -march=rv64imafdc_zba_zbb -mcpu=sifive-u74 -mtune=sifive-7-series -O3 -pipe -fomit-frame-pointer -fPIC -pthread -fvisibility=default -MD -MQ src/shared/libsystemd-shared-253.a.p/install.c.o -MF src/shared/libsystemd-shared-253.a.p/install.c.o.d -o src/shared/libsystemd-shared-253.a.p/install.c.o -c ../systemd-stable-253.4/src/shared/install.c In file included from ../systemd-stable-253.4/src/basic/macro.h:427, from ../systemd-stable-253.4/src/basic/alloc-util.h:10, from ../systemd-stable-253.4/src/shared/install.c:12: ../systemd-stable-253.4/src/shared/install.c: In function ‘install_changes_dump’: ../systemd-stable-253.4/src/shared/install.c:434:64: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 434 | err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../systemd-stable-253.4/src/basic/log.h:213:86: note: in definition of macro ‘log_full_errno_zerook’ 213 | ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \ | ^~~~~~~~~~~ ../systemd-stable-253.4/src/basic/log.h:253:41: note: in expansion of macro ‘log_full_errno’ 253 | #define log_error_errno(error, ...) log_full_errno(LOG_ERR, error, __VA_ARGS__) | ^~~~~~~~~~~~~~ ../systemd-stable-253.4/src/shared/install.c:434:31: note: in expansion of macro ‘log_error_errno’ 434 | err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.", | ^~~~~~~~~~~~~~~ ../systemd-stable-253.4/src/shared/install.c:434:75: note: format string is defined here 434 | err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.", | ^~ ../systemd-stable-253.4/src/shared/install.c:393:55: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 393 | "Failed to %s unit, file \"%s\" already exists.", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../systemd-stable-253.4/src/basic/log.h:213:86: note: in definition of macro ‘log_full_errno_zerook’ 213 | ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \ | ^~~~~~~~~~~ ../systemd-stable-253.4/src/basic/log.h:253:41: note: in expansion of macro ‘log_full_errno’ 253 | #define log_error_errno(error, ...) log_full_errno(LOG_ERR, error, __VA_ARGS__) | ^~~~~~~~~~~~~~ [...]
Interesting, this problem does not occur in my qemu-user emerge -pqv sys-apps/systemd gcc [ebuild R ] sys-devel/gcc-13.1.0-r1 USE="(cxx) fortran nls nptl openmp (pie) sanitize ssp (-ada) (-cet) (-custom-cflags) -d -debug -default-stack-clash-protection -default-znow -doc (-fixed-point) -go -graphite -hardened (-ieee-long-double) -jit (-libssp) -lto -modula2 (-multilib) -objc -objc++ -objc-gc (-pch) -pgo -systemtap -test (-valgrind) -vanilla (-vtv) -zstd" [ebuild R ] sys-apps/systemd-253.4 USE="acl dns-over-tls gcrypt kmod lz4 openssl pam pcre policykit resolvconf seccomp (split-usr) sysv-utils zstd (-apparmor) -audit -cgroup-hybrid -cryptsetup -curl -elfutils -fido2 (-gnuefi) -gnutls -homed -http -idn -importd -iptables -lzma -pkcs11 -pwquality -qrcode (-selinux) -test -tpm -vanilla -xkb" But I found some issues related to this problem, https://github.com/systemd/systemd/issues/26118, https://github.com/systemd/systemd/issues/26263, maybe you try compiling systemd with -O2?
I just tried compiling it with -O2 as suggested and that works. It emerges ins installs cleanly.