Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 709732

Summary: =sys-devel/bison-3.5.2 fails to compile with many threads (like -j25)
Product: Gentoo Linux Reporter: Vadim A. Misbakh-Soloviov (mva) <mva>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED OBSOLETE    
Severity: normal CC: daggs, mattst88, polynomial-c, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2020-02-15 14:17:42 UTC
Hi there!
When I tried to upgrade to bison-3.5.2 on my home server (2x12cores opterons), it was constantly failed on the same place (see attached build log).

I tried to change compilers (gcc/clang), enable/disable ccache with no effect.

But when I changed MAKEOPTS from `-j25 -s -l2` to `-j5`, it installed just fine.

My guess is that this happens because of following (upstream?) bug: `lib/hard-locale.{c,h}` uses `SETLOCALE_NULL_MAX`, but have no direct `#include` of `setlocale_null.h`, which contains its definition.

Looks like it inherits from other place wher eit is included during low-threaded parallel builld, but with high-threaded parallel build, it builds faster and getting the target (that triggers that failure) "too fast".

Reproducible: Always
Comment 1 Matt Turner gentoo-dev 2020-03-09 02:31:02 UTC
I can reproduce the failure:

lib/hard-locale.c: In function 'hard_locale':
lib/hard-locale.c:29:15: error: 'SETLOCALE_NULL_MAX' undeclared (first use in this function); did you mean 'SETLOCALE_NULL_ALL_MTSAFE'?
   29 |   char locale[SETLOCALE_NULL_MAX];
      |               ^~~~~~~~~~~~~~~~~~
      |               SETLOCALE_NULL_ALL_MTSAFE
lib/hard-locale.c:29:15: note: each undeclared identifier is reported only once for each function it appears in
lib/hard-locale.c:31:7: warning: implicit declaration of function 'setlocale_null_r' [-Wimplicit-function-declaration]
   31 |   if (setlocale_null_r (category, locale, sizeof (locale)))
      |       ^~~~~~~~~~~~~~~~


It looks like gnulib's hard-locale.c is not including setlocale_null.h. Looks like it's supposed to be included through locale.h?
Comment 2 Benda Xu gentoo-dev 2020-07-04 00:27:31 UTC
I have reproduced this issue on arm64.
Comment 3 DaggyStyle 2020-10-27 09:46:33 UTC
is there any intention to fix bug?
I'm getting it with stable version...
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2020-10-27 10:34:28 UTC
No. It's fixed in newer versions (>3.7) and we will not backport the fix.