-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't compile bazel behind a proxy #7487
Comments
There is also the option of bootstrapping from a distribution archive; those are also available for release candidates, see, e.g., https://releases.bazel.build/0.23.0/rc1/index.html
Unfortunately, bazel's download utility and proxies is a known issue. A quick work around is to manually download the needed files and put them to some directory. Then you can tell bazel using the Also, if you have a jdk on your system already (e.g., the one taken from your distribution) there is no need to download one freshly; you can tell bazel to using by providing the option |
Thanks for your answer. Is there no hope for having that bazel download issue fixed so that proxy could be used ?
|
The way The
If someone with network access can do a clean build of the project, the fetches can be recorded. Unfortunately, by the imperative nature of |
Bazel supports proxies but remember that basic HTTP auth is disabled in JDK8 (https://confluence.atlassian.com/kb/basic-authentication-fails-for-outgoing-proxy-in-java-8u111-909643110.html): Make sure to pass that flag in:
|
I'm wondering if I could get a further elaboration on this -- is there a PR to review where proxy variables being respected by bazel build is introduced? We have http_proxy et all in our environment and go environment but are running into timeouts when using From a teammate (paraphrasing slightly)
I have been facing this problem:
Where adding the line you mention to our |
Hi,
I'd like to compile bazel on Fedora28. Since bazel requires bazel for compiling, I have installed a bazel 0.22 from Fedora/Copr repository.
I ran the compile.sh script which tells to run "bazel build //src:bazel". So far, evrything is fine.
But my machine is behind a SQUID proxy (running on another machine on port 1080 with no auth), and I have http_proxy + https_proxy pointing to that proxy, and no_proxy=localhost,127.0.0.1.
It seems like bazel does not like proxies at all, for I have the following result. The address 10.200.255.254:1080 is my proxy, it works fine with wget, curl of dnf.
Fun fact : bazel 0.22 says it can't download https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-linux_x64-minimal-90755145cb6e6418584d8603cd5fa9afbb30aecc-1549209948.tar.gz
but wget actually can download it.
It seems like bazel does not care about my proxy envvar. What should I do ?
Extract from the command-line:
$ bazel build //src:bazel
INFO: Invocation ID: 7f267cd1-51f6-4d91-85db-afc797b1323b
ERROR: /home/denielp/bazel/src/BUILD:219:1: no such package '@openjdk_linux_minimal//file': java.io.IOException: Error downloading [https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-linux_x64-minimal-90755145cb6e6418584d8603cd5fa9afbb30aecc-1549209948.tar.gz] to /home/denielp/.cache/bazel/_bazel_denielp/4884ab1c8a85fee5e1fa7c3b610b7efb/external/openjdk_linux_minimal/file/zulu-linux-minimal.tar.gz: Proxy address 10.200.255.254:1080 is not a valid URL and referenced by '//src:embedded_jdk_minimal_cached'
ERROR: Analysis of target '//src:bazel' failed; build aborted: Analysis failed
INFO: Elapsed time: 12.851s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 1 target configured)
currently loading: tools/build_defs/repo
Fetching @openjdk_linux_minimal; fetching 12s
Fetching @remotejdk_linux; fetching 12s
Fetching @bazel_skylib; fetching 12s
Fetching @desugar_jdk_libs; fetching 12s
The text was updated successfully, but these errors were encountered: