bazel build -c opt -- //tensorflow/...
produces these errors (after running for a long while):
ERROR: /home/luke/tensorflow/tensorflow/c/eager/BUILD:125:1: Linking of rule '//tensorflow/c/eager:c_api_test_gpu' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -o bazel-out/k8-opt/bin/tensorflow/c/eager/c_api_test_gpu '-Wl,-rpath,$ORIGIN/../../../_solib_k8/' -Lbazel-out/k8-opt/bin/_solib_k8 ... (remaining 64 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_library_cleanup'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_library_init'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_inet_ntop'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_parse_srv_reply'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_free_data'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_parse_txt_reply_ext'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_query'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_search'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_gethostbyname'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_set_servers_ports'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_strerror'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_init'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_process_fd'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_cancel'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_getsock'
bazel-out/k8-opt/bin/_solib_k8/libexternal_Sgrpc_Slibgrpc_Uresolver_Udns_Uares.so: error: undefined reference to 'ares_destroy'
我尝试运行sudo apt-get install libc-ares-dev
,它确实根据c-ares解决了一些构建步骤,但没有解决这个问题
我从源代码构建了c-ares,然后运行make install
,将.so libcares.so
放在/usr/local/lib/
中。我还验证了libcares
确实导出了这些符号。那什么都没解决。
我确保我的LD_LIBRARY_PATH
包括/usr/local/lib/
如何让巴泽尔找到图书馆?
谢谢。