Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hilga007 opened this issue Jan 19, 2022 · 3 comments
Open

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

hilga007 opened this issue Jan 19, 2022 · 3 comments

Comments

@hilga007
Copy link

hilga007 commented Jan 19, 2022

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 #283 (comment)

Related to Issue in KAPOWMINER: RavenCommunity/kawpowminer#111

@JcBernack
Copy link

JcBernack commented Mar 4, 2022

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
Copy link

This is fixed by #297

ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this issue May 29, 2022
Summary
---

In glibc >= 2.34 `PTHREAD_STACK_MIN` has been made dynamic which causes
Boost 1.70 to fail to build.

This has been fixed in boostorg/thread#297 for
Solaris which also uses a function call for `PTHREAD_STACK_MIN`.

See:

* fabaff/nixpkgs@629e531
* boostorg/thread#364
* boostorg/thread#283

Test plan
---

* Use a build OS that includes glibc >= 3.34
* `cd depends`
* `make build-linux64`
KarolTrzeszczkowski pushed a commit to Ergon-moe/Bitcoin-Static that referenced this issue Jul 2, 2022
Summary
---

In glibc >= 2.34 `PTHREAD_STACK_MIN` has been made dynamic which causes
Boost 1.70 to fail to build.

This has been fixed in boostorg/thread#297 for
Solaris which also uses a function call for `PTHREAD_STACK_MIN`.

See:

* fabaff/nixpkgs@629e531
* boostorg/thread#364
* boostorg/thread#283

Test plan
---

* Use a build OS that includes glibc >= 3.34
* `cd depends`
* `make build-linux64`
igorsol added a commit to percona/percona-server-mongodb that referenced this issue Jul 15, 2022
igorsol added a commit to percona/percona-server-mongodb that referenced this issue Jul 15, 2022
sickpig pushed a commit to BitcoinUnlimited/BitcoinUnlimited that referenced this issue Apr 2, 2023
Summary
---

In glibc >= 2.34 `PTHREAD_STACK_MIN` has been made dynamic which causes
Boost 1.70 to fail to build.

This has been fixed in boostorg/thread#297 for
Solaris which also uses a function call for `PTHREAD_STACK_MIN`.

See:

* fabaff/nixpkgs@629e531
* boostorg/thread#364
* boostorg/thread#283

Test plan
---

* Use a build OS that includes glibc >= 3.34 (eg Ubuntu 22.04)
* `cd depends`
* `make HOST=x86_64-pc-linux-gnu`
Flamefire added a commit to Flamefire/s25client that referenced this issue Apr 10, 2023
There is a Boost bug (boostorg/thread#364) in
1.69 causing a build failure with GCC 12 related to `PTHREAD_STACK_MIN`.
This is fixed in Boost 1.73 but that cannot be used yet due to an active
warning, see boostorg/test#357
Flamefire added a commit to Flamefire/s25client that referenced this issue Apr 10, 2023
There is a Boost bug (boostorg/thread#364) in
1.69 causing a build failure with GCC 12 related to `PTHREAD_STACK_MIN`.
This is fixed in Boost 1.73 but that triggers a warning in GCC12: boostorg/test#357
Hence use GCC 11 and Boost 1.73
Flamefire added a commit to Flamefire/s25client that referenced this issue Apr 10, 2023
There is a Boost bug (boostorg/thread#364) in
1.69 causing a build failure with GCC 12 related to `PTHREAD_STACK_MIN`.
This is fixed in Boost 1.73 but that triggers a warning in GCC12: boostorg/test#357
Hence use GCC 11 and Boost 1.73
Flamefire added a commit to Flamefire/s25client that referenced this issue Apr 10, 2023
There is a Boost bug (boostorg/thread#364) in
1.69 causing a build failure with GCC 12 related to `PTHREAD_STACK_MIN`.
This is fixed in Boost 1.73 but that triggers a warning in GCC12: boostorg/test#357
Hence use GCC 11 and Boost 1.73
Flamefire added a commit to Flamefire/s25client that referenced this issue Apr 12, 2023
There is a Boost bug (boostorg/thread#364) in
1.69 causing a build failure with GCC 12 related to `PTHREAD_STACK_MIN`.
This is fixed in Boost 1.73 but that triggers a warning in GCC12: boostorg/test#357
Hence use GCC 11 and Boost 1.73
@esamet
Copy link

esamet commented Jul 19, 2023

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

melroy89 pushed a commit to BitcoinCash1/Bitcoin-Cash-Node that referenced this issue Oct 10, 2024
Summary
---

CI is currently failing after merge of !1838 because !1838 was on CI
image -v2 (older gcc) and we are now on -v4 (newer gcc).  Boost 1.71
unfortunately has a bug in a header related to the fact that
PTHREAD_STACK_MIN is sometimes not an integer literal but is rather a
function call to sysconf().

We thus bring this commit as a patch into our depends boost building
process: boostorg/thread@74fb0a2

See related discussion: boostorg/thread#364

Test Plan
---

- Observe CI which is presently broken on master succeed with this
  commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants