package/systemd: now needs target and host gcc >= 8
PATCH 1/1 package/systemd: now needs target and host gcc >= 8
Since the bump of systemd from 254.13 to 256.4, systemd no longer builds with gcc <= 7:
../src/basic/mountpoint-util.c: In function ‘fstype_is_api_vfs’:../src/basic/macro.h:385:79: error: expected ‘}’ before ‘__VA_OPT__’
for (typeof(entry) _va_sentinel_[1] = {}, _entries_[] = { __VA_ARGS__ __VA_OPT__(,) _va_sentinel_[0] }, *_current_ = _entries_; \
^This first error is due to upstream commit dc571cccd75db7be49b2aada64baf92e3a498c39 ("macro: terminate the temporary VA_ARGS_FOREACH() array with a sentinel"), which was made to support GCC 14.x. If we revert this commit, then this particular issue goes away with GCC 7.x, but then it fails with another fairly similar issue elsewhere:
../src/shared/varlink-idl.h:110:41: error: implicit declaration of function ‘__VA_OPT__’; did you mean ‘__TA_IBIT__’? [-Werror=implicit-function-dec laration]
.fields = { __VA_ARGS__ __VA_OPT__(,) {}}, \
^This code was added by upstream commit e50b2a93d66eff9b41999d38b8ed5eb647e2d74c ("varlink: add IDL/introspection logic").
Upstream commit dc571cccd75db7be49b2aada64baf92e3a498c39 first appeared in v256, while e50b2a93d66eff9b41999d38b8ed5eb647e2d74c first appeared in v255.
Considering systemd usual policies with the support of "old" things, it's fairly unlikely that they will care about building with older gcc versions. They even document in
https://github.com/systemd/systemd/blob/main/README that they need gcc
Quoted 1 line
= 8.4, so let's follow that.
Fixes:
http://autobuild.buildroot.net/results/53c1a79c391e3cc7c230017853ba935202c8d20d/
--- package/systemd/Config.in | 4 ++-- package/systemd/Config.in.host | 2 +- system/Config.in | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-)
package/systemd/Config.in +2 -2
@@ -23,8 +23,8 @@ menuconfig BR2_PACKAGE_SYSTEMD depends on BR2_TOOLCHAIN_USES_GLIBC depends on BR2_TOOLCHAIN_HAS_SSP depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 - depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 - depends on BR2_HOST_GCC_AT_LEAST_5 # host-systemd + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 + depends on BR2_HOST_GCC_AT_LEAST_8 # host-systemd select BR2_PACKAGE_HAS_UDEV select BR2_PACKAGE_DBUS if !BR2_PACKAGE_DBUS_BROKER # runtime select BR2_PACKAGE_LIBCAP
package/systemd/Config.in.host +1 -1
@@ -1,4 +1,4 @@ # Select this if you need host systemd tools (e.g. systemctl) config BR2_PACKAGE_HOST_SYSTEMD bool - depends on BR2_HOST_GCC_AT_LEAST_5 + depends on BR2_HOST_GCC_AT_LEAST_8
system/Config.in +5 -5
@@ -126,20 +126,20 @@ config BR2_INIT_SYSTEMD depends on BR2_TOOLCHAIN_HAS_SSP depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 - depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 - depends on BR2_HOST_GCC_AT_LEAST_5 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 + depends on BR2_HOST_GCC_AT_LEAST_8 select BR2_ROOTFS_MERGED_USR select BR2_PACKAGE_SYSTEMD select BR2_PACKAGE_SKELETON_INIT_SYSTEMD if BR2_ROOTFS_SKELETON_DEFAULT -comment "systemd needs a glibc toolchain w/ SSP, headers >= 3.15, host and target gcc >= 5" +comment "systemd needs a glibc toolchain w/ SSP, headers >= 3.15, host and target gcc >= 8" depends on BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS depends on BR2_USE_MMU depends on !BR2_TOOLCHAIN_USES_GLIBC || \ !BR2_TOOLCHAIN_HAS_SSP || \ !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 || \ - !BR2_TOOLCHAIN_GCC_AT_LEAST_5 || \ - !BR2_HOST_GCC_AT_LEAST_5 + !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || \ + !BR2_HOST_GCC_AT_LEAST_8 comment "systemd highly recommends Linux >= 4.15" depends on BR2_INIT_SYSTEMD
Signature · 6 lines
2.46.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedThomas, All,
On 2024-08-20 00:04 +0200, Thomas Petazzoni spake thusly:
Quoted 32 lines
Since the bump of systemd from 254.13 to 256.4, systemd no longer builds with gcc <= 7:
../src/basic/mountpoint-util.c: In function ‘fstype_is_api_vfs’:../src/basic/macro.h:385:79: error: expected ‘}’ before ‘__VA_OPT__’for (typeof(entry) _va_sentinel_[1] = {}, _entries_[] = { __VA_ARGS__ __VA_OPT__(,) _va_sentinel_[0] }, *_current_ = _entries_; \ ^This first error is due to upstream commit
dc571cccd75db7be49b2aada64baf92e3a498c39("macro: terminate the temporaryVA_ARGS_FOREACH()array with a sentinel"), which was made to support GCC 14.x. If we revert this commit, then this particular issue goes away with GCC 7.x, but then it fails with another fairly similar issue elsewhere:
../src/shared/varlink-idl.h:110:41: error: implicit declaration of function ‘__VA_OPT__’; did you mean ‘__TA_IBIT__’? [-Werror=implicit-function-dec laration].fields = { __VA_ARGS__ __VA_OPT__(,) {}}, \ ^This code was added by upstream commit
e50b2a93d66eff9b41999d38b8ed5eb647e2d74c("varlink: add IDL/introspection logic").Upstream commit
dc571cccd75db7be49b2aada64baf92e3a498c39first appeared in v256, whilee50b2a93d66eff9b41999d38b8ed5eb647e2d74cfirst appeared in v255.Considering systemd usual policies with the support of "old" things, it's fairly unlikely that they will care about building with older gcc versions. They even document in
https://github.com/systemd/systemd/blob/main/README that they need gcc
Quoted 7 lines
Quoted 1 line
= 8.4, so let's follow that.
Fixes:
http://autobuild.buildroot.net/results/53c1a79c391e3cc7c230017853ba935202c8d20d/
Signed-off-by Thomas Petazzoni <[email protected]>
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 64 lines
--- package/systemd/Config.in | 4 ++-- package/systemd/Config.in.host | 2 +- system/Config.in | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-)package/systemd/Config.in +2
-2@@ -23,8 +23,8 @@ menuconfig BR2_PACKAGE_SYSTEMD depends on BR2_TOOLCHAIN_USES_GLIBC depends on BR2_TOOLCHAIN_HAS_SSP depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 - depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 - depends on BR2_HOST_GCC_AT_LEAST_5 # host-systemd + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 + depends on BR2_HOST_GCC_AT_LEAST_8 # host-systemd select BR2_PACKAGE_HAS_UDEV select BR2_PACKAGE_DBUS if !BR2_PACKAGE_DBUS_BROKER # runtime select BR2_PACKAGE_LIBCAPpackage/systemd/Config.in.host +1
-1@@ -1,4 +1,4 @@ # Select this if you need host systemd tools (e.g. systemctl) config BR2_PACKAGE_HOST_SYSTEMD bool - depends on BR2_HOST_GCC_AT_LEAST_5 + depends on BR2_HOST_GCC_AT_LEAST_8system/Config.in +5
-5@@ -126,20 +126,20 @@ config BR2_INIT_SYSTEMD depends on BR2_TOOLCHAIN_HAS_SSP depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 - depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 - depends on BR2_HOST_GCC_AT_LEAST_5 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 + depends on BR2_HOST_GCC_AT_LEAST_8 select BR2_ROOTFS_MERGED_USR select BR2_PACKAGE_SYSTEMD select BR2_PACKAGE_SKELETON_INIT_SYSTEMD if BR2_ROOTFS_SKELETON_DEFAULT -comment "systemd needs a glibc toolchain w/ SSP, headers >= 3.15, host and target gcc >= 5" +comment "systemd needs a glibc toolchain w/ SSP, headers >= 3.15, host and target gcc >= 8" depends on BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS depends on BR2_USE_MMU depends on !BR2_TOOLCHAIN_USES_GLIBC || \ !BR2_TOOLCHAIN_HAS_SSP || \ !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 || \ - !BR2_TOOLCHAIN_GCC_AT_LEAST_5 || \ - !BR2_HOST_GCC_AT_LEAST_5 + !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || \ + !BR2_HOST_GCC_AT_LEAST_8 comment "systemd highly recommends Linux >= 4.15" depends on BR2_INIT_SYSTEMDSignature · 1 line
2.46.0
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot