Skip to content

Failed to bazel build when executing label_image example  #381

Closed

Description

@trungdn

When I build bazel it shows this ERROR

root@ee32ec72b8cb:/tensorflow/tensorflow/examples/label_image# bazel build tensorflow/tensorflow/examples/label_image/...
INFO: Reading 'startup' options from /root/.bazelrc: --batch
ERROR: no targets found beneath 'tensorflow/examples/label_image/tensorflow/tensorflow/examples/label_image'.
INFO: Elapsed time: 0.771s

I try to run bazel fetch//
It shows BUILD file have ERRORs

ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:1:3: invalid character: '!'.
ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:8:118: invalid character: '!'.
ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:8:243: invalid character: '!'.
ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:8:256: invalid character: '!'.
.....

Activity

  1. vrv commented on Dec 1, 2015

    @vrv

    Try cd to the root tensorflow directory and then do bazel build tensorflow/examples/label_image/... ?

  2. trungdn commented on Dec 1, 2015

    @trungdn
    Author
  3. vrv commented on Dec 1, 2015

    @vrv

    We need to see your exact command lines and the directory you're trying to run from, etc.

  4. trungdn commented on Dec 1, 2015

    @trungdn
    Author

    I'm running on tensorflow directory. Already download and extracted inception5h.zip on /label_image/data

    root@ee32ec72b8cb:/tensorflow# bazel build tensorflow/tensorflow/examples/label_image/...

    INFO: Reading 'startup' options from /root/.bazelrc: --batch
    ERROR: no targets found beneath 'tensorflow/tensorflow/examples/label_image'.

  5. vrv commented on Dec 1, 2015

    @vrv

    try bazel build tensorflow/examples/label_image/.... you have an extra 'tensorflow' in your version.

  6. trungdn commented on Dec 1, 2015

    @trungdn
    Author

    Right now it shows the ERRORs as I mentioned from the beginning. BUILD error. The BUILD is default file on lable_image directory

    ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:1:3: invalid character: '!'.
    ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:8:118: invalid character: '!'.
    ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:8:243: invalid character: '!'.
    ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:8:256: invalid character: '!'.
    ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:8:381: invalid character: '!'.
    ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:8:394: invalid character: '!'.
    ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:8:516: invalid character: '!'.
    ...
    ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:51:91: invalid base-10 integer constant: 10737418240.
    ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:51:1002: invalid character: '!'.
    ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:51:1118: invalid character: '&'.
    ...
    ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:120:13181: contains syntax error(s).
    ERROR: no such package 'tensorflow/examples/label_image': Package 'tensorflow/examples/label_image' contains errors.

  7. vrv commented on Dec 1, 2015

    @vrv

    It looks like your BUILD file is corrupted -- those characters are not in the BUILD file that I can see.

    try cat tensorflow/examples/label_image/BUILD to make sure it matches https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/label_image/BUILD

  8. trungdn commented on Dec 1, 2015

    @trungdn
    Author

    No it's not matching.

    I'm using this function to download this file. Do u think it might be the problems. And how I can download this file on my directory. Thanks
    wget https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/label_image/BUILD

  9. vrv commented on Dec 1, 2015

    @vrv

    You need to use git to clone the project, and then the files will be available as expected. The following link might be helpful: https://www.udacity.com/course/how-to-use-git-and-github--ud775 -- Let us know if we can be of any further help.

  10. added a commit that references this issue on Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions