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

Depends build with Boost 1.70 fails on newer distros with glibc >= 2.34 #1133

Closed
prasannavl opened this issue Mar 9, 2022 · 1 comment
Closed

Comments

@prasannavl
Copy link
Member

prasannavl commented Mar 9, 2022

Depends build fails with the following errors due to the pthreads.

With gcc:

    "g++-10" "-m64"   -fvisibility-inlines-hidden -std=c++11 -fvisibility=hidden -fPIC  -I/home/pvl/src/defich/ain/depends/x86_64-pc-linux-gnu/include -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden -Wextra -Wno-long-long -Wno-unused-parameter -Wunused-function -pedantic -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_THREAD_POSIX -DNDEBUG  -I"." -c -o "bin.v2/libs/thread/build/gcc-10.3.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o" "libs/thread/src/pthread/thread.cpp"

In file included from /usr/include/pthread.h:33,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/gthr.h:148,
                 from /usr/include/c++/10/ext/atomicity.h:35,
                 from /usr/include/c++/10/bits/basic_string.h:39,
                 from /usr/include/c++/10/string:55,
                 from ./boost/thread/exceptions.hpp:20,
                 from ./boost/thread/pthread/thread_data.hpp:10,
                 from ./boost/thread/thread_only.hpp:17,
                 from libs/thread/src/pthread/thread.cpp:11:
./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "("
   60 | #if PTHREAD_STACK_MIN > 0
      |     ^~~~~~~~~~~~~~~~~

The error above is misleading due to the macro handling of gcc. With clang, the error is clearer:


In file included from libs/thread/src/pthread/thread.cpp:11:
In file included from ./boost/thread/thread_only.hpp:17:
./boost/thread/pthread/thread_data.hpp:60:5: error: function-like macro '__sysconf' is not defined
#if PTHREAD_STACK_MIN > 0
    ^
/usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h:26:30: note: expanded from macro 'PTHREAD_STACK_MIN'
#   define PTHREAD_STACK_MIN __sysconf (__SC_THREAD_STACK_MIN_VALUE)
                             ^
1 error generated.

Upstream boost has this fixed.

Reason: pthreads mismatch - https://developers.redhat.com/articles/2021/12/17/why-glibc-234-removed-libpthread

@defichain-bot
Copy link
Member

@prasannavl: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

Details

I am a bot created to help the DeFiCh developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the DeFiCh/oss-governance-bot repository.

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

Successfully merging a pull request may close this issue.

2 participants