fbthrift - build failed with getdps.py on Mac OS 13.4 for

45 Views Asked by At

I used cmake provided in the fbthrift () to build the fbthrift project

But get the following error:

[build] FAILED: thrift/annotation/CMakeFiles/thriftannotation.dir/gen-cpp2/cpp_data.cpp.o 
[build] /usr/bin/clang++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_CONTEXT_DYN_LINK -DBOOST_CONTEXT_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DFMT_SHARED -DGFLAGS_IS_A_DLL=0 -DTHRIFT_HAVE_LIBSNAPPY=0 -I/Users/kaiqu/Developer/fbthrift/. -I/Users/kaiqu/Developer/fbthrift/build -I/opt/homebrew/opt/openssl@3/include -isystem /opt/homebrew/include -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include -isystem /opt/homebrew/opt/[email protected]/include -g -std=c++17 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -MD -MT thrift/annotation/CMakeFiles/thriftannotation.dir/gen-cpp2/cpp_data.cpp.o -MF thrift/annotation/CMakeFiles/thriftannotation.dir/gen-cpp2/cpp_data.cpp.o.d -o thrift/annotation/CMakeFiles/thriftannotation.dir/gen-cpp2/cpp_data.cpp.o -c /Users/kaiqu/Developer/fbthrift/build/thrift/annotation/gen-cpp2/cpp_data.cpp
[build] In file included from /Users/kaiqu/Developer/fbthrift/build/thrift/annotation/gen-cpp2/cpp_data.cpp:8:
[build] In file included from /Users/kaiqu/Developer/fbthrift/build/thrift/annotation/gen-cpp2/cpp_data.h:9:
[build] In file included from /Users/kaiqu/Developer/fbthrift/./thrift/lib/cpp2/gen/module_data_h.h:22:
[build] In file included from /Users/kaiqu/Developer/fbthrift/./thrift/lib/cpp/Thrift.h:20:
[build] In file included from /opt/homebrew/include/folly/Range.h:62:
[build] /opt/homebrew/include/fmt/format.h:2797:38: error: expected unqualified-id
[build] template <typename T> constexpr bool isnan(T value) {
[build]                                      ^
[build] /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/math.h:165:7: note: expanded from macro 'isnan'
[build]     ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))          \
[build]       ^
[build] In file included from /Users/kaiqu/Developer/fbthrift/build/thrift/annotation/gen-cpp2/cpp_data.cpp:8:
[build] In file included from /Users/kaiqu/Developer/fbthrift/build/thrift/annotation/gen-cpp2/cpp_data.h:9:
[build] In file included from /Users/kaiqu/Developer/fbthrift/./thrift/lib/cpp2/gen/module_data_h.h:22:
[build] In file included from /Users/kaiqu/Developer/fbthrift/./thrift/lib/cpp/Thrift.h:20:
[build] In file included from /opt/homebrew/include/folly/Range.h:62:
[build] /opt/homebrew/include/fmt/format.h:2797:38: error: expected ')'
[build] /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/math.h:165:7: note: expanded from macro 'isnan'
[build]     ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))          \
[build]       ^
[build] /opt/homebrew/include/fmt/format.h:2797:38: note: to match this '('
[build] /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/math.h:165:5: note: expanded from macro 'isnan'
[build]     ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))          \
[build]     ^
[build] In file included from /Users/kaiqu/Developer/fbthrift/build/thrift/annotation/gen-cpp2/cpp_data.cpp:8:
[build] In file included from /Users/kaiqu/Developer/fbthrift/build/thrift/annotation/gen-cpp2/cpp_data.h:9:
[build] In file included from /Users/kaiqu/Developer/fbthrift/./thrift/lib/cpp2/gen/module_data_h.h:22:
[build] In file included from /Users/kaiqu/Developer/fbthrift/./thrift/lib/cpp/Thrift.h:20:
[build] In file included from /opt/homebrew/include/folly/Range.h:62:
[build] /opt/homebrew/include/fmt/format.h:2805:48: error: expected unqualified-id
[build] struct has_isfinite<T, enable_if_t<sizeof(std::isfinite(T())) != 0>>
[build]                                                ^
[build] /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
[build]     ( sizeof(x) == sizeof(float)  ? __inline_isfinitef((float)(x))       \
[build]     ^
[build] In file included from /Users/kaiqu/Developer/fbthrift/build/thrift/annotation/gen-cpp2/cpp_data.cpp:8:
[build] In file included from /Users/kaiqu/Developer/fbthrift/build/thrift/annotation/gen-cpp2/cpp_data.h:9:
[build] In file included from /Users/kaiqu/Developer/fbthrift/./thrift/lib/cpp2/gen/module_data_h.h:22:
[build] In file included from /Users/kaiqu/Developer/fbthrift/./thrift/lib/cpp/Thrift.h:20:
[build] In file included from /opt/homebrew/include/folly/Range.h:62:
[build] /opt/homebrew/include/fmt/format.h:2805:8: error: explicit specialization of undeclared template struct 'has_isfinite'
[build] struct has_isfinite<T, enable_if_t<sizeof(std::isfinite(T())) != 0>>
[build]        ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build] /opt/homebrew/include/fmt/format.h:2810:22: error: expected unqualified-id
[build] FMT_CONSTEXPR20 bool isfinite(T value) {
[build]                      ^
[build] /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/math.h:155:7: note: expanded from macro 'isfinite'
[build]     ( sizeof(x) == sizeof(float)  ? __inline_isfinitef((float)(x))       \
[build]       ^
[build] In file included from /Users/kaiqu/Developer/fbthrift/build/thrift/annotation/gen-cpp2/cpp_data.cpp:8:
[build] In file included from /Users/kaiqu/Developer/fbthrift/build/thrift/annotation/gen-cpp2/cpp_data.h:9:
[build] In file included from /Users/kaiqu/Developer/fbthrift/./thrift/lib/cpp2/gen/module_data_h.h:22:
[build] In file included from /Users/kaiqu/Developer/fbthrift/./thrift/lib/cpp/Thrift.h:20:
[build] In file included from /opt/homebrew/include/folly/Range.h:62:
[build] /opt/homebrew/include/fmt/format.h:2810:22: error: expected ')'
[build] /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/math.h:155:7: note: expanded from macro 'isfinite'
[build]     ( sizeof(x) == sizeof(float)  ? __inline_isfinitef((float)(x))       \
[build]       ^
[build] /opt/homebrew/include/fmt/format.h:2810:22: note: to match this '('
[build] /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
[build]     ( sizeof(x) == sizeof(float)  ? __inline_isfinitef((float)(x))       \
[build]     ^
[build] In file included from /Users/kaiqu/Developer/fbthrift/build/thrift/annotation/gen-cpp2/cpp_data.cpp:8:
[build] In file included from /Users/kaiqu/Developer/fbthrift/build/thrift/annotation/gen-cpp2/cpp_data.h:9:
[build] In file included from /Users/kaiqu/Developer/fbthrift/./thrift/lib/cpp2/gen/module_data_h.h:22:
[build] In file included from /Users/kaiqu/Developer/fbthrift/./thrift/lib/cpp/Thrift.h:20:
[build] In file included from /opt/homebrew/include/folly/Range.h:62:
[build] /opt/homebrew/include/fmt/format.h:2842:22: error: unknown type name 'round_direction'
[build] FMT_CONSTEXPR inline round_direction get_round_direction(uint64_t divisor,
[build]                      ^
[build] /opt/homebrew/include/fmt/format.h:2850:12: error: use of undeclared identifier 'round_direction'
[build]     return round_direction::down;
[build]            ^
[build] /opt/homebrew/include/fmt/format.h:2854:12: error: use of undeclared identifier 'round_direction'
[build]     return round_direction::up;
[build]            ^
[build] /opt/homebrew/include/fmt/format.h:2856:10: error: use of undeclared identifier 'round_direction'
[build]   return round_direction::unknown;
[build]          ^
[build] /opt/homebrew/include/fmt/format.h:2890:16: error: use of undeclared identifier 'round_direction'
[build]     if (dir != round_direction::up)
[build]                ^
[build] /opt/homebrew/include/fmt/format.h:2891:21: error: use of undeclared identifier 'round_direction'
[build]       return dir == round_direction::down ? digits::done : digits::error;
[build]                     ^
[build] /opt/homebrew/include/fmt/format.h:2943:18: error: use of undeclared identifier 'round_direction'
[build]       if (dir == round_direction::unknown) return digits::error;
[build]                  ^
[build] /opt/homebrew/include/fmt/format.h:2944:44: error: use of undeclared identifier 'round_direction'
[build]       handler.buf[handler.size++] = dir == round_direction::up ? '1' : '0';
[build]                                            ^
[build] /opt/homebrew/include/fmt/format.h:3824:15: error: expected unqualified-id
[build]   if (detail::signbit(value)) {  // value < 0 is false for NaN so use signbit.
[build]               ^
[build] /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/math.h:170:5: note: expanded from macro 'signbit'
[build]     ( sizeof(x) == sizeof(float)  ? __inline_signbitf((float)(x))        \
[build]     ^

...

I checked line 2797 of format.h, as the error log suggested, which is the first line in the code snippet below, but it seems that the definition of the function is defined correctly:

template <typename T> constexpr bool isnan(T value) {
  return !(value >= value);  // std::isnan doesn't support __float128.
} 

I tried setting the CMAKE_CXX_STANDARD to a newer value but it did not work...Could someone give me some pointers about where the problem is?

0

There are 0 best solutions below