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)

Most upvoted comments

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:

cc_library(
    name = "session_bundle",
    srcs = ["session_bundle.cc"],
    hdrs = ["session_bundle.h"],
    copts = if_ios(["-DGOOGLE_LOGGING"]),
    visibility = ["//visibility:public"],
    deps = [
        ":signature",
    ] + if_not_mobile([
        ":manifest_proto_cc",
        "//tensorflow/core:core_cpu",
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//tensorflow/core:protos_all_cc",
    ]) #+ if_mobile([
    #    ":manifest_portable_proto",
    #    "//tensorflow/core:meta_graph_portable_proto",
    #]) + if_android([
    #    "//tensorflow/core:android_lib_lite",
    #]) + if_ios([
    #    "//tensorflow/core:ios_tensorflow_lib",
    #]),
)

No, it doesn’t seem entirely solved. The configuration fails in my environment due to the following two targets:

  • The ios_tensorflow_test_lib target from tensorflow/core/BUILD
  • The android_tensorflow_kernels_no_rtti_lite_runtime target from tensorflow/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.

@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:

  • Remove all if_mobile and if_android conditions from tensorflow/contrib/session_bundle/BUILD
  • Remove the ios_tensorflow_test_lib target from tensorflow/core/BUILD
  • Remove the android_tensorflow_kernels_no_rtti_lite_runtime target from tensorflow/core/kernels/BUILD