Skip to content
Advertisement

NTP 4.2.8p15 fails build with glibc 2.34: error: missing binary operator before token “(“

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:

To fix this build issue, apply the patch in link to NTP.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement