Skip to content

Commit

Permalink
fix(build): Fix a linkage error for thrift
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Sep 23, 2024
1 parent a6965ac commit 1e71820
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ header:
- 'thirdparty/fix_rocksdb-cmake-PORTABLE-option.patch'
- 'thirdparty/fix_snappy-Wsign-compare-warning.patch'
- 'thirdparty/fix_s2_build_with_absl_and_gtest.patch'
- 'thirdparty/fix_thrift_for_cpp11.patch'
- 'thirdparty/fix_thrift_build_and_link_errors.patch'
# TODO(yingchun): shell/* files are import from thirdparties, we can move them to thirdparty later.
# Copyright (c) 2016, Adi Shavit
- 'src/shell/argh.h'
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ ExternalProject_Add(thrift
URL ${OSS_URL_PREFIX}/thrift-0.9.3.tar.gz
http://archive.apache.org/dist/thrift/0.9.3/thrift-0.9.3.tar.gz
URL_MD5 88d667a8ae870d5adeca8cb7d6795442
PATCH_COMMAND patch -p1 < ${TP_DIR}/fix_thrift_for_cpp11.patch
PATCH_COMMAND patch -p1 < ${TP_DIR}/fix_thrift_build_and_link_errors.patch
CMAKE_ARGS -DCMAKE_BUILD_TYPE=release
-DWITH_JAVA=OFF
-DWITH_PYTHON=OFF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,16 @@ index dadaac3..ef32fe1 100644
} // apache::thrift::stdcxx::placeholders
}}} // apache::thrift::stdcxx
#endif
diff --git a/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
index e4077bc10..00512990a 100644
--- a/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
+++ b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
@@ -528,7 +528,7 @@ uint32_t TJSONProtocol::writeJSONDouble(double num) {
bool special = false;
switch (boost::math::fpclassify(num)) {
case FP_INFINITE:
- if (boost::math::signbit(num)) {
+ if (std::signbit(num)) {
val = kThriftNegativeInfinity;
} else {
val = kThriftInfinity;

0 comments on commit 1e71820

Please sign in to comment.