[Buildroot] host-m4 build on Fedora 42 fails

Julien Olivain ju.o at free.fr
Sat Apr 19 12:29:18 UTC 2025


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.


More information about the buildroot mailing list