Skip to content

//tensorflow:libtensorflow.so target won't build #4279

Closed

Description

@hillegass

Trying to build libtensorflow.so from source on a Mac using Bazel 3.1, I get an error. Log is attached below.

Environment info

Operating System: MacOS X 10.11.6, Xcode 7.3.1

Installed version of CUDA and cuDNN:
No CUDA

If installed from source, provide

  1. The commit hash (git rev-parse HEAD)
2a6d7511f13a0387857081f1cf64d282d2816a62
  1. The output of bazel version

    Build label: 0.3.1
    Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
    Build time: Fri Jul 29 09:05:18 2016 (1469783118)
    Build timestamp: 1469783118
    Build timestamp as int: 1469783118

Build log

$ bazel build //tensorflow:libtensorflow.so
Extracting Bazel installation...
Sending SIGTERM to previous Bazel server (pid=8488)... done.
.
ERROR: /Users/Projects/tensorflow/tensorflow/core/BUILD:942:1: no such target '//tensorflow/tools/git:gen/spec.json': target 'gen/spec.json' not declared in package 'tensorflow/tools/git' defined by /Users/Projects/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: /Users/Projects/tensorflow/tensorflow/core/BUILD:942:1: no such target '//tensorflow/tools/git:gen/head': target 'gen/head' not declared in package 'tensorflow/tools/git' defined by /Users/Projects/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: /Users/Projects/tensorflow/tensorflow/core/BUILD:942:1: no such target '//tensorflow/tools/git:gen/branch_ref': target 'gen/branch_ref' not declared in package 'tensorflow/tools/git' defined by /Users/Projects/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: Analysis of target '//tensorflow:libtensorflow.so' failed; build aborted.
INFO: Elapsed time: 5.724s

Activity

  1. aselle commented on Sep 9, 2016

    @aselle
    Contributor

    It looks like you haven't run ./configure.

  2. added
    stat:awaiting response
    on Sep 9, 2016
  3. hillegass commented on Sep 9, 2016

    @hillegass
    Author

    Ugh. I'm an idiot. (I had run configure, but then I did pull to update my copy of the repository.) I'm so sorry.

  4. petewarden commented on Sep 14, 2016

    @petewarden
    Contributor

    @aselle Any chance we can add an error message mentioning ./configure here? We used to have a helpful prompt for idiots like me who forgot to run it, but I'm not sure where it went. I'm betting that would save quite a few engineer-hours for all our users. :)

  5. aselle commented on Sep 14, 2016

    @aselle
    Contributor

    Do you know of an easy way to accomplish this in Bazel? We could always make a dependent filename "please_rerun_configure" but that is unintuitive to the uninitiated (and smells of the pre C++11 template static_assert technique). Filed bug for that #4386.

  6. DimanNe commented on Jun 21, 2017

    @DimanNe

    Can anybody add that I have to run ./configure here?

  7. self-assigned this
    on Jun 21, 2017
  8. aselle commented on Jun 21, 2017

    @aselle
    Contributor

    I'll do that.

  9. added
    stat:awaiting tensorflower
    and removed
    stat:awaiting response
    on Jun 21, 2017
  10. added a commit that references this issue on Jun 28, 2017
    cf7c008
  11. RohitDulam commented on Jul 4, 2017

    @RohitDulam

    I'm having the same issue, (gen/spec.json not declared in package) but I'm using Windows 10, so how do I run ./configure on windows? Or is there any other solution for the issue? This is my issue. #11279

  12. added a commit that references this issue on Jul 15, 2017
    7b18867
  13. mozi22 commented on Jul 15, 2017

    @mozi22

    Hi, I am using Ubuntu 14.04. I tried to follow the instructions from here but i get an error saying

    ERROR: no such target '//tensorflow:libtensorflow_all.so': target 'libtensorflow_all.so' not declared in package 'tensorflow' (did you mean 'libtensorflow_cc.so'?) defined by /home/muazzam/mywork/python/tensorflow/tensorflow/BUILD. INFO: Elapsed time: 0.047s

    This error occurs when I use the following command from the cjweeks/tensorflow repository documentation bazel build tensorflow:libtensorflow_all.so

    anybody has any clues ?

  14. qiaohaijun commented on Jan 5, 2018

    @qiaohaijun
    Contributor

    I forgot exec ./configure

  15. Tomhouxin commented on Aug 1, 2018

    @Tomhouxin

    @mozi22 I ran into the same problem as you, and I executed./configure, how do you solve it, thank you

  16. Htiango commented on Aug 8, 2018

    @Htiango

    @Tomhouxin did you solve it? I did the execution and still met the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

stat:awaiting tensorflower

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions