Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): Fix a linkage error for thrift (#2125)
Fix a linkage error on MacOS, the error looks like: ``` Undefined symbols for architecture x86_64: "int boost::math::signbit<double>(double)", referenced from: apache::thrift::protocol::TJSONProtocol::writeJSONDouble(double) in libthrift.a(TJSONProtocol.cpp.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) [ 31%] Building CXX object src/block_service/test/CMakeFiles/dsn_block_service_test.dir/hdfs_service_test.cpp.o make[2]: *** [src/base/test/base_test] Error 1 make[1]: *** [src/base/test/CMakeFiles/base_test.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... ``` This error also appears on Linux when I tried to bump boost to 1.86.0. We use a very old version of thrift (0.9.3), it uses `boost::math::signbit()` which can use replaced by `std::signbit()`. This patch makes this change.
- Loading branch information