boostorg / thread

Boost.org thread module
http://boost.org/libs/thread
202 stars 163 forks source link

"Missing Binary Operator Before Token "C" " #364

Open hilga007 opened 2 years ago

hilga007 commented 2 years ago

Another user on Ubuntu 20.04 who is experiencing this issue with gcc 10.x, I'm on Ubuntu 22.04 with gcc 11.2.0. (Quoting the original issue which is from 2019 and has been closed; where someone had an issue on Solaris)

My specific issue (Identical to original)

./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "("
   60 | #if PTHREAD_STACK_MIN > 0
      |     ^~~~~~~~~~~~~~~~~

Still facing this issue. Is the issue closed? Ubuntu 20.04 and g++ --version = 10.3.0

Originally posted by @seerviashish in https://github.com/boostorg/thread/issues/283#issuecomment-1003548201

Related to Issue in KAPOWMINER: https://github.com/RavenCommunity/kawpowminer/issues/111

JcBernack commented 2 years ago

I have the same issue on Ubuntu 21.10 with Boost 1.70.0. Tried with GCC 11.2.0, 9.4.0 and 8.5.0, error stays the same.

I modified thread_data.hpp to echo the value of PTHREAD_STACK_MIN and it is __sysconf (75). If I add the following to that file it builds without a problem:

#undef PTHREAD_STACK_MIN
#define PTHREAD_STACK_MIN 16384

I have yet to try a newer version of Boost if anything was changed here.

EchterAgo commented 2 years ago

This is fixed by https://github.com/boostorg/thread/pull/297

esamet commented 1 year ago

I have the same issue on Ubuntu 21.10 with Boost 1.70.0. Tried with GCC 11.2.0, 9.4.0 and 8.5.0, error stays the same.

I modified thread_data.hpp to echo the value of PTHREAD_STACK_MIN and it is __sysconf (75). If I add the following to that file it builds without a problem:

#undef PTHREAD_STACK_MIN
#define PTHREAD_STACK_MIN 16384

I have yet to try a newer version of Boost if anything was changed here.

yes my problem also fixed with paste that command top of the if