tensorflow: Can't configure due to undeclared packages inside if_android/if_ios
I am having trouble configuring the latest master branch (dbe7ee0dfa9e5ab26284522379f2747510fc267b). When I run ./configure
, I get:
ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:107:1: no such target '//tensorflow/core:android_lib_lite': target 'android_lib_lite' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:session_bundle'.
ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:213:1: no such target '//tensorflow/core:android_lib_lite': target 'android_lib_lite' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:signature'.
ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:107:1: no such target '//tensorflow/core:meta_graph_portable_proto': target 'meta_graph_portable_proto' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:session_bundle'.
ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:213:1: no such target '//tensorflow/core:meta_graph_portable_proto': target 'meta_graph_portable_proto' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:signature'.
ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:213:1: no such target '//tensorflow/core:meta_graph_portable_proto': target 'meta_graph_portable_proto' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:signature'.
ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:107:1: no such target '//tensorflow/core:meta_graph_portable_proto': target 'meta_graph_portable_proto' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:session_bundle'.
ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:107:1: no such target '//tensorflow/core:android_lib_lite': target 'android_lib_lite' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:session_bundle'.
ERROR: Evaluation of query "deps((//... union @bazel_tools//tools/jdk:toolchain))" failed: errors were encountered while computing transitive closure.
Configuration finished
To summarize, the dependencies that are included inside the if_android
and if_ios
are not found. They don’t exist in the repository, so that is not that surprising. What is more surprising though is that my vanilla installation is not returning empty lists when if_android
is called. I haven’t looked into how those functions work, so not sure why that is happening.
Environment info
Setup: CentOS, Bazel 0.3.1, CUDA 7.5, CuDNN 5.1, Tensorflow master (dbe7ee0dfa9e5ab26284522379f2747510fc267b)
I run configure
and set it up for GPU support. Actually, I don’t think this is criticial, but first I had to open up configure
and add --output_base=...
on the two calls to bazel
, since my setup requires a custom cache directory.
Fix
The if_...
lines were added in ed87884e50e1a50f7dc7b36dc7a7ff225442bee0, so a fix that I know works is to use its parent commit 7705791619f5e851687e9a63b4315087e189f8be.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 5
- Comments: 29 (18 by maintainers)
You don’t need to remove them from the call to
load
at the top of the file, but instead each time they are used, like this:No, it doesn’t seem entirely solved. The configuration fails in my environment due to the following two targets:
ios_tensorflow_test_lib
target fromtensorflow/core/BUILD
android_tensorflow_kernels_no_rtti_lite_runtime
target fromtensorflow/core/kernels/BUILD
However I am now able to build the project despite configuration errors, whereas I was not able to do so before commit f66b491.
Commenting out the targets enables the configuration to complete without errors.
@msevrens https://hackathonprojects.wordpress.com/2016/09/13/installing-10-series-gpus-cuda-8-0rc-and-tensorflow-on-ubuntu-14-04/ here is a post describing the comments if you’re still having trouble
@tmulc18 you should fix that link 😃
Just to clarify @Eidosper’s comment: the suggestion is to use an official TF release (e.g. tagged v0.10.0rc0). This is not a solution for anyone that needs the current state of TF development (i.e. the newest commit of the master branch).
I fixed the issue according to @ibab and @woodshop advice as well.
However, I also commented out
copts = if_ios(["-DGOOGLE_LOGGING"]),
and any if_ios conditions, which was seen invalid when I was configuring. Thank you!I had the same issue too. Following @ibab @woodshop suggestions solved this problem. I think
configure
need an option to decide target environment.Confirmed that if I make these changes to the following three files
configure
runs without error:if_mobile
andif_android
conditions fromtensorflow/contrib/session_bundle/BUILD
ios_tensorflow_test_lib
target fromtensorflow/core/BUILD
android_tensorflow_kernels_no_rtti_lite_runtime
target fromtensorflow/core/kernels/BUILD