You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use ubuntu 18.04 and gcc version is 7.4. I can build folly successfully. But when I make thrift, those errors will occur.
Scanning dependencies of target thrift-core
[ 40%] Building CXX object thrift/lib/cpp/CMakeFiles/thrift-core.dir/Thrift.cpp.o
In file included from /usr/local/include/folly/Range.h:22:0,
from /home/yy/openr/build/deps/fbthrift/thrift/lib/cpp/Thrift.h:20,
from /home/yy/openr/build/deps/fbthrift/thrift/lib/cpp/Thrift.cpp:21:
/usr/local/include/folly/Portability.h:22:1: error: static assertion failed: __cplusplus >= 201402L
static_assert(__cplusplus >= 201402L, "__cplusplus >= 201402L");
^~~~~~~~~~~~~
In file included from /home/yy/openr/build/deps/fbthrift/thrift/lib/cpp/Thrift.h:20:0,
from /home/yy/openr/build/deps/fbthrift/thrift/lib/cpp/Thrift.cpp:21:
/usr/local/include/folly/Range.h:522:12: error: ‘std::enable_if_t’ has not been declared
std::enable_if_t<
^~~~~~~~~~~
/usr/local/include/folly/Range.h:522:23: error: expected ‘>’ before ‘<’ token
std::enable_if_t<
^
/usr/local/include/folly/Range.h:532:12: error: ‘std::enable_if_t’ has not been declared
std::enable_if_t<
^~~~~~~~~~~
/usr/local/include/folly/Range.h:532:23: error: expected ‘>’ before ‘<’ token
std::enable_if_t<
I know that is because I did not use c++14 compiler, but how? I already add added "_compile_options(-std=c++14)" to the CMakeList.txt. My gcc version is 7.4 and it should be c++14 compiler.
The text was updated successfully, but these errors were encountered:
I ran into the same problem. For some reason, cmake has added a -std=gnu++11 flag to some of the generated Makefiles. I haven't been able to find out where it came from - it doesn't seem to be in any pkg-config configs. For now I just manually deleted it, then fbthrift built successfully.
I use ubuntu 18.04 and gcc version is 7.4. I can build folly successfully. But when I make thrift, those errors will occur.
Scanning dependencies of target thrift-core
[ 40%] Building CXX object thrift/lib/cpp/CMakeFiles/thrift-core.dir/Thrift.cpp.o
In file included from /usr/local/include/folly/Range.h:22:0,
from /home/yy/openr/build/deps/fbthrift/thrift/lib/cpp/Thrift.h:20,
from /home/yy/openr/build/deps/fbthrift/thrift/lib/cpp/Thrift.cpp:21:
/usr/local/include/folly/Portability.h:22:1: error: static assertion failed: __cplusplus >= 201402L
static_assert(__cplusplus >= 201402L, "__cplusplus >= 201402L");
^~~~~~~~~~~~~
In file included from /home/yy/openr/build/deps/fbthrift/thrift/lib/cpp/Thrift.h:20:0,
from /home/yy/openr/build/deps/fbthrift/thrift/lib/cpp/Thrift.cpp:21:
/usr/local/include/folly/Range.h:522:12: error: ‘std::enable_if_t’ has not been declared
std::enable_if_t<
^~~~~~~~~~~
/usr/local/include/folly/Range.h:522:23: error: expected ‘>’ before ‘<’ token
std::enable_if_t<
^
/usr/local/include/folly/Range.h:532:12: error: ‘std::enable_if_t’ has not been declared
std::enable_if_t<
^~~~~~~~~~~
/usr/local/include/folly/Range.h:532:23: error: expected ‘>’ before ‘<’ token
std::enable_if_t<
I know that is because I did not use c++14 compiler, but how? I already add added "_compile_options(-std=c++14)" to the CMakeList.txt. My gcc version is 7.4 and it should be c++14 compiler.
The text was updated successfully, but these errors were encountered: