error building bazel-0.2.2b from source

927 views
Skip to first unread message

singh.p...@gmail.com

unread,
May 1, 2016, 10:33:39 AM5/1/16
to bazel-discuss
Hi,
i am trying to compile bazel on my centos 6.5 machine, an i ran into some errors. It seems that use of gcc in place of g++ is the root cause!!.
Can you please guide me which file should i edit to set the compiler + options correctly?

also how can i set the installation prefix?. Currently i am editing ./scripts/packages/template_bin.sh & setting the absolute path in prefix variable!! is this the right way to set prefix?

Any help/hint will be very useful.
Eagerly awaiting your replies.


$ ./compile.sh

INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO: ./compile.sh compile /path/to/bazel
Building Bazel from scratch......
Building Bazel with Bazel.
INFO: Found 1 target...
ERROR: /home/user/TENSOR/bazel-0.2.2b/src/main/cpp/util/BUILD:4:1: C++ compilation of rule '//src/main/cpp/util:util' failed: gcc failed: error executing command
(cd /tmp/bazel.AYu4rYIO/out/bazel-0.2.2b && \
exec env - \
PATH=/home/soft/python-2.7.10/bin:/home/soft/intel2015/composer_xe_2015.3.187/mkl/bin:/home/user/TENSOR/jdk1.8.0_92/jre/bin:/home/user/TENSOR/jdk1.8.0_92/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/opt/pbs/default/bin:/opt/pbs/default/sbin:/opt/pbs/default/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin \
/usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -I/home/soft/python-2.7.10/include/python2.7 -DBLAZE_OPENSOURCE -iquote . -iquote bazel-out/local-fastbuild/genfiles -iquote external/bazel_tools -iquote bazel-out/local-fastbuild/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local-fastbuild/bin/src/main/cpp/util/_objs/util/src/main/cpp/util/file.pic.o' -MD -MF bazel-out/local-fastbuild/bin/src/main/cpp/util/_objs/util/src/main/cpp/util/file.pic.d -fPIC -c src/main/cpp/util/file.cc -o bazel-out/local-fastbuild/bin/src/main/cpp/util/_objs/util/src/main/cpp/util/file.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
src/main/cpp/util/file.cc: In function 'std::string blaze_util::Which(const std::string&)':
src/main/cpp/util/file.cc:84: error: expected initializer before ':' token
src/main/cpp/util/file.cc:100: error: expected primary-expression at end of input
src/main/cpp/util/file.cc:100: error: expected ';' at end of input
src/main/cpp/util/file.cc:100: error: expected primary-expression at end of input
src/main/cpp/util/file.cc:100: error: expected ')' at end of input
src/main/cpp/util/file.cc:100: error: expected statement at end of input
src/main/cpp/util/file.cc:100: error: expected '}' at end of input
src/main/cpp/util/file.cc:100: warning: no return statement in function returning non-void
src/main/cpp/util/file.cc: At global scope:
src/main/cpp/util/file.cc:100: error: expected '}' at end of input
cc1plus: warning: unrecognized command line option "-Wno-free-nonheap-object"
Target //src:bazel failed to build
INFO: Elapsed time: 5.009s, Critical Path: 2.81s

Building output/bazel

Damien Martin-guillerez

unread,
May 2, 2016, 4:53:54 AM5/2/16
to singh.p...@gmail.com, bazel-discuss
Hi,

On Sun, May 1, 2016 at 4:33 PM <singh.p...@gmail.com> wrote:
Hi,
i am trying to compile bazel on my centos 6.5 machine, an i ran into some errors. It seems that use of gcc in place of g++ is the root cause!!.
Can you please guide me which file should i edit to set the compiler + options correctly?


What does `/usr/bin/gcc -v` returns? You can set the path to the C compiler using your CC environment variable.


 

also how can i set the installation prefix?. Currently i am editing ./scripts/packages/template_bin.sh & setting the absolute path in prefix variable!! is this the right way to set prefix?

Absolutely not, template_bin.sh is here to generate the shell installer which is taking an installation prefix as a command line option. But you could simply copy the binary generated by ./compile.sh from output/bazel and put it on your bin directory instead of going through that installer (if you compiling from source).
 
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/7cb2f5a5-a588-4472-940e-aec82792dad4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Puneet Singh

unread,
May 2, 2016, 3:21:17 PM5/2/16
to Damien Martin-guillerez, bazel-discuss
Hi,
Thank you for a prompt reply.

$ /usr/bin/gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)

