bazel: Bazel 0.1.2 does not build tensorflow
bazel 0.1.2 deb package fails to build tensorflow
See commit https://github.com/jendap/tensorflow/commit/28996fa9f11dfce41a796d8055269f972e13acca
It gives errors like this… ERROR: /root/.cache/bazel/_bazel_root/68a62076e91007a7908bc42a32e4cff9/external/re2/BUILD:9:1: undeclared inclusion(s) in rule ‘@re2//:re2’: this rule is missing dependency declarations for the following files included by ‘external/re2/re2/perl_groups.cc’: …
… or …
ERROR: /tensorflow/google/protobuf/BUILD:29:1: undeclared inclusion(s) in rule ‘//google/protobuf:protobuf_lite’: this rule is missing dependency declarations for the following files included by ‘google/protobuf/src/google/protobuf/stubs/once.cc’: …
Steps to reproduce (it is slow and needs good internet, it will build 5GB docker image):
git clone --recursive https://github.com/jendap/tensorflow.git
cd tensorflow
git checkout ci_build-bazel_upgrade
tensorflow/tools/ci_build/ci_build.sh ANDROID tensorflow/tools/ci_build/builds/android.sh
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 41 (23 by maintainers)
Commits related to this issue
- change android sdk and ndk root direcotry - bazel issue 714 workaround * https://github.com/bazelbuild/bazel/issues/714#issuecomment-166735874 — committed to jendap/tensorflow by jendap 9 years ago
- change android sdk and ndk root direcotry - bazel issue 714 workaround * https://github.com/bazelbuild/bazel/issues/714#issuecomment-166735874 — committed to jendap/tensorflow by jendap 9 years ago
- change android sdk and ndk root direcotry - bazel issue 714 workaround * https://github.com/bazelbuild/bazel/issues/714#issuecomment-166735874 — committed to jendap/tensorflow by jendap 9 years ago
- change android sdk and ndk root direcotry - bazel issue 714 workaround * https://github.com/bazelbuild/bazel/issues/714#issuecomment-166735874 — committed to jendap/tensorflow by jendap 9 years ago
- Add -fno-canonical-system-headers to CROSSTOOL files so that gcc doesn't resolve symlinks in .d files, which would confuse Blaze. Fixes #714. -- MOS_MIGRATED_REVID=111583801 — committed to bazelbuild/bazel by lberki 8 years ago
This should now be solved with --action_env
@damienmg I’m using CentOS 6.6. Well I got some help from my colleague who managed to compile bazel. The issue for us is each script is calling env python so every time my default environment is loaded instead of compile environment. He replaced the default python with his own wrapper which does sets the environment variables and calls python which was installed in non system default location.
file name is: tensorflow/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc First line in the script was #!/usr/bin/env python and replaced with #!/usr/bin/env python-wrapper python-wrapper is in tensorflow/ directory
Content of python-wrapper is: module load python/2.7.11 gcc/4.9.3 binutils cuda/7.5
export JAVA_HOME=/opt/java/default
export EXTRA_BAZEL_ARGS=“-s --verbose_failures --ignore_unsupported_sandboxing --genrule_strategy=standalone --spawn_strategy=standalone --jobs 1 --crosstool_top=//tools/cpp:toolchain --cpu=k8” #EXTRA_BAZEL_ARGS=“-s --verbose_failures --ignore_unsupported_sandboxing --genrule_strategy=standalone --spawn_strategy=standalone --jobs 8 --crosstool_top=//tools/cpp:toolchain --cpu=k8”
export PATH=/opt/bazel-0.3.0/output/:$PATH export PATH=/opt/pcre/8.39/bin:$PATH export LD_LIBRARY_PATH=/opt/pcre/8.39/lib:$LD_LIBRARY_PATH export PATH=/opt/swig/gcc/3.0.10/bin:$PATH export PATH=$PATH:/usr/bin
python “$@”