Skip to content

Build fails for certain GCC paths #12106

@reith

Description

@reith

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
    Yes
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
    Linux Ubuntu 17.04
  • TensorFlow installed from (source or binary):
    Source
  • TensorFlow version (use command below):
    1.3-rc2
  • Python version:
    2.7
  • Bazel version (if compiling from source):
    5.2
  • CUDA/cuDNN version:
    8.0 / 5.1.10
  • GPU model and memory:
    Nvidia GTX 1080 Ti
  • Exact command to reproduce:
    bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package --verbose_failures --spawn_strategy=standalone

Describe the problem

Build will fail if compiler is not located in specific paths (like /usr/bin). Also will happen by compiling with a symbolic link to compiler if the link reside there.

Steps to reproduce
Make a symbolic link to GCC and store it somewhere like /etc/gcc. run ./configure and set compiler path to /etc/gcc then run bazel build. This is probably why builds failing on certain many Linux distributions and is related to issues like #3550 and many other abandoned ones.

Source code / logs

$ bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package --verbose_failures --spawn_strategy=standalone

WARNING: /opt/tensorflow-1.3.0-rc2/tensorflow/contrib/learn/BUILD:15:1: in py_library rule //tensorflow/contrib/learn:learn: target '//tensorflow/contrib/learn:learn' depends on deprecated target '//tensorflow/contrib/session_bundle:exporter': No longer supported. Switch to SavedModel immediately.
WARNING: /opt/tensorflow-1.3.0-rc2/tensorflow/contrib/learn/BUILD:15:1: in py_library rule //tensorflow/contrib/learn:learn: target '//tensorflow/contrib/learn:learn' depends on deprecated target '//tensorflow/contrib/session_bundle:gc': No longer supported. Switch to SavedModel immediately.
INFO: Found 1 target...
ERROR: /root/.cache/bazel/_bazel_root/84ac956a7b3384a65a68aa2a845ef1a1/external/lmdb/BUILD.bazel:8:1: C++ compilation of rule '@lmdb//:lmdb' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command
  (cd /root/.cache/bazel/_bazel_root/84ac956a7b3384a65a68aa2a845ef1a1/execroot/org_tensorflow && \
  exec env - \
    CUDA_TOOLKIT_PATH=/opt/tensorflow-1.3.0-rc2/cuda-plat-sym \
    CUDNN_INSTALL_PATH=/opt/tensorflow-1.3.0-rc2/cuda-plat-sym \
    GCC_HOST_COMPILER_PATH=/etc/some-gcc \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/usr/bin/python \
    PYTHON_LIB_PATH=/usr/local/lib/python2.7/dist-packages \
    TF_CUDA_CLANG=0 \
    TF_CUDA_COMPUTE_CAPABILITIES=3.5,5.2 \
    TF_CUDA_VERSION=8.0 \
    TF_CUDNN_VERSION=5.1.10 \
    TF_NEED_CUDA=1 \
    TF_NEED_OPENCL=0 \
  external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-march=native' -MD -MF bazel-out/local_linux-opt/bin/external/lmdb/_objs/lmdb/external/lmdb/mdb.pic.d -fPIC -iquote external/lmdb -iquote bazel-out/local_linux-opt/genfiles/external/lmdb -iquote external/bazel_tools -iquote bazel-out/local_linux-opt/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 -w -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers -c external/lmdb/mdb.c -o bazel-out/local_linux-opt/bin/external/lmdb/_objs/lmdb/external/lmdb/mdb.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
some-gcc: error trying to exec 'cc1': execvp: No such file or directory
Target //tensorflow/tools/pip_package:build_pip_package failed to build

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions