Bug 1984800 - stress-ng: FTBFS due to dynamic PTHREAD_STACK_MIN (glibc 2.34 related) - rebase
Summary: stress-ng: FTBFS due to dynamic PTHREAD_STACK_MIN (glibc 2.34 related) - rebase
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: stress-ng
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: John Kacur
QA Contact: Mark Simmons
URL:
Whiteboard:
Depends On: 1984799
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-22 09:28 UTC by Florian Weimer
Modified: 2021-08-24 15:08 UTC (History)
6 users (show)

Fixed In Version: stress-ng-0.13.00-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ColinIanKing stress-ng issues 136 0 None closed stress-pthread.c fails to compile with recent glibc versions 2021-07-22 09:28:21 UTC

Description Florian Weimer 2021-07-22 09:28:21 UTC
Quoting Carlos from the upstream ticket:

“
Upstream glibc 2.34 will release with a non-constant value of PTHREAD_STACK_MIN. This is because hardware vendors like Intel and Arm want to have scalable vector extensions whose size can no longer be determined at compile time. The minimum thread stack size in almost all cases has been really too small. By switching to sysconf we can directly pipe the kernel's expected minimum stack size to the process. This will need to be fixed in stress-ng. If you need help writing the change please reach out!
”

The error looks like this:

CC stress-pthread.c
In file included from /usr/include/bits/local_lim.h:81,
                 from /usr/include/bits/posix1_lim.h:161,
                 from /usr/include/dirent.h:233,
                 from stress-ng.h:50,
                 from stress-pthread.c:25:
stress-pthread.c: In function 'stress_pthread':
stress-pthread.c:403:26: error: missing binary operator before token "("
  403 | #if DEFAULT_STACK_MIN == PTHREAD_STACK_MIN
      |                          ^~~~~~~~~~~~~~~~~
In file included from stress-pthread.c:25:
stress-ng.h:844:35: warning: comparison of integer expressions of different signedness: 'long long unsigned int' and 'long int' [-Wsign-compare]
  844 | #define STRESS_MAXIMUM(a,b) (((a) > (b)) ? (a) : (b))
      |                                   ^
stress-pthread.c:406:35: note: in expansion of macro 'STRESS_MAXIMUM'
  406 |         const size_t stack_size = STRESS_MAXIMUM(DEFAULT_STACK_MIN, PTHREAD_STACK_MIN);
      |                                   ^~~~~~~~~~~~~~
stress-ng.h:844:50: warning: operand of '?:' changes signedness from 'long int' to 'long long unsigned int' due to unsignedness of other operand [-Wsign-compare]
  844 | #define STRESS_MAXIMUM(a,b) (((a) > (b)) ? (a) : (b))
      |                                                  ^~~
stress-pthread.c:406:35: note: in expansion of macro 'STRESS_MAXIMUM'
  406 |         const size_t stack_size = STRESS_MAXIMUM(DEFAULT_STACK_MIN, PTHREAD_STACK_MIN);
      |                                   ^~~~~~~~~~~~~~
make[1]: *** [Makefile:372: stress-pthread.o] Error 1


Note You need to log in before you can comment on or make changes to this bug.