Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can anyone tell me how to make this? My gcc version is 7.4.0 #1137

Open
silveric10 opened this issue May 28, 2019 · 1 comment
Open

Can anyone tell me how to make this? My gcc version is 7.4.0 #1137

silveric10 opened this issue May 28, 2019 · 1 comment

Comments

@silveric10
Copy link

silveric10 commented May 28, 2019

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.

@simonmar
Copy link

simonmar commented Jun 7, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants