I am building NTP 4.2.8p15 with glibc 2.34. The build fails with error:
In file included from /usr/include/pthread.h:33, from work_thread.c:13: work_thread.c:45:57: error: missing binary operator before token "(" 45 | #if defined(PTHREAD_STACK_MIN) && THREAD_MINSTACKSIZE < PTHREAD_STACK_MIN | ^~~~~~~~~~~~~~~~~
Advertisement
Answer
The problem is answered here: https://bugs.archlinux.org/task/74690
Since glibc 2.34 PTHREAD_STACK_MIN is no longer a compile time constant so can not be used in preprocessor comparisons which causes the compilation failure [1]. The fix attached to the upstream bug report [2] resolves the issue.
Additional info:
- ntp 4.2.8.p15-1
- https://bugs.ntp.org/show_bug.cgi?id=3741
[1] ntp-4.2.8.p15-1-x86_64-build.log.xz [2] https://bugs.ntp.org/attachment.cgi?id=1814
To fix this build issue, apply the patch in link to NTP.