-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
ALL
-
Dev Platform 2021-12-27
Building with the latest pthread headers produces a warning in Boost::Thread
In file included from src/third_party/boost/boost/thread/thread_only.hpp:17, from src/third_party/boost/boost/thread/thread.hpp:12, from src/third_party/boost/boost/log/sinks/async_frontend.hpp:38, from src/third_party/boost/boost/log/sinks.hpp:25, from src/mongo/shell/mongo_main.cpp:40: src/third_party/boost/boost/thread/pthread/thread_data.hpp: In member function ‘void boost::thread_attributes::set_stack_size(std::size_t)’: src/third_party/boost/boost/thread/pthread/thread_data.hpp:61:19: error: comparison of integer expressions of different signedness: ‘std::size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Werror=sign-compare] if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
This is due to the macro definition for PTHREAD_STACK_MIN changing from a numeric literal to a function call that returns a long int. This started failing for me when I upgraded to Fedora 35.
Workaround is to build with --disable-warnings-as-errors
Potential fixes include upgrading to a version of Boost::Thread with the fix; hacking our vendored Boost to avoid the warning; playing with macros like __USE_DYNAMIC_STACK_SIZE to avoid the problematic definition.
- duplicates
-
SERVER-59416 Upgrade vendored boost to 1.77.0 or newer
- Closed
-
SERVER-60440 Update boost to latest stable version
- Closed
- is related to
-
SERVER-59459 mongodb fails to build with glibc-2.34
- Closed