also , with
CXX=/usr/bin/g++ CC=/usr/bin/gcc ./compile.sh
the compilation hangs up (attached: hang.log) ,
whereas
CC=/usr/bin/gcc ./compile.sh
ends up with same error as discussed in previous communication (attached : fail.log).

Any help/hint here will be very useful.
Eagerly awaiting your replies,


hang.log
fail.log

svilen...@gmail.com

unread,
May 2, 2016, 3:40:42 PM5/2/16
to Puneet Singh, Damien Martin-guillerez, bazel-discuss
The line where you get your error looks like this:
> for (auto piece : pieces) {
Range-based for loops are supported in g++ since 4.6 and you seem to have an older version.

Your best bet is probably to install a newer toolchain if you have root (say in /usr/local), or build one from scratch. The instructions here can help in the second case (https://github.com/jlinoff/gcc-4.9.2-boost-1.57).

(I went through this just this weekend on some school machines that are also stuck on centos 6.5)

Puneet Singh

unread,
May 2, 2016, 9:49:01 PM5/2/16
to svilen...@gmail.com, Damien Martin-guillerez, bazel-discuss
Hi,
i tried upgrading my compiler to gcc 4.9 on centos 6.5 :
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/soft/gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/home/soft/gcc-4.9.3
Thread model: posix
gcc version 4.9.3 (GCC)

now with 
CC=/home/soft/gcc-4.9.3/bin/gcc CXX=/home/soft/gcc-4.9.3/bin/g++ ./compile.sh 
i again ran into some different problem (java.lang.OutOfMemoryError), attached: error_gcc4.9.log

Thanks & Regards,
Puneet

error_gcc4.9.log

svilen...@gmail.com

unread,
May 2, 2016, 10:16:30 PM5/2/16
to Puneet Singh, Damien Martin-guillerez, bazel-discuss
Bazel uses 200 builder threads by default and that seems to hit some (per-user?) thread limit on centos. Running the bootstrap like so did the trick for me:
export EXTRA_BAZEL_ARGS="--jobs 20"
./compile.sh

Puneet Singh

unread,
May 3, 2016, 2:52:07 AM5/3/16
to svilen...@gmail.com, Damien Martin-guillerez, bazel-discuss
Hi,
Thankyou , was able to compile bazel successfully.
Though now i am facing issues while using bazel (for building tensorflow).

bazel build -c opt  -s //tensorflow/cc:tutorials_example_trainer

........
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
ERROR: /home/maths/mtech/jca142469/TENSOR_CPU/tensorflow/tensorflow/core/platform/default/build_config/BUILD:46:1: no such package '@jpeg_archive//': Error downloading from http://www.ijg.org/files/jpegsrc.v9a.tar.gz to /home/maths/mtech/jca142469/.cache/bazel/_bazel_jca142469/80ed6197720da68f2c9f411a2c5f2c3a/external/jpeg_archive: Error downloading http://www.ijg.org/files/jpegsrc.v9a.tar.gz to /home/maths/mtech/jca142469/.cache/bazel/_bazel_jca142469/80ed6197720da68f2c9f411a2c5f2c3a/external/jpeg_archive/jpegsrc.v9a.tar.gz: Connection timed out and referenced by '//tensorflow/core/platform/default/build_config:platformlib'.
ERROR: Loading failed; build aborted.
INFO: Elapsed time: 64.704s

it tries to download jpeg/eigen/png tar files but is unable to do so due to lack of internet connectivity on my machine . I can download & put all these dependencies somewhere within the tensorflow sourcecode directory/bazel cache so that build procedure automatically detect them.

Could you please suggest the path to that directory ( relative to tensorflow src root directory or bazel cache )? or is there a file which needs modification?

I tried placing it under $TENSOR_SRC_ROOT/tensorflow/contrib/cmake/external, but that did not help

I got some hints from here & it seems an issue with bazel ? (https://github.com/tensorflow/tensorflow/issues/67)
The entire issue is also posted here:


Thanks & Regards,
Puneet

Damien Martin-guillerez

unread,
May 3, 2016, 4:44:36 AM5/3/16
to Puneet Singh, svilen...@gmail.com, bazel-discuss
If you can do `bazel fetch //...` when connected to internet then bazel should download everything for you. There is another way to do it but it is a bit more painful (but does not requires to download through bazel).

Puneet Singh

unread,
May 3, 2016, 5:58:56 AM5/3/16
to Damien Martin-guillerez, svilen...@gmail.com, bazel-discuss
Hi,
I tried  bazel fetch //...
again , i was stuck

INFO: Downloading from http://www.ijg.org/files/jpegsrc.v9a.tar.gz: 0B

ERROR: /home/maths/mtech/jca142469/TENSOR_CPU/tensorflow/tensorflow/core/platform/default/build_config/BUILD:46:1: no such package '@jpeg_archive//': Error downloading from http://www.ijg.org/files/jpegsrc.v9a.tar.gz to /home/maths/mtech/jca142469/.cache/bazel/_bazel_jca142469/80ed6197720da68f2c9f411a2c5f2c3a/external/jpeg_archive: Error downloading http://www.ijg.org/files/jpegsrc.v9a.tar.gz to /home/maths/mtech/jca142469/.cache/bazel/_bazel_jca142469/80ed6197720da68f2c9f411a2c5f2c3a/external/jpeg_archive/jpegsrc.v9a.tar.gz: Connection timed out and referenced by '//tensorflow/core/platform/default/build_config:platformlib'.
It seems that bazel  has some issues while downloading via proxy servers: https://github.com/bazelbuild/bazel/issues/587
Will try local_repository now: http://bazel.io/docs/be/workspace.html#local_repository.







Damien Martin-guillerez

unread,
May 3, 2016, 6:00:22 AM5/3/16
to Puneet Singh, svilen...@gmail.com, bazel-discuss

While online ?

Damien Martin-guillerez

unread,
May 3, 2016, 6:57:51 AM5/3/16
to Puneet Singh, bazel-...@googlegroups.com, Kristina Chodorow
Which version of Bazel? Proxy should work if the environment is setted correctly. Kristina knows better that.

On Tue, May 3, 2016, 12:28 PM Puneet Singh <singh.p...@gmail.com> wrote:
Hi,
yes, that machine can now access internet (via proxy). & i am able to download via wget
but bazel is unable to do so!!

also i need help in setting up localrepository for bazel ,
within ./tensorflow/workspace.bzl i have:

   # native.new_http_archive(
   #   name = "jpeg_archive",
   #  url = "http://www.ijg.org/files/jpegsrc.v9a.tar.gz",
   # sha256 = "3a753ea48d917945dd54a2d97de388aa06ca2eb1066cbfdc6652036349fe05a7",
   # build_file = path_prefix + "jpeg.BUILD",
  #)
local_repository(
    name = "jpeg_archive",
    path = "/home/user/tars/jpegsrc.v9a.tar.gz",
)
and i got:
ERROR: /home/user/TENSOR_CPU/tensorflow/tensorflow/workspace.bzl:56:2: indentation error.
ERROR: /home/user/TENSOR_CPU/tensorflow/tensorflow/workspace.bzl:104:4: syntax error at 'outdent': expected expression.
ERROR: /home/user/TENSOR_CPU/tensorflow/tensorflow/workspace.bzl:49:1: function 'local_repository' does not exist.
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package '': Extension 'tensorflow/workspace.bzl' has errors.
where:
ls /home/user/tars/
50812b426b7c.tar.gz jpegsrc.v9a.tar.gz v1.2.53.zip

Puneet Singh

unread,
May 3, 2016, 7:08:03 AM5/3/16
to Damien Martin-guillerez, bazel-discuss, Kristina Chodorow
Hi,
bazel v0.2.2b
for wget : http_proxy, https_proxy & SSL_CERT_FILE variables are enough for me.
for bazel do we need some additional variables??

Kristina Chodorow

unread,
May 3, 2016, 9:42:15 AM5/3/16
to Puneet Singh, Damien Martin-guillerez, bazel-discuss
Bazel only checks HTTP_PROXY and HTTPS_PROXY right now (all upper-case), can you try setting those as well?

Puneet Singh

unread,
May 3, 2016, 2:59:00 PM5/3/16
to Kristina Chodorow, Damien Martin-guillerez, bazel-discuss
Hi,
i tried those and now i get:


bazel build -c opt  -s //tensorflow/cc:tutorials_example_trainer
........
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
ERROR: /home/user/TENSOR_CPU/tensorflow/third_party/eigen3/BUILD:3:1: no such package '@eigen_archive//': Error downloading from https://bitbucket.org/eigen/eigen/get/50812b426b7c.tar.gz to /home/user/.cache/bazel/_bazel_jca142469/80ed6197720da68f2c9f411a2c5f2c3a/external/eigen_archive: Error downloading https://bitbucket.org/eigen/eigen/get/50812b426b7c.tar.gz to /home/user/.cache/bazel/_bazel_jca142469/80ed6197720da68f2c9f411a2c5f2c3a/external/eigen_archive/50812b426b7c.tar.gz: Proxy address 192.168.78.82:3238 is not a valid URL and referenced by '//third_party/eigen3:eigen3'.

ERROR: Loading failed; build aborted.
INFO: Elapsed time: 1.490s

also i can see:
-rw-r--r-- 1 user user 0 May  4 00:22 /home/user/.cache/bazel/_bazel_jca142469/80ed6197720da68f2c9f411a2c5f2c3a/external/eigen_archive/50812b426b7c.tar.gz

so after retring 3/4 times , the error message changed to:

bazel build -c opt  -s //tensorflow/cc:tutorials_example_trainer                                                          WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
ERROR: /home/user/TENSOR_CPU/tensorflow/tensorflow/core/platform/default/build_config/BUILD:46:1: no such package '@re2//': Proxy address 192.168.78.82:3238 is not a valid URL and referenced by '//tensorflow/core/platform/default/build_config:platformlib'.

ERROR: Loading failed; build aborted.
INFO: Elapsed time: 0.436s





Kristina Chodorow

unread,
May 3, 2016, 3:05:55 PM5/3/16
to Puneet Singh, Damien Martin-guillerez, bazel-discuss
The error message is the same ("Proxy address 192.168.78.82:3238 is not a valid URL"), Bazel executes as many build actions as possible in parallel so you're just getting the same error from a different reverse dependency.

We expect the proxy address to match this regex: "^(https?)://(([^:@]+?)(?::([^@]+?))?@)?([^:]+)(?::(\\d+))?$" or, more colloquially, http[s]://[username:password@]address[:port].  username, password, and port are optional, so you'll need http://192.168.78.82:3238 (or https://192.168.78.82:3238).

Puneet Singh

unread,
May 4, 2016, 2:45:57 AM5/4/16
to Kristina Chodorow, Damien Martin-guillerez, bazel-discuss
hi ,
i modified the values of HTTP_PROXY & HTTPS_PROXY and the command bazel build -c opt  -s //tensorflow/cc:tutorials_example_trainer executed successfully

but again i ran into issues with:
user]$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package


WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
ERROR: /home/user/TENSOR_CPU/tensorflow/tensorflow/core/distributed_runtime/rpc/BUILD:207:1: no such package '@grpc//': Error cloning repository: https://github.com/google/boringssl.git: 302 Moved Temporarily caused by https://github.com/google/boringssl.git: 302 Moved Temporarily and referenced by '//tensorflow/core/distributed_runtime/rpc:grpc_server_lib'.

ERROR: Loading failed; build aborted.
INFO: Elapsed time: 0.292s

whereas normal git clone works:
user]$ git clone https://github.com/google/boringssl.git
Initialized empty Git repository in /home/user/TENSOR_CPU/tensorflow/hh/boringssl/.git/
remote: Counting objects: 24827, done.
remote: Compressing objects: 100% (289/289), done.
receiving objects:   1% (332/24827), 148.01 KiB | 126 KiB/s


in my environment i have: 
user]$ echo $http_proxy
192.168.78.82:3238
user]$ echo $https_proxy
192.168.78.82:3238
user]$ echo $HTTP_PROXY
http://192.168.78.82:3238
user]$ echo $HTTPS_PROXY
https://192.168.78.82:3238

