tensorflow: gcc: error: unrecognized command line option '-std=c++14'
I’m trying to build on CentOS, but it fails:
INFO: Analyzed 4 targets (305 packages loaded, 27773 targets configured).
INFO: Found 4 targets...
INFO: Deleting stale sandbox base /home/xx/.cache/bazel/_bazel_xx/aee6fd7a0bb70a6e710bf5cf6db40de3/sandbox
ERROR: /home/xx/tensorflow-build/tensorflow/core/BUILD:386:1: C++ compilation of rule '//tensorflow/core:util_port' failed (Exit 1)
gcc: error: unrecognized command line option '-std=c++14'
INFO: Elapsed time: 13.712s, Critical Path: 0.21s
INFO: 17 processes: 17 local.
FAILED: Build did NOT complete successfully
Why is the C++ option -std=c++14 passed to gcc?
rev.e627965 gcc-9.2.0 CentOS 7.6.1810
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (4 by maintainers)
Compiled latest master 2.4 successfully on CentOS 7.8 after having this error (and another one about gcc and libstdc++.so.6).
All steps I’ve done (relevant one specific to this ticket is highlighted):
sudo find / -name "libstdc++.so.6*"and point/lib64/libstdc++.so.6to the latest version, in my case (ref)cp /usr/local/lib64/libstdc++.so.6.0.24 /usr/lib64/mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.OLDln -s /usr/lib64/libstdc++.so.6.0.24 /usr/lib64/libstdc++.so.6.bazelrc, line 300,301 (ref) :build:linux --cxxopt=-std=c++1ybuild:linux --host_cxxopt=-std=c++1y