Skip to content

Failed to bazel build when executing label_image example  #382

Closed

Description

@trungdn

When I run the root@795c87fec335:/tensorflow# bazel build tensorflow/examples/label_image/...
It shows the ERRORs

ERROR: /tensorflow/tensorflow/core/BUILD:210:1: C++ compilation of rule '//tensorflow/core:kernels' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -iquote . -iquote ... (remaining 47 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
INFO: Elapsed time: 91.739s, Critical Path: 73.71s

Activity

  1. vrv commented on Dec 1, 2015

    @vrv

    Try building with --verbose_failures so we can more easily help

  2. trungdn commented on Dec 4, 2015

    @trungdn
    Author

    I'm running on docker.

    ERROR: /tensorflow/tensorflow/examples/label_image/BUILD:8:1: C++ compilation of rule '//tensorflow/examples/label_image:label_image' failed: gcc failed: error executing command
    (cd /root/.cache/bazel/bazel_root/68a62076e91007a7908bc42a32e4cff9/tensorflow &&
    exec env -
    INTERCEPT_LOCALLY_EXECUTABLE=1
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -iquote . -iquote bazel-out/local_linux-fastbuild/genfiles -isystem google/protobuf/src -isystem bazel-out/local_linux-fastbuild/genfiles/google/protobuf/src -isystem tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-fastbuild/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-fastbuild/genfiles/external/png_archive/libpng-1.2.53 -isystem external/re2 -isystem bazel-out/local_linux-fastbuild/genfiles/external/re2 -isystem third_party/gpus/cuda -isystem bazel-out/local_linux-fastbuild/genfiles/third_party/gpus/cuda -isystem third_party/gpus/cuda/include -isystem bazel-out/local_linux-fastbuild/genfiles/third_party/gpus/cuda/include -isystem third_party/eigen3 -isystem bazel-out/local_linux-fastbuild/genfiles/third_party/eigen3 -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE
    _="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_linux-fastbuild/bin/tensorflow/examples/label_image/objs/label_image/tensorflow/examples/label_image/main.pic.o' -MD -MF bazel-out/local_linux-fastbuild/bin/tensorflow/examples/label_image/objs/label_image/tensorflow/examples/label_image/main.pic.d -fPIC -c tensorflow/examples/label_image/main.cc -o bazel-out/local_linux-fastbuild/bin/tensorflow/examples/label_image/objs/label_image/tensorflow/examples/label_image/main.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: gcc failed: error executing command
    (cd /root/.cache/bazel/bazel_root/68a62076e91007a7908bc42a32e4cff9/tensorflow &&
    exec env -
    INTERCEPT_LOCALLY_EXECUTABLE=1
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -iquote . -iquote bazel-out/local_linux-fastbuild/genfiles -isystem google/protobuf/src -isystem bazel-out/local_linux-fastbuild/genfiles/google/protobuf/src -isystem tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-fastbuild/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-fastbuild/genfiles/external/png_archive/libpng-1.2.53 -isystem external/re2 -isystem bazel-out/local_linux-fastbuild/genfiles/external/re2 -isystem third_party/gpus/cuda -isystem bazel-out/local_linux-fastbuild/genfiles/third_party/gpus/cuda -isystem third_party/gpus/cuda/include -isystem bazel-out/local_linux-fastbuild/genfiles/third_party/gpus/cuda/include -isystem third_party/eigen3 -isystem bazel-out/local_linux-fastbuild/genfiles/third_party/eigen3 -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE
    ="redacted"' '-D__TIMESTAMP
    ="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_linux-fastbuild/bin/tensorflow/examples/label_image/_objs/label_image/tensorflow/examples/label_image/main.pic.o' -MD -MF bazel-out/local_linux-fastbuild/bin/tensorflow/examples/label_image/_objs/label_image/tensorflow/examples/label_image/main.pic.d -fPIC -c tensorflow/examples/label_image/main.cc -o bazel-out/local_linux-fastbuild/bin/tensorflow/examples/label_image/_objs/label_image/tensorflow/examples/label_image/main.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
    INFO: Elapsed time: 41.853s, Critical Path: 18.42s

  3. vrv commented on Dec 7, 2015

    @vrv

    Sorry for dropping this -- I can't really see why gcc is failing to execute the command.

    @davidzchen, any ideas what else we should ask our users to pass to bazel to help debug these kind of failures?

  4. trungdn commented on Dec 8, 2015

    @trungdn
    Author

    Thank you so much for your help!
    Previous error was mem exhausted. I swap mem but it doesn't help. Still failed with gcc

  5. davidzchen commented on Dec 14, 2015

    @davidzchen
    Contributor

    Sorry for the delay.

    It is not clear to me why the command is failing from looking at the error message. @hanwen, @damienmg - how can we get more info about why this command is failing?

  6. damienmg commented on Dec 15, 2015

    @damienmg
    Contributor

    Having the full output instead of just a snippet might help.

  7. vrv commented on Dec 23, 2015

    @vrv

    Closing out stale-bug queue -- post more information if you're still having problems and we'll re-open

  8. 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

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