bazel 编译后台服务报错
Closed this issue · 3 comments
mac, 错误信息如下
⇒ bazel build //kcws/cc:seg_backend_api --verbose_failures
INFO: Found 1 target...
ERROR: /Users/yongding/github/kcws/kcws/cc/BUILD:151:1: C++ compilation of rule '//kcws/cc:seg_backend_api' failed: wrapped_clang failed: error executing command
(cd /private/var/tmp/bazel_yongding/70b175ce9fc5148d8f67576faee57324/execroot/kcws &&
exec env -
APPLE_SDK_PLATFORM=MacOSX
APPLE_SDK_VERSION_OVERRIDE=10.12
PATH=/Users/yongding/.rvm/gems/ruby-2.3.0/bin:/Users/yongding/.rvm/gems/ruby-2.3.0@global/bin:/Users/yongding/.rvm/rubies/ruby-2.3.0/bin:/Users/yongding/.pyenv/shims:/Users/yongding/.pyenv/bin:/Users/yongding/bin/hadoop_prod/bin:/Users/yongding/bin/apache-hive-0.13.1-bin/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home:/Users/yongding/dingy/scala-2.11.4/bin:/usr/local/Cellar/gnuplot/5.0.1/bin:/usr/local/Cellar/maven/3.3.9/bin:/usr/local/Cellar/libsvm/3.20/bin:/usr/local/Cellar/protobuf250/2.5.0/bin:/Users/yongding/bin/fastText:/Users/yongding/bin/word2vec/trunk:/usr/local/Cellar/subversion/1.9.3/bin:/Users/yongding/bin/chromedriver:/usr/local/mysql/bin:/Users/yongding/.pythonbrew/bin:/System/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/Cellar/vim/8.0.0094/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/yongding/bin:/Users/yongding/.rvm/bin:/Users/yongding/.rvm/bin
TMPDIR=/var/folders/95/plfyb0jd0v1dk_9vtt52w61r0000gn/T/
XCODE_VERSION_OVERRIDE=8.3.3
external/local_config_cc/wrapped_clang '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -O0 -DDEBUG '-D_GLIBCXX_USE_CXX11_ABI=0' '-std=c++11' -MD -MF bazel-out/darwin_x86_64-fastbuild/bin/kcws/cc/objs/seg_backend_api/kcws/cc/seg_backend_api.d '-frandom-seed=bazel-out/darwin_x86_64-fastbuild/bin/kcws/cc/objs/seg_backend_api/kcws/cc/seg_backend_api.o' -iquote . -iquote bazel-out/darwin_x86_64-fastbuild/genfiles -iquote external/bazel_tools -iquote bazel-out/darwin_x86_64-fastbuild/genfiles/external/bazel_tools -iquote external/tf -iquote bazel-out/darwin_x86_64-fastbuild/genfiles/external/tf -iquote external/protobuf -iquote bazel-out/darwin_x86_64-fastbuild/genfiles/external/protobuf -iquote external/boost -iquote bazel-out/darwin_x86_64-fastbuild/genfiles/external/boost -isystem external/bazel_tools/tools/cpp/gcc3 -isystem third_party/gflags/include -isystem bazel-out/darwin_x86_64-fastbuild/genfiles/third_party/gflags/include -isystem third_party/glog/include -isystem bazel-out/darwin_x86_64-fastbuild/genfiles/third_party/glog/include -isystem external/tf -isystem bazel-out/darwin_x86_64-fastbuild/genfiles/external/tf -isystem external/protobuf/src -isystem bazel-out/darwin_x86_64-fastbuild/genfiles/external/protobuf/src -isystem external/boost -isystem bazel-out/darwin_x86_64-fastbuild/genfiles/external/boost '-isysroot BAZEL_XCODE_SDKROOT' -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE="redacted"' '-D__TIMESTAMP_="redacted"' '-D__TIME__="redacted"' -c kcws/cc/seg_backend_api.cc -o bazel-out/darwin_x86_64-fastbuild/bin/kcws/cc/objs/seg_backend_api/kcws/cc/seg_backend_api.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
In file included from kcws/cc/seg_backend_api.cc:20:
In file included from ./third_party/crow/include/crow.h:10:
./third_party/crow/include/crow/logging.h:15:3: error: expected identifier
DEBUG = 0,
^
:2:15: note: expanded from here
#define DEBUG 1
^
In file included from kcws/cc/seg_backend_api.cc:20:
In file included from ./third_party/crow/include/crow.h:19:
./third_party/crow/include/crow/routing.h:396:17: warning: initialized lambda captures are a C++14 extension [-Wc++14-extensions]
handler = [f = std::move(f)](const request&, response & res, Args ... args) {
^
./third_party/crow/include/crow/routing.h:414:17: warning: initialized lambda captures are a C++14 extension [-Wc++14-extensions]
handler_ = [f = std::move(f)](const crow::request & req, crow::response & res, Args ... args) {
^
2 warnings and 1 error generated.
Target //kcws/cc:seg_backend_api failed to build
INFO: Elapsed time: 8.250s, Critical Path: 7.87s
Check your bazel version, please. Bazel version<=0.5.0 works fine for me.
这个问题解决了吗? 我也遇到相同问题,我的bazel 0.5.0
已解决