3 ms·
I run bazel build and I get this: ERROR: /private/var/tmp/_bazel_qixiang/5571543a3fba611a0b0ca8efd02f3a37/external/protobuf_archive/BUILD:265:1: C++ compilatio
by qixiang109 9y ago
I run bazel build and I get this:
ERROR: /private/var/tmp/_bazel_qixiang/5571543a3fba611a0b0ca8efd02f3a37/external/protobuf_archive/BUILD:265:1: C++ compilation of rule '@protobuf_archive//:js_embed' failed (Exit 1).
gcc-7: error: unrecognized command line option '-fcolor-diagnostics'
gcc-7: error: unrecognized command line option '-Wthread-safety'; did you mean '-fthread-jumps'?
gcc-7: error: unrecognized command line option '-Wself-assign'; did you mean '-Wcast-align'?
Target //tensorflow/tools/pip_package:build_pip_package failed to build
any help?
- earcar 9y agoAuthor of the post here. Bazel recognizes it's compiling on macOS, so it's using clang-compatible flags, which are incompatible with gcc. You should use the default host compiler, as stated in the [configure output][1] in the post. /usr/bin/gcc is for all intents and purposes clang on macOS. gcc-7 is only installed to provide libgomp which is otherwise missing from a standard macOS installation. I'll update the post to make it clearer. Thanks for pointing that out! [1]: https://gist.github.com/crmne/a22858264d68dd9fe935fc4ee48e0453#file-configure_output-txt-L54 https://gist.github.com/crmne/a22858264d68dd9fe935fc4ee48e04...
- qixiang109 9y agowow...it works! THX!