is there any other environment variable , bazel requires to download from github(via proxy)?

Damien Martin-guillerez

unread,
May 4, 2016, 7:28:57 AM5/4/16
to Puneet Singh, Kristina Chodorow, d...@google.com, bazel-discuss
+David Chen might know for git_repository support of proxies.

Puneet Singh

unread,
May 4, 2016, 3:15:14 PM5/4/16
to Damien Martin-guillerez, Kristina Chodorow, d...@google.com, bazel-discuss
Hi,
I
It seems that the git clone by bazel fails only while downloading boring ssl (correct me if i'm wrong).

$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
................................
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
INFO: Loading package: @paper_slider//
INFO: Loading package: @six_archive//
INFO: Loading package: tensorflow/core/util/ctc
INFO: Loading package: @local_config_cc//
[3 / 3] Cloning https://github.com/grpc/grpc.git: Receiving objects (1780 / 160037)
[4 / 4] Cloning https://github.com/grpc/grpc.git: Resolving deltas (1032 / 120667)
[4 / 4] Cloning https://github.com/grpc/grpc.git: Resolving deltas (28533 / 120667)
[5 / 5] Cloning https://github.com/grpc/grpc.git: Updating references (34 / 34)
[3 / 3] Cloning submodules for https://github.com/grpc/grpc.git: Receiving objects (3129 / 24832)
[4 / 4] Cloning submodules for https://github.com/grpc/grpc.git: Resolving deltas (5614 / 16516)
[5 / 5] Cloning submodules for https://github.com/grpc/grpc.git: Updating references (7 / 11)
[4 / 4] Cloning submodules for https://github.com/grpc/grpc.git: Resolving deltas (657 / 1119)

ERROR: /home/user/TENSOR_CPU/tensorflow/tensorflow/workspace.bzl:90:3: no such package '@grpc//': Error cloning repository: Unable to tunnel through proxy. Proxy returns "HTTP/1.0 302 Moved Temporarily" caused by Unable to tunnel through proxy. Proxy returns "HTTP/1.0 302 Moved Temporarily" caused by Unable to tunnel through proxy. Proxy returns "HTTP/1.0 302 Moved Temporarily" and referenced by '//external:grpc_cpp_plugin'.

ERROR: Loading failed; build aborted.

INFO: Elapsed time: 178.253s

so i cleaned everything & restarted build , but now :
time bazel build -c opt //tensorflow/tools/pip_package:build_pip_package 2>&1|tee tensor.log

WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
____Loading...
ERROR: /home/user/TENSOR_CPU/tensorflow/tensorflow/core/distributed_runtime/rpc/BUILD:207:1: no such package '@grpc//': Error cloning repository: https://github.com/grpc/grpc.git: 302 Moved Temporarily caused by https://github.com/grpc/grpc.git: 302 Moved Temporarily and referenced by '//tensorflow/core/distributed_runtime/rpc:grpc_server_lib'.

ERROR: Loading failed; build aborted.
____Elapsed time: 0.306s

so i don't think it's an issue with boring git repo.
Eagerly awaiting your replies.

Thiago Farina

unread,
May 4, 2016, 3:56:19 PM5/4/16
to Puneet Singh, bazel-discuss
On Wed, May 4, 2016 at 4:15 PM, Puneet Singh <singh.p...@gmail.com> wrote:
Hi,
I
It seems that the git clone by bazel fails only while downloading boring ssl (correct me if i'm wrong).

Where do you see boringssl in the error messages below?

--
Thiago Farina

Puneet Singh

unread,
May 4, 2016, 4:09:21 PM5/4/16
to Thiago Farina, bazel-discuss

Hi,
Not in these , but in my previous attempts I was stuck at boringssl:-

WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.

ERROR: /home/user/TENSOR_CPU/tensorflow/tensorflow/core/distributed_runtime/rpc/BUILD:207:1: no such package '@grpc//': Error cloning repository:https://github.com/google/boringssl.git: 302 Moved Temporarily caused by https://github.com/google/boringssl.git: 302 Moved Temporarily and referenced by '//tensorflow/core/distributed_runtime/rpc:grpc_server_lib'.

ERROR: Loading failed; build aborted.

INFO: Elapsed time: 0.292s

David Chen

unread,
May 4, 2016, 5:04:33 PM5/4/16
to Puneet Singh, Damien Martin-guillerez, Kristina Chodorow, bazel-discuss
The error appears to be the following:

Error cloning repository: Unable to tunnel through proxy. Proxy returns "HTTP/1.0 302 Moved Temporarily" caused by Unable to tunnel through proxy. Proxy returns "HTTP/1.0 302 Moved Temporarily" caused by Unable to tunnel through proxy. Proxy returns "HTTP/1.0 302 Moved Temporarily" and referenced by '//external:grpc_cpp_plugin'.

Could it be a problem with your proxy?

Puneet Singh

unread,
May 6, 2016, 8:04:29 AM5/6/16
to David Chen, Damien Martin-guillerez, Kristina Chodorow, bazel-discuss
Hi,
Thankyou very much for your help. The help from your side was way more than i had expected.
After deleting .cache/bazel + fixing some issues with the proxy,  I was able to compile CPU version of tensorflow.

Though i am stuck at the gpu version compilation, you may like to share your inputs in this issue.
https://github.com/tensorflow/tensorflow/issues/2253

Thanks & Regards,

Puneet



Damien Martin-guillerez

unread,
May 6, 2016, 8:08:05 AM5/6/16
to Puneet Singh, David Chen, Kristina Chodorow, bazel-discuss
Did you used `--config cuda` option for Bazel when building tensorflow?

Puneet Singh

unread,
May 6, 2016, 8:35:12 AM5/6/16
to Damien Martin-guillerez, David Chen, Kristina Chodorow, bazel-discuss
Hi,
yes i am using
bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package 2>&1|tee tensorflow_build.log

after editing third_party/gpus/crosstool/CROSSTOOL as per rdipietro's comment for my gcc 4.9.3 (7 Mar) at : https://github.com/bazelbuild/bazel/issues/760
initially i got:
gcc: error: unrecognized command line option '-nvcc_options=relaxed-constexpr' (attached: tensorflow_build.log)

after removing the switch from tensorflow/tensorflow.bzl
i got stuck at:-
gcc: error: language cuda not recognized (attached:tensorflow_build_edited.log )

Also, I have cuda 7.0 + cudnn 7.0.3.0 in my environment.


Regards,
Puneet Singh

Puneet Singh

unread,
May 6, 2016, 8:36:10 AM5/6/16
to Damien Martin-guillerez, David Chen, Kristina Chodorow, bazel-discuss
Hi,
yes i am using
bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package 2>&1|tee tensorflow_build.log

after editing third_party/gpus/crosstool/CROSSTOOL as per rdipietro's comment for my gcc 4.9.3 (7 Mar) at : https://github.com/bazelbuild/bazel/issues/760
initially i got:
gcc: error: unrecognized command line option '-nvcc_options=relaxed-constexpr' (attached: tensorflow_build.log)

after removing the switch from tensorflow/tensorflow.bzl
i got stuck at:-
gcc: error: language cuda not recognized (attached:tensorflow_build_edited.log )

Also, I have cuda 7.0 + cudnn 7.0.3.0 in my environment.

Regards,
Puneet Singh



tensorflow_build.log
tensorflow_build_edited.log

Damien Martin-guillerez

unread,
May 6, 2016, 8:40:36 AM5/6/16
to Puneet Singh, David Chen, Kristina Chodorow, bazel-discuss
Sorry what modification are you doing to CROSSTOOL? I am not that expert in cuda configuration either so you might have better chance with getting help from TensorFlow people.
Reply all
Reply to author
Forward
0 new messages