Ubuntu 21.10 fails to compile OpenWrt 21.02 hosts tools (m4)

Hannu Nyman hannu.nyman at iki.fi
Mon Oct 18 07:54:38 PDT 2021

I updated my buildhost to Ubuntu 21.10 and noticed that while it compiles 
master ok, the OpenWrt 21.02 build fails already at the tools build stage.

m4 is the failing tool.  Error log below.

I noticed that Rosen has recently updated m4 in master to 1.4.19, so I tested 
cherry-picking the 1.4.19 version update to openwrt-21.02, and it helps. m4 
again compiles  ;-)

Apparently the m4 version 1.4.19 in master contains some fixes for host gcc 
11, or something similar?

make[6]: Entering directory '/Openwrt/r7800-2102/build_dir/host/m4-1.4.18/lib'
depbase=`echo gl_avltree_oset.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc  -I.   -I/Openwrt/r7800-2102/staging_dir/host/include   -O2 
-I/Openwrt/r7800-2102/staging_dir/host/include  -MT gl_avltree_oset.o -MD -MP 
-MF $depbase.Tpo -c -o gl_avltree_oset.o gl_avltree_oset.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo binary-io.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc  -I.   -I/Openwrt/r7800-2102/staging_dir/host/include   -O2 
-I/Openwrt/r7800-2102/staging_dir/host/include  -MT binary-io.o -MD -MP -MF 
$depbase.Tpo -c -o binary-io.o binary-io.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo c-ctype.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc  -I.   -I/Openwrt/r7800-2102/staging_dir/host/include   -O2 
-I/Openwrt/r7800-2102/staging_dir/host/include  -MT c-ctype.o -MD -MP -MF 
$depbase.Tpo -c -o c-ctype.o c-ctype.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo c-stack.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc  -I.   -I/Openwrt/r7800-2102/staging_dir/host/include   -O2 
-I/Openwrt/r7800-2102/staging_dir/host/include  -MT c-stack.o -MD -MP -MF 
$depbase.Tpo -c -o c-stack.o c-stack.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from /usr/include/signal.h:328,
                  from ./signal.h:52,
                  from c-stack.c:49:
c-stack.c:55:26: error: missing binary operator before token "("
    55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
       |                          ^~~~~~~~
make[6]: *** [Makefile:1910: c-stack.o] Error 1
make[6]: Leaving directory '/Openwrt/r7800-2102/build_dir/host/m4-1.4.18/lib'
make[5]: *** [Makefile:1674: all] Error 2

More information about the openwrt-devel mailing list