tensorflow: Tensorflow failed to compile
System information
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Arch Linux
- TensorFlow installed from (source or binary): Source from branch r1.7, did not compile
- TensorFlow version (use command below): 1.7.0
- Python version: 3.6.4
- Bazel version (if compiling from source): 0.12.0
- GCC/Compiler version (if compiling from source): 7.3.1
- CUDA/cuDNN version: N/A
- GPU model and memory: N/A
- Exact command to reproduce: ./configure && bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
Describe the problem
While compiling tensorflow build failed. I just pulled the latest commit(92e6c3e4f5c1cabfda1e61547a6a1b268ef95fa5) from the r1.7 branch. I also updated bazel (from 0.11.1 to 0.12.0) and some other programs(should be irrelevant to tensorflow) beforehand.
Source code / logs
`ERROR: /home/UserHome/.cache/bazel/_bazel_UserHome/ab33c8274551e1ea3125872a4c4e7db9/external/jpeg/BUILD:126:12: Illegal ambiguous match on configurable attribute “deps” in @jpeg//:jpeg: @jpeg//:k8 @jpeg//:armeabi-v7a Multiple matches are not allowed unless one is unambiguously more specialized. ERROR: Analysis of target ‘//tensorflow/tools/pip_package:build_pip_package’ failed; build aborted:
/home/UserHome/.cache/bazel/_bazel_UserHome/ab33c8274551e1ea3125872a4c4e7db9/external/jpeg/BUILD:126:12: Illegal ambiguous match on configurable attribute “deps” in @jpeg//:jpeg: @jpeg//:k8 @jpeg//:armeabi-v7a Multiple matches are not allowed unless one is unambiguously more specialized. INFO: Elapsed time: 1.086s FAILED: Build did NOT complete successfully (3 packages loaded)`
UPDATE: The r1.8 branch compiles successfully. The 1.8 branch might have a fix? Or perhaps a dependency was updated and that fixed it?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 22 (1 by maintainers)
I confirm that downgrading bazel from 0.12.0 to 0.11.1 fixes the exact error. To downgrade, the only way I found is
Copied and modified from this bazel thread.
A better fix whould be to cherry-pick 15bda92cdb12bceb7c96404a3abafeed1a416651.
Had similar issue building TF 1.7 with Bazel 0.12. Downgrading bazel to 0.11 seems to fix the issue
@dbkinghorn It does compile with the older bazel build, however since version 0.12.0 can compile branch r1.8 I still think this might be a tensorflow issue in the r1.7 branch.
I think this issue can be closed since #17508 has been merged to all branches and v1.7.1 contains the fix.
Getting back to Moocow9m’s issue. I just had the same problem. It was the bazel update from a couple of days ago. Try un-installing version 12 and get the 11.1 bazel deb file and install form that. I also had to add --action_env PATH=“$PATH” to keep it from forgetting where Python was (I’m using Anaconda3)
I also have the following cuda.conf in ld.so.conf.d /usr/local/cuda/lib64 /usr/local/cuda/extras/CUPTI/lib64 /usr/local/cuda/targets/x86_64-linux/lib/stubs