Repository navigation
Description
I am using the master branch of tensorflow and also build bazel master
/home/xxxxx/bazel/output/bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer --verbose_failures
ERROR: /home/xxxxx/.cache/bazel/bazel_lli/716dd78c923ec9441d6903ce812e1d6e/external/gemmlowp/BUILD:77:1: C++ compilation of rule '@gemmlowp//:eight_bit_int_gemm' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command
(cd /home/lli/.cache/bazel/bazel_lli/716dd78c923ec9441d6903ce812e1d6e/tensorflow &&
exec env -
PATH='/.local/bin:/.local/bin:~/.local/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/lli/bin:/home/lli/bin:/home/lli/bin'
third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote external/gemmlowp -iquote bazel-out/local_linux-opt/genfiles/external/gemmlowp -iquote external/bazel_tools -iquote bazel-out/local_linux-opt/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers '-frandom-seed=bazel-out/local_linux-opt/bin/external/gemmlowp/objs/eight_bit_int_gemm/external/gemmlowp/eight_bit_int_gemm/eight_bit_int_gemm.o' -MD -MF bazel-out/local_linux-opt/bin/external/gemmlowp/objs/eight_bit_int_gemm/external/gemmlowp/eight_bit_int_gemm/eight_bit_int_gemm.d -c external/gemmlowp/eight_bit_int_gemm/eight_bit_int_gemm.cc -o bazel-out/local_linux-opt/bin/external/gemmlowp/objs/eight_bit_int_gemm/external/gemmlowp/eight_bit_int_gemm/eight_bit_int_gemm.o): crosstool_wrapper_driver_is_not_gcc failed: error executing command
(cd /home/lli/.cache/bazel/bazel_lli/716dd78c923ec9441d6903ce812e1d6e/tensorflow &&
exec env -
PATH='/.local/bin:/.local/bin:~/.local/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/lli/bin:/home/lli/bin:/home/lli/bin'
third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote external/gemmlowp -iquote bazel-out/local_linux-opt/genfiles/external/gemmlowp -iquote external/bazel_tools -iquote bazel-out/local_linux-opt/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE="redacted"' '-D__TIMESTAMP="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers '-frandom-seed=bazel-out/local_linux-opt/bin/external/gemmlowp/_objs/eight_bit_int_gemm/external/gemmlowp/eight_bit_int_gemm/eight_bit_int_gemm.o' -MD -MF bazel-out/local_linux-opt/bin/external/gemmlowp/_objs/eight_bit_int_gemm/external/gemmlowp/eight_bit_int_gemm/eight_bit_int_gemm.d -c external/gemmlowp/eight_bit_int_gemm/eight_bit_int_gemm.cc -o bazel-out/local_linux-opt/bin/external/gemmlowp/_objs/eight_bit_int_gemm/external/gemmlowp/eight_bit_int_gemm/eight_bit_int_gemm.o).
src/main/tools/namespace-sandbox.c:645: execvp(argv[0], argv): No such file or directory
Target //tensorflow/cc:tutorials_example_trainer failed to build
Activity
josh11b commentedon Jan 20, 2016
Can you try
and if that doesn't work, post the entire logs?
fancyerii commentedon Jan 21, 2016
/home/lli/bazel/output/bazel build -c opt --config=cuda --spawn_strategy=standalone //tensorflow/cc:tutorials_example_trainer
INFO: Found 1 target...
ERROR: /home/lli/tensorflow/google/protobuf/BUILD:270:1: Linking of rule '//google/protobuf:protoc' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -o bazel-out/host/bin/google/protobuf/protoc ... (remaining 15 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
/usr/bin/ld: bazel-out/host/bin/google/protobuf/_objs/protoc/google/protobuf/src/google/protobuf/compiler/main.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
bazel-out/host/bin/google/protobuf/_objs/protoc/google/protobuf/src/google/protobuf/compiler/main.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Target //tensorflow/cc:tutorials_example_trainer failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 23.745s, Critical Path: 3.69s
vrv commentedon Jan 21, 2016
@lberki @davidxchen @damienmg
damienmg commentedon Jan 21, 2016
/home/lli/bazel/output/bazel build -c opt --config=cuda --spawn_strategy=standalone --verbose_failure //tensorflow/cc:tutorials_example_trainerThen you will get the failing command completely.
Maybe try a
bazel clean --expungefirstdamienmg commentedon Jan 21, 2016
btw, @davidzchen is the one you wanted to ping (with a z not a x)
fancyerii commentedon Jan 22, 2016
I tried but no luck. BTW, I can't use verbose_failure with my built bazel. Unrecognized option: --verbose_failure
lli@mobvoi-rhea-01:
/jdk1.8.0_65$ /home/lli/bazel/output/bazel clean --expunge/jdk1.8.0_65$ cdThe 'clean' command is only supported from within a workspace.
lli@mobvoi-rhea-01:
lli@mobvoi-rhea-01:
$ cd tensorflow//tensorflow$ /home/lli/bazel/output/bazel clean --expungelli@mobvoi-rhea-01:
................
INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.
lli@mobvoi-rhea-01:
/tensorflow$ /home/lli/bazel/output/bazel build -c opt --config=cuda --spawn_strategy=standalone --verbose_failure //tensorflow/cc:tutorials_example_trainer/tensorflow$ /home/lli/bazel/output/bazel build -c opt --config=cuda --spawn_strategy=standalone //tensorflow/cc:tutorials_example_trainer.............
Unrecognized option: --verbose_failure
lli@mobvoi-rhea-01:
INFO: Found 1 target...
ERROR: /home/lli/tensorflow/google/protobuf/BUILD:270:1: Linking of rule '//google/protobuf:protoc' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -o bazel-out/host/bin/google/protobuf/protoc ... (remaining 15 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
/usr/bin/ld: bazel-out/host/bin/google/protobuf/_objs/protoc/google/protobuf/src/google/protobuf/compiler/main.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
bazel-out/host/bin/google/protobuf/_objs/protoc/google/protobuf/src/google/protobuf/compiler/main.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Target //tensorflow/cc:tutorials_example_trainer failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 166.539s, Critical Path: 18.48s
damienmg commentedon Jan 22, 2016
My bad the correct option is --verbose_failures
On Fri, Jan 22, 2016, 8:53 AM LiLi [email protected] wrote:
fancyerii commentedon Jan 22, 2016
lli@mobvoi-rhea-01:~/tensorflow$ /home/lli/bazel/output/bazel build -c opt --config=cuda --spawn_strategy=standalone --verbose_failures //tensorflow/cc:tutorials_example_trainer
.............
INFO: Found 1 target...
ERROR: /home/lli/tensorflow/google/protobuf/BUILD:270:1: Linking of rule '//google/protobuf:protoc' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command
(cd /home/lli/.cache/bazel/_bazel_lli/716dd78c923ec9441d6903ce812e1d6e/tensorflow &&
exec env -
third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -o bazel-out/host/bin/google/protobuf/protoc bazel-out/host/bin/google/protobuf/_objs/protoc/google/protobuf/src/google/protobuf/compiler/main.o bazel-out/host/bin/google/protobuf/libprotoc_lib.a bazel-out/host/bin/google/protobuf/libprotobuf.a bazel-out/host/bin/google/protobuf/libprotobuf_lite.a -lpthread -lstdc++ -B/usr/bin/ -pie -Wl,-z,relro,-z,now -no-canonical-prefixes -pass-exit-codes '-Wl,--build-id=md5' '-Wl,--hash-style=gnu' -Wl,-S -Wl,--gc-sections): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: crosstool_wrapper_driver_is_not_gcc failed: error executing command
(cd /home/lli/.cache/bazel/_bazel_lli/716dd78c923ec9441d6903ce812e1d6e/tensorflow &&
exec env -
third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -o bazel-out/host/bin/google/protobuf/protoc bazel-out/host/bin/google/protobuf/_objs/protoc/google/protobuf/src/google/protobuf/compiler/main.o bazel-out/host/bin/google/protobuf/libprotoc_lib.a bazel-out/host/bin/google/protobuf/libprotobuf.a bazel-out/host/bin/google/protobuf/libprotobuf_lite.a -lpthread -lstdc++ -B/usr/bin/ -pie -Wl,-z,relro,-z,now -no-canonical-prefixes -pass-exit-codes '-Wl,--build-id=md5' '-Wl,--hash-style=gnu' -Wl,-S -Wl,--gc-sections): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
/usr/bin/ld: bazel-out/host/bin/google/protobuf/_objs/protoc/google/protobuf/src/google/protobuf/compiler/main.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
bazel-out/host/bin/google/protobuf/_objs/protoc/google/protobuf/src/google/protobuf/compiler/main.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Target //tensorflow/cc:tutorials_example_trainer failed to build
INFO: Elapsed time: 16.794s, Critical Path: 5.31s
damienmg commentedon Jan 22, 2016
relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
Adding -fPIC to the options in the cuda crosstool might do the trick. Sorry I cannot do much here, it's a C++ related issue, not really related to bazel
fancyerii commentedon Jan 23, 2016
@damienmg
so which file should I modify and how?
vrv commentedon Jan 23, 2016
Try adding to https://github.com/tensorflow/tensorflow/blob/master/third_party/gpus/crosstool/CROSSTOOL#L89
fancyerii commentedon Jan 29, 2016
thanks, it works.
I have successfully built cifar10 by /home/lli/bazel/output/bazel build -c opt --config=cuda --spawn_strategy=standalone --verbose_failures //tensorflow/models/image/cifar10:cifar10
but how can I run it?
$python cifar10_train.py --data_dir=/home/lli/cifar10_data
Traceback (most recent call last):
File "cifar10_train.py", line 43, in
import tensorflow.python.platform
ImportError: No module named tensorflow.python.platform
How can I build all thing like it's installed by pip?
tobegit3hub commentedon Jun 20, 2016
Is it fixed because we have the similar problem? @fancyerii
snarb commentedon Jul 31, 2016
The same problem
PR tensorflow#41980: [XLA:GPU] Insert ReshapeDecomposer before Layout…
Update XNNPACK in XLA
Update XNNPACK in XLA
Update XNNPACK in XLA
Update XNNPACK in XLA
Update XNNPACK in XLA
Update XNNPACK in XLA
Update XNNPACK in XLA
Update XNNPACK in XLA
Update XNNPACK in XLA