Hello,
Running bazel build tensorflow_serving/... fails with:
ERROR: /private/var/tmp/_bazel_pedro/dc87bf2d16d35095a8531bfa3ec48b7d/external/grpc/BUILD:1236:1: C++ compilation of rule '@grpc//:grpc++' failed: cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 58 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
error: invalid argument '-std=gnu99' not allowed with 'C++/ObjC++'
Running macOS 10.12 (sierra)
Hello, I encounter the same error as you with macOS EX Caption 10.11, do you solve this now?
Same here. Mac OS 10.11.6
same here.... 10.12.1 Any solution?
Sorry about this, it's a known issue that TF Serving doesn't compile on MacOS, see https://github.com/tensorflow/serving/issues/1
I would recommend using a Docker container as a workaround (mentioned in that bug). If someone wants to figure out these issues and add support for native compilation on MacOS, those contributions would be greatly appreciated. Closing for now since the other bug tracks this, but please reopen if Docker doesn't work.
i fix this issue just remove the lines which contains copts = [ "-std=gnu99",] in this https://github.com/tensorflow/tensorflow/blob/master/third_party/grpc.BUILD file, and then i can pass the build. Hope it does work for you
@terryKing1992: Thanks for sharing. If others like me need to know what this setting does, please read here: http://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Standards.html ...
Not sure if removing these lines will effect the build in any way, but I also got it to build after removing the lines.
Lines (There are three places, could change if file is updated, but search for: "-std=gnu99"):
https://github.com/tensorflow/tensorflow/blob/master/third_party/grpc.BUILD#L556
https://github.com/tensorflow/tensorflow/blob/master/third_party/grpc.BUILD#L1243
https://github.com/tensorflow/tensorflow/blob/master/third_party/grpc.BUILD#L1574
Thanks ! There are three points in the file. Delete them all and it can run .
@SeanYanxml how can I do it.
@liuyangvoid
i fix this issue just remove the lines which contains copts = [ "-std=gnu99",] in this https://github.com/tensorflow/tensorflow/blob/master/third_party/grpc.BUILD file, and then i can pass the build. Hope it does work for you` .
Can you see?
@SeanYanxml Thanks, i fix it.
Most helpful comment
i fix this issue just remove the lines which contains
copts = [ "-std=gnu99",]in this https://github.com/tensorflow/tensorflow/blob/master/third_party/grpc.BUILD file, and then i can pass the build. Hope it does work for you