Bug 13721 - c-stack.c:55:26: error: missing binary operator before token "("
Summary: c-stack.c:55:26: error: missing binary operator before token "("
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-03 20:54 UTC by stsp
Modified: 2021-04-19 20:31 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
Patch (5.09 KB, patch)
2021-04-11 17:43 UTC, Fabrice Fontaine
Details
Second iteration (5.24 KB, patch)
2021-04-11 17:51 UTC, Fabrice Fontaine
Details
The patch that I googled (2.34 KB, patch)
2021-04-11 21:50 UTC, stsp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stsp 2021-04-03 20:54:04 UTC
Tried to compile buildroot from git:
$ make pc_x86_64_efi_defconfig
$ make -j 9

>>> host-m4 1.4.18 Building
PATH="/home/stas/src/fdpp/buildroot/output/host/bin:/home/stas/src/fdpp/buildroot/output/host/sbin:/home/stas/.local/bin:/home/stas/.local/bin:/home/stas/.local/bin:/usr/lib64/qt-3.3/bin:/usr/share/Modules/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/stas/bin" PKG_CONFIG="/home/stas/src/fdpp/buildroot/output/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/stas/src/fdpp/buildroot/output/host/lib/pkgconfig:/home/stas/src/fdpp/buildroot/output/host/share/pkgconfig"  /usr/bin/make -j9  -C /home/stas/src/fdpp/buildroot/output/build/host-m4-1.4.18/
/usr/bin/make  all-recursive
Making all in .
make[4]: Nothing to be done for 'all-am'.
Making all in examples
make[4]: Nothing to be done for 'all'.
Making all in lib
/usr/bin/make  all-am
  CC       c-stack.o
  CC       execute.o
  CC       fd-safer-flag.o
  CC       fatal-signal.o
  CC       exitfail.o
  CC       fd-hook.o
  CC       filenamecat.o
  CC       stripslash.o
  CC       dup-safer-flag.o
  CC       filenamecat-lgpl.o
In file included from /usr/include/signal.h:315,
                 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
      |                          ^~~~~~~~
c-stack.c:134:8: error: variably modified 'buffer' at file scope
  134 |   char buffer[SIGSTKSZ];
Comment 1 Fabrice Fontaine 2021-04-11 17:43:54 UTC
Created attachment 8886 [details]
Patch
Comment 2 Fabrice Fontaine 2021-04-11 17:44:44 UTC
This is a known issue with m4/gnulib and glibc 2.34, can you confirm that attached patch is fixing your issue?
Comment 3 Fabrice Fontaine 2021-04-11 17:50:37 UTC
This second iteration should be better.
Comment 4 Fabrice Fontaine 2021-04-11 17:51:15 UTC
Created attachment 8891 [details]
Second iteration
Comment 5 stsp 2021-04-11 21:50:16 UTC
Created attachment 8896 [details]
The patch that I googled

Hi.

Your patch doesn't work as-is
(or at least I don't know how),
but after I extracted
0003-c-stack-stop-using-SIGSTKSZ.patch
out of it, it worked.
Your original patch only creates
another patch file, maybe that's
on purpose, I just don't know how
to utilize it in that form.

In any case, I already googled out
another patch, which I now attach
here.
Pleas let me know which one is
"better".
Comment 6 stsp 2021-04-14 17:23:13 UTC
OK, I realized that your patch is
against buildroot as a whole, whereas
I put the patches to BR2_EXTERNAL, on
a per-package basis.
Comment 7 Fabrice Fontaine 2021-04-14 21:52:53 UTC
Ok thanks for your feedback.
We could use the patch that you googled but you'll have to provide some link to allow me to find the author as we can't add a patch that don't have a "Signed-off-by" to buildroot (due to license concerns)
Otherwise, if my patch also is working fine, I can submit it on the mailing list, and hopefully it should be merged.