tensorflow中grpc的cmake误差
当尝试使用cmake构建tensorflow时,我得到了以下错误。我不确定这是否与tensorflow或grpc有关。知道发生了什么事吗 这是在Mac OS Sierra上 复制步骤:tensorflow中grpc的cmake误差,tensorflow,cmake,grpc,Tensorflow,Cmake,Grpc,当尝试使用cmake构建tensorflow时,我得到了以下错误。我不确定这是否与tensorflow或grpc有关。知道发生了什么事吗 这是在Mac OS Sierra上 复制步骤: # clone tensorflow repo # in tensorflow directory cd tensorflow/contrib/cmake mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/u
# clone tensorflow repo
# in tensorflow directory
cd tensorflow/contrib/cmake
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/local/bin/python3
make tf_tutorials_example_trainer
错误:
# ...
Scanning dependencies of target tf_tutorials_example_trainer
[100%] Building CXX object CMakeFiles/tf_tutorials_example_trainer.dir/Users/kevenwang/VirtualBoxShared/another_tf/tensorflow/cc/tutorials/example_trainer.cc.o
[100%] Linking CXX executable tf_tutorials_example_trainer
Undefined symbols for architecture x86_64:
"_ares_cancel", referenced from:
on_readable_cb(grpc_exec_ctx*, void*, grpc_error*) in libgrpc_unsecure.a(grpc_ares_ev_driver_posix.cc.o)
on_writable_cb(grpc_exec_ctx*, void*, grpc_error*) in libgrpc_unsecure.a(grpc_ares_ev_driver_posix.cc.o)
"_ares_destroy", referenced from:
grpc_ares_ev_driver_unref(grpc_ares_ev_driver*) in libgrpc_unsecure.a(grpc_ares_ev_driver_posix.cc.o)
...
_grpc_ares_ev_driver_create in libgrpc_unsecure.a(grpc_ares_ev_driver_posix.cc.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [tf_tutorials_example_trainer] Error 1
make[2]: *** [CMakeFiles/tf_tutorials_example_trainer.dir/all] Error 2
make[1]: *** [CMakeFiles/tf_tutorials_example_trainer.dir/rule] Error 2
也许你可以用自制软件安装grpc库 在这种情况下,您需要链接c-ares库 e、 g
TARGET_LINK_库(demo)/usr/local/lib/libcares.a“…)也许您可以通过自制程序安装grpc库 在这种情况下,您需要链接c-ares库 e、 g
TARGET\u LINK\u LIBRARIES(demo)/usr/local/lib/libcares.a“…)gRPC确实使用c-ares作为第三方依赖项,因此这可能确实是gRPC的问题,但如果没有更多信息,很难判断。考虑在GITHUB上提交一个GRPC问题,并请提供更多的细节-什么GRPC版本,它在其他平台上工作等等。此外,您可以尝试编译与C-ARES禁用(定义GRPCYARS=0)或在系统上预先安装的C-ARS(GRPCOA CARESIOVALVER=包CSOD参数)GRPC确实使用C-ARES作为第三方依赖性,因此,这可能确实是gRPC的问题,但如果没有更多信息,很难判断。考虑在GITHUB上提交GRPC问题,请提供更多的细节-什么GRPC版本,它在其他平台上工作,等等,也可以尝试用C-ARES禁用(定义GRPCYARS=0)或在系统上预先安装的C-ARES(GRPCOA CARESIOVAdvals=包CGORD参数)