tensorflow: ERROR: no such package '@local_config_cuda//crosstool': BUILD file not found on package path.

Environment info

Operating System: OS 10.10.5

Installed version of CUDA and cuDNN:

$ ls -l /usr/local/cuda/lib/libcud*
-rwxr-xr-x  1 root           wheel      8280 Apr 13 01:02 /usr/local/cuda/lib/libcuda.dylib
lrwxr-xr-x  1 root           wheel        45 Apr 13 01:03 /usr/local/cuda/lib/libcudadevrt.a -> /Developer/NVIDIA/CUDA-7.5/lib/libcudadevrt.a
lrwxr-xr-x  1 root           wheel        50 Apr 13 01:03 /usr/local/cuda/lib/libcudart.7.5.dylib -> /Developer/NVIDIA/CUDA-7.5/lib/libcudart.7.5.dylib
lrwxr-xr-x  1 root           wheel        46 Apr 13 01:03 /usr/local/cuda/lib/libcudart.dylib -> /Developer/NVIDIA/CUDA-7.5/lib/libcudart.dylib
lrwxr-xr-x  1 root           wheel        49 Apr 13 01:03 /usr/local/cuda/lib/libcudart_static.a -> /Developer/NVIDIA/CUDA-7.5/lib/libcudart_static.a
-rwxr-xr-x@ 1 production204  staff  60108616 Feb  8  2016 /usr/local/cuda/lib/libcudnn.4.dylib
lrwxr-xr-x  1 root           admin        47 Aug 29 18:08 /usr/local/cuda/lib/libcudnn.5.dylib -> /Developer/NVIDIA/CUDA-7.5/lib/libcudnn.5.dylib
lrwxr-xr-x  1 root           admin        45 Aug 29 18:08 /usr/local/cuda/lib/libcudnn.dylib -> /Developer/NVIDIA/CUDA-7.5/lib/libcudnn.dylib
-rw-r--r--@ 1 production204  staff  59311504 Feb  8  2016 /usr/local/cuda/lib/libcudnn_static.a
  1. The output from python -c "import tensorflow; print(tensorflow.__version__)". (can’t get that far, but i’m using 0.10)
>>> import tensorflow
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.dylib locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.dylib locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.dylib locally
Segmentation fault: 11

If installed from source, provide

  1. The commit hash (git rev-parse HEAD)
4c49dbebef05442c7e72d6129a30574fcd13f0e1
  1. The output of bazel version
$ bazel version
Build label: 0.3.1-homebrew
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Aug 4 09:59:58 2016 (1470304798)
Build timestamp: 1470304798
Build timestamp as int: 1470304798

If possible, provide a minimal reproducible example (We usually don’t have time to read hundreds of lines of your code)

$ bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
ERROR: no such package '@local_config_cuda//crosstool': BUILD file not found on package path.
ERROR: no such package '@local_config_cuda//crosstool': BUILD file not found on package path.
INFO: Elapsed time: 0.076s

What other attempted solutions have you tried?

  • Downgrading to cuDNN4, switching between 4 and 5
  • Re-installing bazel
  • Modifying CROSSTOOL file according to various threads
  • Manually linking CUDA libraries during ./configure to not use symlinked libraries
  • Various other hacks over the last week 😭

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 74 (28 by maintainers)

Commits related to this issue

Most upvoted comments

@anirudh2290 which version of bazel are you using ? I’ve got the same error with this commit and after: bazelbuild/bazel@0d32fc88d6d179bedef4a04bc22c44583365b859 0.3.1 should be fine.

I’ve solved the same problem by putting bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package into the last line of configure. Looks like bazel configuration does not complete on bazel fetch //... in some cases. source configure before running bazer build ... might work too.

I’ve found I can induce this by Ctrl-C’ing in the middle of a fresh bazel build.