* [Buildroot] systemd 245 build issues with the old codesourcery ARM 2014.05 toolchain
@ 2020-04-04 17:43 Romain Naour
2020-04-04 17:53 ` Yann E. MORIN
0 siblings, 1 reply; 4+ messages in thread
From: Romain Naour @ 2020-04-04 17:43 UTC (permalink / raw)
To: buildroot
Hello All,
Since the last systemd bump to version 245, all our systemd based tests are
failing to build:
https://gitlab.com/buildroot.org/buildroot/-/jobs/498144403
https://gitlab.com/buildroot.org/buildroot/-/jobs/498144405
https://gitlab.com/buildroot.org/buildroot/-/jobs/498144406
https://gitlab.com/buildroot.org/buildroot/-/jobs/498144408
https://gitlab.com/buildroot.org/buildroot/-/jobs/498144410
https://gitlab.com/buildroot.org/buildroot/-/jobs/498144412
This is due to the following build issue:
../src/shared/gpt.c:7:9: error: initializer element is not constant
{ GPT_ROOT_X86, "root-x86" },
Note that gpt.c is a new file introduced in the last release of systemd:
https://github.com/systemd/systemd/blob/v245/src/shared/gpt.c
Such issue would have trigged a lot of build issues on the autobuilders, but
that's not the case:
http://autobuild.buildroot.org/?reason=systemd-245
The build is failing only when the toolchain codesourcery ARM 2014.05 is used.
So, it's seems a toolchain issue.
I did a test with a toolchain using gcc 5.5.0 and the build is ok.
http://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi--glibc--stable-2017.05-toolchains-1-1.tar.bz2
While searching for "error: initializer element is not constant" message, I
noticed a note about gcc 5 change about "Initializing statics with compound
literals":
https://gcc.gnu.org/gcc-5/porting_to.html
I'm not sure it's worth the effort to patch and try to upstream a patch to
systemd for the sake of building systemd with such old compiler (gcc < 5.0).
We can instead update the testsuite to use the Bootlin toolchain 2017.05, but it
mean testing with an old toolchain that can't even be build with the current
version of Buildroot. Maybe the Bootlin 2018.11-1 toolchain would be more
suitable (gcc 7.x) or even better the upcoming 2020.02-2 toolchain ?
Thoughts ?
Best regards,
Romain
^ permalink raw reply [flat|nested] 4+ messages in thread* [Buildroot] systemd 245 build issues with the old codesourcery ARM 2014.05 toolchain
2020-04-04 17:43 [Buildroot] systemd 245 build issues with the old codesourcery ARM 2014.05 toolchain Romain Naour
@ 2020-04-04 17:53 ` Yann E. MORIN
2020-04-04 19:19 ` Romain Naour
0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2020-04-04 17:53 UTC (permalink / raw)
To: buildroot
Romain, All,
On 2020-04-04 19:43 +0200, Romain Naour spake thusly:
> Since the last systemd bump to version 245, all our systemd based tests are
> failing to build:
[--SNIP--]
> This is due to the following build issue:
> ../src/shared/gpt.c:7:9: error: initializer element is not constant
> { GPT_ROOT_X86, "root-x86" },
[--SNIP--]
> While searching for "error: initializer element is not constant" message, I
> noticed a note about gcc 5 change about "Initializing statics with compound
> literals":
>
> https://gcc.gnu.org/gcc-5/porting_to.html
>
> I'm not sure it's worth the effort to patch and try to upstream a patch to
> systemd for the sake of building systemd with such old compiler (gcc < 5.0).
What about this patch:
diff --git a/package/systemd/Config.in b/package/systemd/Config.in
index bd638477a0..1280d82902 100644
--- a/package/systemd/Config.in
+++ b/package/systemd/Config.in
@@ -19,6 +19,7 @@ menuconfig BR2_PACKAGE_SYSTEMD
depends on !BR2_STATIC_LIBS # kmod
depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
depends on BR2_USE_MMU # dbus
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
select BR2_PACKAGE_HAS_UDEV
select BR2_PACKAGE_DBUS # runtime dependency only
select BR2_PACKAGE_LIBCAP
diff --git a/system/Config.in b/system/Config.in
index c8c5be40e0..8c1d47f13f 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -121,6 +121,7 @@ config BR2_INIT_SYSTEMD
depends on BR2_USE_MMU
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
select BR2_ROOTFS_MERGED_USR
select BR2_PACKAGE_SYSTEMD
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 4+ messages in thread* [Buildroot] systemd 245 build issues with the old codesourcery ARM 2014.05 toolchain
2020-04-04 17:53 ` Yann E. MORIN
@ 2020-04-04 19:19 ` Romain Naour
2020-04-05 7:06 ` Yann E. MORIN
0 siblings, 1 reply; 4+ messages in thread
From: Romain Naour @ 2020-04-04 19:19 UTC (permalink / raw)
To: buildroot
Hi Yann, All,
Le 04/04/2020 ? 19:53, Yann E. MORIN a ?crit?:
> Romain, All,
>
> On 2020-04-04 19:43 +0200, Romain Naour spake thusly:
>> Since the last systemd bump to version 245, all our systemd based tests are
>> failing to build:
> [--SNIP--]
>> This is due to the following build issue:
>> ../src/shared/gpt.c:7:9: error: initializer element is not constant
>> { GPT_ROOT_X86, "root-x86" },
> [--SNIP--]
>> While searching for "error: initializer element is not constant" message, I
>> noticed a note about gcc 5 change about "Initializing statics with compound
>> literals":
>>
>> https://gcc.gnu.org/gcc-5/porting_to.html
>>
>> I'm not sure it's worth the effort to patch and try to upstream a patch to
>> systemd for the sake of building systemd with such old compiler (gcc < 5.0).
>
> What about this patch:
>
> diff --git a/package/systemd/Config.in b/package/systemd/Config.in
> index bd638477a0..1280d82902 100644
> --- a/package/systemd/Config.in
> +++ b/package/systemd/Config.in
> @@ -19,6 +19,7 @@ menuconfig BR2_PACKAGE_SYSTEMD
> depends on !BR2_STATIC_LIBS # kmod
> depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
> depends on BR2_USE_MMU # dbus
> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
> select BR2_PACKAGE_HAS_UDEV
> select BR2_PACKAGE_DBUS # runtime dependency only
> select BR2_PACKAGE_LIBCAP
> diff --git a/system/Config.in b/system/Config.in
> index c8c5be40e0..8c1d47f13f 100644
> --- a/system/Config.in
> +++ b/system/Config.in
> @@ -121,6 +121,7 @@ config BR2_INIT_SYSTEMD
> depends on BR2_USE_MMU
> depends on !BR2_STATIC_LIBS
> depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
> select BR2_ROOTFS_MERGED_USR
> select BR2_PACKAGE_SYSTEMD
I would restrict to BR2_TOOLCHAIN_GCC_AT_LEAST_5.
But then, we have to update InitSystemSystemdBase to use another toolchain since
the codesourcery ARM 2014.05 will not be usable.
I can provide patches if every one is ok to use a bootlin toolchain 2017.05 or
later :)
Best regards,
Romain
>
>
> Regards,
> Yann E. MORIN.
>
^ permalink raw reply [flat|nested] 4+ messages in thread* [Buildroot] systemd 245 build issues with the old codesourcery ARM 2014.05 toolchain
2020-04-04 19:19 ` Romain Naour
@ 2020-04-05 7:06 ` Yann E. MORIN
0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2020-04-05 7:06 UTC (permalink / raw)
To: buildroot
Romain, All,
On 2020-04-04 21:19 +0200, Romain Naour spake thusly:
> Le 04/04/2020 ? 19:53, Yann E. MORIN a ?crit?:
> > On 2020-04-04 19:43 +0200, Romain Naour spake thusly:
> >> Since the last systemd bump to version 245, all our systemd based tests are
> >> failing to build:
> > [--SNIP--]
> >> This is due to the following build issue:
> >> ../src/shared/gpt.c:7:9: error: initializer element is not constant
> >> { GPT_ROOT_X86, "root-x86" },
> > [--SNIP--]
> >> While searching for "error: initializer element is not constant" message, I
> >> noticed a note about gcc 5 change about "Initializing statics with compound
> >> literals":
> >>
> >> https://gcc.gnu.org/gcc-5/porting_to.html
> >>
> >> I'm not sure it's worth the effort to patch and try to upstream a patch to
> >> systemd for the sake of building systemd with such old compiler (gcc < 5.0).
> >
> > What about this patch:
> >
> > diff --git a/package/systemd/Config.in b/package/systemd/Config.in
> > index bd638477a0..1280d82902 100644
> > --- a/package/systemd/Config.in
> > +++ b/package/systemd/Config.in
> > @@ -19,6 +19,7 @@ menuconfig BR2_PACKAGE_SYSTEMD
> > depends on !BR2_STATIC_LIBS # kmod
> > depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
> > depends on BR2_USE_MMU # dbus
> > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
> > select BR2_PACKAGE_HAS_UDEV
> > select BR2_PACKAGE_DBUS # runtime dependency only
> > select BR2_PACKAGE_LIBCAP
> > diff --git a/system/Config.in b/system/Config.in
> > index c8c5be40e0..8c1d47f13f 100644
> > --- a/system/Config.in
> > +++ b/system/Config.in
> > @@ -121,6 +121,7 @@ config BR2_INIT_SYSTEMD
> > depends on BR2_USE_MMU
> > depends on !BR2_STATIC_LIBS
> > depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
> > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
> > select BR2_ROOTFS_MERGED_USR
> > select BR2_PACKAGE_SYSTEMD
>
> I would restrict to BR2_TOOLCHAIN_GCC_AT_LEAST_5.
Yes, I just copy-pasted the first hit I found on GCC_AT_LEAST and forgot
to fix it to 5.
> But then, we have to update InitSystemSystemdBase to use another toolchain since
> the codesourcery ARM 2014.05 will not be usable.
Sure.
Regards,
Yann E. MORIN.
> I can provide patches if every one is ok to use a bootlin toolchain 2017.05 or
> later :)
>
> Best regards,
> Romain
>
>
> >
> >
> > Regards,
> > Yann E. MORIN.
> >
>
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-05 7:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-04 17:43 [Buildroot] systemd 245 build issues with the old codesourcery ARM 2014.05 toolchain Romain Naour
2020-04-04 17:53 ` Yann E. MORIN
2020-04-04 19:19 ` Romain Naour
2020-04-05 7:06 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox