Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tensorflow build error with bazel

i'm trying to build tensorflow from source on Ubuntu14.04 with python2.7, no GPU. when i execute bazel build -c opt //tensorflow/tools/pip_package:build_pip_package on console, it says:

ERROR:
/home/yangyang/tensorflow/tensorflow/tensorflow/tools/pip_package/BUILD:23:1:
error loading package 'tensorflow/contrib/session_bundle': Encountered
error while reading extension file 'protobuf.bzl': no such package
'@protobuf//': Proxy address https://127.0.0.1:8123/ is not a valid
URL and referenced by
'//tensorflow/tools/pip_package:build_pip_package'.
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build
aborted.

i'm not familiar with bazel and don't quite understand the error. it's true that i'm using polipo and global proxy on 127.0.0.1:8123. but i don't understand why and how this affects bazel. i also tried stop polipo and banned the global proxy. then git clone a fresh copy of tensorflow and do the build again. but the same error still exist. does anybody know the reason? thanks!

like image 461
user1427630 Avatar asked Apr 25 '26 06:04

user1427630


1 Answers

Bazel didn't handle proxies with a trailing slash up until 18 days ago, so it's not in a release yet. Can you set your HTTPS_PROXY environment variable to be https://127.0.0.1:8123, instead?

You might have to do a bazel clean --expunge before rebuilding, I'm not sure if the proxy URL is cached.

like image 116
kristina Avatar answered Apr 28 '26 06:04

kristina



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!