| Summary: | sys-apps/systemd-245-r5 with sys-devel/gcc-10 and CFLAGS="-O3" - error: %s directive argument is null | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Helmut Jarausch <jarausch> |
| Component: | Current packages | Assignee: | Gentoo systemd Team <systemd> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ajak, alex.iris.parker, andre, calchan, carlphilippreh, che, copyer, jstein, nholland, yellowhat46 |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| See Also: | https://github.com/systemd/systemd/pull/15762 | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
I'm unable to reproduce this with gcc-10.1.0. (In reply to Mike Gilbert from comment #1) > I'm unable to reproduce this with gcc-10.1.0. This happens to me on all of my machines as well. As far as I can tell, you need -O3 to trigger the problem. Can you test that, please? Confirmed with -O3 locally. Same error with 245.5. Seems that a fix is available upstream: https://github.com/systemd/systemd/pull/15762 Not sure if it part of 245.5. (In reply to Vasco Gervasi from comment #5) > Seems that a fix is available upstream: > https://github.com/systemd/systemd/pull/15762 > > Not sure if it part of 245.5. Appears to only be in 246-rc1: systemd $ git tag --contains 9b10700 v246-rc1 *** Bug 733236 has been marked as a duplicate of this bug. *** Same problem here Let me add that 3 other ebuilds failed to compile with -O3 (gcc-10.2.0): - sys-process/audit - sys-apps/iproute2 - app-admin/logrotate I discovered this when recompiling my entire system (amd64 stable) after upgrading just gcc to the unstable 10.2.0 version (and recompiling libtool according to the wiki). The remaining almost 1,000 ebuilds compiled just fine. Not sure whether this belongs here but I hesitate to open multiple bugs for what may be one problem. Separate bugs for separate packages please. Closing this since it has been fixed in systemd-246. |
This is a bug (or sloppy programming) in systemd or the default compiler options are too strict for systemd [188/1291] x86_64-pc-linux-gnu-gcc -m32 -Isrc/core/2ac6ece@@core@sta -Isrc/core -I../systemd-245/src/core -Isrc/basic -I../systemd-245/src/basic -Isrc/boot -I../systemd-245/src/boot -Isrc/shared -I../systemd-245/src/shared -Isrc/systemd -I../systemd-245/src/systemd -Isrc/journal -I../systemd-245/src/journal -Isrc/journal-remote -I../systemd-245/src/journal-remote -Isrc/nspawn -I../systemd-245/src/nspawn -Isrc/resolve -I../systemd-245/src/resolve -Isrc/timesync -I../systemd-245/src/timesync -I../systemd-245/src/time-wait-sync -Isrc/login -I../systemd-245/src/login -Isrc/udev -I../systemd-245/src/udev -Isrc/libudev -I../systemd-245/src/libudev -Isrc/shutdown -I../systemd-245/src/shutdown -I../systemd-245/src/libsystemd/sd-bus -I../systemd-245/src/libsystemd/sd-device -I../systemd-245/src/libsystemd/sd-event -I../systemd-245/src/libsystemd/sd-hwdb -I../systemd-245/src/libsystemd/sd-id128 -I../systemd-245/src/libsystemd/sd-netlink -I../systemd-245/src/libsystemd/sd-network -I../systemd-245/src/libsystemd/sd-resolve -Isrc/libsystemd-network -I../systemd-245/src/libsystemd-network -I. -I../systemd-245/ -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu99 -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness -Werror=undef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wimplicit-fallthrough=5 -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wno-error=nonnull -Wno-maybe-uninitialized -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -ffunction-sections -fdata-sections -Werror=shadow -include config.h -march=native -O3 -maes -mavx -mavx2 -mf16c -mfma -mmmx -mpclmul -mpopcnt -msse -msse2 -msse3 -msse4.1 -msse4.2 -msse4a -mssse3 -fPIC -pthread -MD -MQ 'src/core/2ac6ece@@core@sta/path.c.o' -MF 'src/core/2ac6ece@@core@sta/path.c.o.d' -o 'src/core/2ac6ece@@core@sta/path.c.o' -c ../systemd-245/src/core/path.c FAILED: src/core/2ac6ece@@core@sta/path.c.o x86_64-pc-linux-gnu-gcc -m32 -Isrc/core/2ac6ece@@core@sta -Isrc/core -I../systemd-245/src/core -Isrc/basic -I../systemd-245/src/basic -Isrc/boot -I../systemd-245/src/boot -Isrc/shared -I../systemd-245/src/shared -Isrc/systemd -I../systemd-245/src/systemd -Isrc/journal -I../systemd-245/src/journal -Isrc/journal-remote -I../systemd-245/src/journal-remote -Isrc/nspawn -I../systemd-245/src/nspawn -Isrc/resolve -I../systemd-245/src/resolve -Isrc/timesync -I../systemd-245/src/timesync -I../systemd-245/src/time-wait-sync -Isrc/login -I../systemd-245/src/login -Isrc/udev -I../systemd-245/src/udev -Isrc/libudev -I../systemd-245/src/libudev -Isrc/shutdown -I../systemd-245/src/shutdown -I../systemd-245/src/libsystemd/sd-bus -I../systemd-245/src/libsystemd/sd-device -I../systemd-245/src/libsystemd/sd-event -I../systemd-245/src/libsystemd/sd-hwdb -I../systemd-245/src/libsystemd/sd-id128 -I../systemd-245/src/libsystemd/sd-netlink -I../systemd-245/src/libsystemd/sd-network -I../systemd-245/src/libsystemd/sd-resolve -Isrc/libsystemd-network -I../systemd-245/src/libsystemd-network -I. -I../systemd-245/ -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu99 -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness -Werror=undef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wimplicit-fallthrough=5 -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wno-error=nonnull -Wno-maybe-uninitialized -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -ffunction-sections -fdata-sections -Werror=shadow -include config.h -march=native -O3 -maes -mavx -mavx2 -mf16c -mfma -mmmx -mpclmul -mpopcnt -msse -msse2 -msse3 -msse4.1 -msse4.2 -msse4a -mssse3 -fPIC -pthread -MD -MQ 'src/core/2ac6ece@@core@sta/path.c.o' -MF 'src/core/2ac6ece@@core@sta/path.c.o.d' -o 'src/core/2ac6ece@@core@sta/path.c.o' -c ../systemd-245/src/core/path.c ../systemd-245/src/core/path.c: In function ‘path_serialize’: ../systemd-245/src/core/path.c:616:24: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 616 | (void) serialize_item_format(f, "path-spec", "%s %i %s", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 617 | path_type_to_string(s->type), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 618 | s->previous_exists, | ~~~~~~~~~~~~~~~~~~~ 619 | s->path); | ~~~~~~~~ In file included from /usr/include/stdio.h:867, from ../systemd-245/src/systemd/sd-bus.h:22, from ../systemd-245/src/libsystemd/sd-bus/bus-error.h:6, from ../systemd-245/src/core/path.c:8: In function ‘fprintf’, inlined from ‘path_dump’ at ../systemd-245/src/core/path.c:226:9: /usr/include/bits/stdio2.h:100:10: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 100 | return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 101 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors