Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#4073 - make kernel_menuconfig fails at m4 1.4.18 in Ubuntu 21.10 because of SIGSTKSZ #9055

openwrt-bot opened this issue Oct 9, 2021 · 4 comments
flyspray release/21.02 toolchain


Copy link

@openwrt-bot openwrt-bot commented Oct 9, 2021


I'm attempting to build openwrt 21.02 from git for a Buffalo WZR-600DHP on x86_64 Ubuntu 21.10. make kernel_menuconfig failed, and after running it with increased verbosity I see:

gcc  -I.   -I/home/bgjenero/gitapps/openwrt/staging_dir/host/include   -O2 -I/home/bgjenero/gitapps/openwrt/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
      |                          ^~~~~~~~

That's a failure building m4 1.4.18. It is discussed at

The problem is that m4 is expecting SIGSTKSZ to be a compile time constant, but instead in
/usr/include/x86_64-linux-gnu/bits/sigstksz.h it is: # define SIGSTKSZ sysconf (_SC_SIGSTKSZ)

The m4 package in Ubuntu 21.10 is actually the same version, and the source package has a patch for this in at /debian/patches/04-fix-sigstksz.patch. I am attaching that patch here.

Copy link

@openwrt-bot openwrt-bot commented Jan 15, 2022


I get the same failure (using Fedora 35)

Ah, I get this only because I used a branch based on older code. master already has newer m4

@aparcar aparcar added release/21.02 toolchain labels Feb 22, 2022
Copy link

@detly detly commented Mar 17, 2022

I'm hitting this trying to compile older OpenWRT versions (18.06) on Ubuntu 21.10. Is there a simple workaround?

Copy link

@NumberOneGit NumberOneGit commented Mar 21, 2022

I think the workaround is to patch c-stack.c with the above patchfile.

Copy link

@detly detly commented Mar 23, 2022

Ah, I wasn't sure whether it was the host or OpenWRT that needed patching. I actually did something else and backported the current version of m4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
flyspray release/21.02 toolchain
None yet

No branches or pull requests

4 participants