[Buildroot] host-m4 build on Fedora 42 fails

Joseph Zikusooka josephzik at gmail.com
Sat Apr 19 16:56:42 UTC 2025


Hi Julien,

Thanks for the info and the workaround tip!

I updated my patch to use CFLAGS="$(HOST_CFLAGS) -std=gnu17" like you
suggested, but the build still fails with GCC 15 and m4 1.4.19 - same
errors as before. Strangely, if I build m4 outside the buildroot
environment with those flags, it works fine.

Any idea what else could be causing the workaround to fail in buildroot?
Are there other flags or tweaks I could try in m4.mk until the new m4
release is out?

Regards,
Joseph Zikusooka (ZIK)

On Sat, Apr 19, 2025, 3:29 PM Julien Olivain <ju.o at free.fr> wrote:

> Hi Joseph,
>
> Thanks for reporting the issue.
>
> On 18/04/2025 16:14, Joseph Zikusooka wrote:
> > Recently upgraded to Fedora 42 and since then I am unable to compile
> > buildroot.  Make fails at the host-m4 package.
> > I looked up several sources and found this:
> > https://lists.gnu.org/archive/html/m4-discuss/2025-02/msg00000.html
> >
> > The work around on Fedora 42 was to build m4 with the environment
> > flags as follows:
> > CFLAGS='-std=gnu17' ./configure && make
> >
> > I tried to patch m4.mk as follows, but the build is still failing.  Any
> > ideas?
> >
> > --- a/m4.mk     2025-04-18 17:02:01.174923317 +0300
> > +++ b/m4.mk     2025-04-18 17:03:29.285694673 +0300
> > @@ -10,4 +10,7 @@
> >  M4_LICENSE = GPL-3.0+
> >  M4_LICENSE_FILES = COPYING
> >
> > +M4_CONF_ENV = CFLAGS="-std=gnu17"
> > +M4_MAKE_ENV = CFLAGS="-std=gnu17"
> > +
>
> To workaround this gcc15 issue with the current m4
> version 1.4.19, you should probably pass the CFLAGS as:
>
> HOST_M4_CONF_ENV = CFLAGS="$(HOST_CFLAGS) -std=gnu17"
>
> Also, there is an upcoming m4 release which will fix
> this gcc 15 issue. See:
>
> https://git.savannah.gnu.org/cgit/m4.git/commit/?h=branch-1.4&id=a22c9802dd7e724eaefb21dc21d84ac2d3a49c89
>
> More specifically:
> "
> ** Update to comply with newer C standards, and inherit portability
>     improvements from gnulib.
> "
>
> If this new m4 release is not published in the coming days/weeks
> please submit an updated version of this patch to fix this issue.
> Please also add a comment that this CFLAGS modification is needed
> for m4-1.4.19 and host-gcc15 and should be removed in the next
> bump to 1.4.20.
>
> Best regards,
>
> Julien.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildroot.org/pipermail/buildroot/attachments/20250419/5b4c6bca/attachment.htm>


More information about the buildroot mailing list