[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison 3.7.1 failing to build on Centos 7: verify_NSIG_constraint
From: |
Paul Smith |
Subject: |
Re: bison 3.7.1 failing to build on Centos 7: verify_NSIG_constraint |
Date: |
Sun, 02 Aug 2020 18:58:11 -0400 |
User-agent: |
Evolution 3.36.3-0ubuntu1 |
On Sun, 2020-08-02 at 17:54 -0400, Paul Smith wrote:
> The latest Bison release 3.7.1 is not compiling for me, and it
> appears to be a gnulib issue.
>
> Here's the failure:
>
> gcc -DEXEEXT=\"\" -I. -I./lib -Ibison-3.7.1 -Ibison-3.7.1/lib \
> -DDEFAULT_TEXT_DOMAIN=\"bison-gnulib\" -march=nehalem -mtune=intel \
> -ffile-prefix-map=bison-3.7.1/= -O2 -fPIC -static-libgcc \
> -MT lib/libbison_a-quotearg.o -MD -MP \
> -MF lib/.deps/libbison_a-quotearg.Tpo -c -olib/libbison_a-quotearg.o \
> `test -f 'lib/quotearg.c' || echo 'bison-3.7.1/'`lib/quotearg.c
> In file included from /usr/include/sys/param.h:28,
> from bison-3.7.1/lib/minmax.h:34,
> from bison-3.7.1/lib/quotearg.c:33:
> ./lib/signal.h:682:13: error: size of array 'verify_NSIG_constraint' is
> negative
> 682 | typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1];
> | ^~~~~~~~~~~~~~~~~~~~~~
> make[2]: *** [Makefile:5457: lib/libbison_a-quotearg.o] Error 1
Further investigation shows that the problem is that
HAVE_POSIX_SIGNALBLOCKING is set to 0 in the broken build.
It appears that the issue is related to some cached autoconf output
(yes, I know caching is not good and causes problems, but the
performance difference is so noticeable it's hard to ignore... and it
usually works).
If I check the autoconf cache I see that there are two variables to set
*_cv_func_sigprocmask: one is set to "yes" and one is set to "1":
ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes}
...
gl_cv_func_sigprocmask=${gl_cv_func_sigprocmask=1}
If I compare the configure output from a run with using the cache
(fails) with one that doesn't use the cache (succeeds) the only
difference of interest is:
@@ -378,7 +379,7 @@
checking whether program_invocation_name is declared... yes
checking whether program_invocation_short_name is declared... yes
checking for raise... yes
-checking for sigprocmask... 1
+checking for sigprocmask... yes
checking for readline... yes
checking how to link with libreadline... -lreadline
checking for readline/readline.h... yes
@@ -398,7 +399,7 @@
checking for sighandler_t... yes
checking for signbit macro... yes
checking for signbit compiler built-ins... yes
-checking for sigprocmask... 1
+checking for sigprocmask... yes
checking for stdint.h... yes
checking for SIZE_MAX... yes
checking for snprintf... yes
My suspicion is that if one of those values is obtained from the cache
rather than being computed, then some side-effect of the check is not
happening and this is causing the wrong result.
I will disable autoconf caching but it would be great if this issue
could be addressed... I will keep the build artifacts around if people
need more details etc.
Cheers!