tensorflow: build issue: invalid paths

System information

Linux ubuntu 16.04 Bazel 0.9.0 CUDA 9.1 cuDNN 7 TF Branch r1.4

I am getting the following errors / warnings using the set-up above, whilst trying to build the python packages.

francesco@franny:~/Repositories/tensorflow$ git checkout r1.4
Branch 'r1.4' set up to track remote branch 'r1.4' from 'origin'.
Switched to a new branch 'r1.4'
francesco@franny:~/Repositories/tensorflow$ ./configure 
Extracting Bazel installation...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/home/francesco/.cache/bazel/_bazel_francesco/install/754ae0b065b3dfe883541ff567ae8b5e/_embedded_binaries/A-server.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
You have bazel 0.9.0 installed.
Please specify the location of python. [Default is /usr/bin/python]: 


Found possible Python library paths:
  /usr/local/lib/python2.7/dist-packages
  /usr/lib/python2.7/dist-packages
Please input the desired Python library path to use.  Default is [/usr/local/lib/python2.7/dist-packages]

Do you wish to build TensorFlow with jemalloc as malloc support? [Y/n]: n
No jemalloc as malloc support will be enabled for TensorFlow.

Do you wish to build TensorFlow with Google Cloud Platform support? [Y/n]: n
No Google Cloud Platform support will be enabled for TensorFlow.

Do you wish to build TensorFlow with Hadoop File System support? [Y/n]: n
No Hadoop File System support will be enabled for TensorFlow.

Do you wish to build TensorFlow with Amazon S3 File System support? [Y/n]: n
No Amazon S3 File System support will be enabled for TensorFlow.

Do you wish to build TensorFlow with XLA JIT support? [y/N]: n
No XLA JIT support will be enabled for TensorFlow.

Do you wish to build TensorFlow with GDR support? [y/N]: n
No GDR support will be enabled for TensorFlow.

Do you wish to build TensorFlow with VERBS support? [y/N]: n
No VERBS support will be enabled for TensorFlow.

Do you wish to build TensorFlow with OpenCL support? [y/N]: n
No OpenCL support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: y
CUDA support will be enabled for TensorFlow.

Please specify the CUDA SDK version you want to use, e.g. 7.0. [Leave empty to default to CUDA 8.0]: 9.1


Please specify the location where CUDA 9.1 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: 


Please specify the cuDNN version you want to use. [Leave empty to default to cuDNN 6.0]: 7


Please specify the location where cuDNN 7 library is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:


Please specify a list of comma-separated Cuda compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus.
Please note that each additional compute capability significantly increases your build time and binary size. [Default is: 3.5,5.2]5.2


Do you want to use clang as CUDA compiler? [y/N]: n
nvcc will be used as CUDA compiler.

Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]: 


Do you wish to build TensorFlow with MPI support? [y/N]: n
No MPI support will be enabled for TensorFlow.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native]: 


Add "--config=mkl" to your bazel command to build with MKL support.
Please note that MKL on MacOS or windows is still not supported.
If you would like to use a local MKL instead of downloading, please set the environment variable "TF_MKL_ROOT" every time before build.
Configuration finished
francesco@franny:~/Repositories/tensorflow$

francesco@franny:~/Repositories/tensorflow$ bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
.........
ERROR: /home/francesco/.cache/bazel/_bazel_francesco/4ce2bc3731d0d87739dc505f1772132b/external/local_config_sycl/sycl/BUILD:4:1: First argument of 'load' must be a label and start with either '//', ':', or '@'. Use --incompatible_load_argument_is_label=false to temporarily disable this check.
ERROR: /home/francesco/.cache/bazel/_bazel_francesco/4ce2bc3731d0d87739dc505f1772132b/external/local_config_sycl/sycl/BUILD:6:1: First argument of 'load' must be a label and start with either '//', ':', or '@'. Use --incompatible_load_argument_is_label=false to temporarily disable this check.
ERROR: /home/francesco/.cache/bazel/_bazel_francesco/4ce2bc3731d0d87739dc505f1772132b/external/local_config_sycl/sycl/BUILD:30:9: Traceback (most recent call last):
	File "/home/francesco/.cache/bazel/_bazel_francesco/4ce2bc3731d0d87739dc505f1772132b/external/local_config_sycl/sycl/BUILD", line 27
		cc_library(name = "syclrt", srcs = [sycl_libr...")], <3 more arguments>)
	File "/home/francesco/.cache/bazel/_bazel_francesco/4ce2bc3731d0d87739dc505f1772132b/external/local_config_sycl/sycl/BUILD", line 30, in cc_library
		sycl_library_path
name 'sycl_library_path' is not defined
ERROR: /home/francesco/.cache/bazel/_bazel_francesco/4ce2bc3731d0d87739dc505f1772132b/external/local_config_sycl/sycl/BUILD:39:1: Target '@local_config_sycl//sycl:using_sycl' contains an error and its package is in error and referenced by '@local_config_sycl//sycl:sycl'
ERROR: /home/francesco/Repositories/tensorflow/third_party/eigen3/BUILD:20:1: Target '@local_config_sycl//sycl:sycl' contains an error and its package is in error and referenced by '//third_party/eigen3:eigen3'
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: Loading failed
INFO: Elapsed time: 13.322s
FAILED: Build did NOT complete successfully (93 packages loaded)
    currently loading: tensorflow/core/kernels ... (2 packages)

Any help?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 28 (6 by maintainers)

Commits related to this issue

Most upvoted comments

I was having a similar problem on Ubuntu 16.04, Bazel 0.9.0. Ended up fixing it by adding “--incompatible_load_argument_is_label=false” option to the build command as suggested in the error message. So on my system the entire build command on was,

bazel build --config=opt --config=cuda --config=mkl --incompatible_load_argument_is_label=false //tensorflow/tools/pip_package:build_pip_package

The build completed successfully after that. You may want to remove the “--config=mkl” option (or check out this repository if you are interested in building with Math Kernal Library as well)

Hello, I experienced the same issue as OP and I believe this is a conflict with Bazel version 0.9.

My setup:

  • Have I written custom code: No
  • OS Platform and Distribution: Linux Ubuntu 16.04
  • TensorFlow installed from: Source
  • TensorFlow version 1.4.1
  • Bazel version: 0.9.0
  • CUDA/cuDNN version 9.0 / 7.0.3
  • GPU model and memory: Titan X (12 GB)
  • Exact command to reproduce: bazel build -c opt --copt=-mfpmath=both --copt=-msse4.2 --config=cuda -k //tensorflow/tools/pip_package:build_pip_package

I noticed that I recently upgraded Bazel to 0.9 and that OP was also using Bazel 0.9. Problem resolved after downgrading Bazel to 0.8.1.

ERROR: Unrecognized option: --incompatible_load_argument_is_label=false

Hit the same problem yesterday (building r1.4), after adding --incompatible_load_argument_is_label=false the compilation finished successfully.

I would expect that doing a default build of TF by following the official guide from TF webpage should go smoothly without any errors and needs for weird workarounds.

Same here…can someone please add an “awaiting tensorflower” tag?

I just ran into this yesterday, so yes, it’s still an issue.

In the fix posted above, I deleted my bazel cache. I didn’t mention this because I didn’t think it was a necessary step. But it appears your errors are caused by files in the cache. I would check that these files have existed since before you rolled back Bazel and if so, I would delete the whole cache.

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. Have I written custom code OS Platform and Distribution TensorFlow installed from TensorFlow version Bazel version CUDA/cuDNN version GPU model and memory Exact command to reproduce