Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm-linux-androideabi-gcc: internal compiler error: Killed (program cc1plus) #7723

Closed
daj opened this issue Feb 21, 2017 · 5 comments
Closed
Labels
stat:awaiting response Status - Awaiting response from author

Comments

@daj
Copy link
Contributor

daj commented Feb 21, 2017

I'm trying to create a Docker image which has all the dependencies required to build the TensorFlow Android demo app from source (including the Android SDK, NDK and build tools).

I'm simply starting with gcr.io/tensorflow/tensorflow:latest-devel and then adding the Android dependencies on top. This lists all the steps I've done so far:
https://medium.com/@daj/docker-image-for-building-tensorflow-android-demo-app-97c98ce37d9e#.y0kwcx63j

Unfortunately I keep hitting this error:

ERROR: /tensorflow/tensorflow/core/kernels/BUILD:3749:1: C++ compilation of rule '//tensorflow/core/kernels:android_tensorflow_kernels' failed: arm-linux-androideabi-gcc failed: error executing command external/androidndk/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -fstack-protector-strong -fpic -ffunction-sections -funwind-tables ... (remaining 71 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 4.
arm-linux-androideabi-gcc: internal compiler error: Killed (program cc1plus)

What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?

These GitHub issues had similar titles, but the details looked a bit different:
https://github.com/tensorflow/tensorflow/issues?q=is%3Aissue+BadExitStatusException+Process+exited+with+status+4++cc1plus+is%3Aopen

Environment info

Operating System: Docker version 1.13.1, build 092cba3 (running inside Mac OS X, I tried on both El Capitan and Sierra with the same results)

# git rev-parse HEAD
07bb8ea2379bd459832b23951fb20ec47f3fdbd4

# bazel version
INFO: Reading 'startup' options from /root/.bazelrc: --batch
Build label: 0.4.2
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Dec 7 18:47:11 2016 (1481136431)
Build timestamp: 1481136431
Build timestamp as int: 1481136431

If possible, provide a minimal reproducible example (We usually don't have time to read hundreds of lines of your code)

I've pushed my Docker image (after hitting the build error) to a public location, so you should be able to pull it and then run the build:

docker pull danjarvis/tensorflow-android:1.0.0
docker run -it danjarvis/tensorflow-android:1.0.0
cd /tensorflow
bazel build -c opt //tensorflow/examples/android:tensorflow_demo

What other attempted solutions have you tried?

  • I tried on two different laptops.
  • I built my Docker image again following my own instructions and saw the same error.

Logs or other output that would be helpful

Normal build (without the --verbose_failures option - scroll down for the --verbose_failures, I've included that too):

# bazel build -c opt //tensorflow/examples/android:tensorflow_demo
INFO: Reading 'startup' options from /root/.bazelrc: --batch
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.build/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:avgpooling_op.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:bounds_check.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:cwise_ops.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:cwise_ops_common.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:cwise_ops_gradients.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_activations.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_attention.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_backward_cuboid_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_backward_spatial_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_cuboid_convolution.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_patch_3d.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_pooling.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_softmax.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_spatial_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:fifo_queue.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:maxpooling_op.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:ops_util.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:ops_util.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:padding_fifo_queue.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:pooling_ops_common.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:pooling_ops_common.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:queue_base.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:queue_op.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:typed_queue.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_entry.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_scorer.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_search.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_decoder.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_loss_util.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:naming.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:naming.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:tensor_bundle.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:tensor_bundle.h' directly. You should either move the file to this package or depend on an appropriate rule there.
INFO: Found 1 target...
INFO: From Compiling external/protobuf/src/google/protobuf/io/coded_stream.cc:
external/protobuf/src/google/protobuf/io/coded_stream.cc: In member function 'google::protobuf::int64 google::protobuf::io::CodedInputStream::ReadVarint32Fallback(google::protobuf::uint32)':
external/protobuf/src/google/protobuf/io/coded_stream.cc:445:12: warning: 'temp' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return temp;
            ^
INFO: From Processing Android resources for //tensorflow/examples/android:tensorflow_demo:
Feb 21, 2017 2:50:45 AM com.google.devtools.build.android.AndroidDataMerger doMerge
WARNING: 
CONFLICT: asset:WORKSPACE is provided with ambiguous priority from:
	external/mobile_multibox/WORKSPACE
	external/inception5h/WORKSPACE
CONFLICT: asset:WORKSPACE is provided with ambiguous priority from:
	external/stylize/WORKSPACE
	external/mobile_multibox/WORKSPACE
INFO: From ProtoCompile tensorflow/examples/android/proto/box_coder.pb.cc:
bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile tensorflow/core/example/example.pb.cc:
bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile tensorflow/core/example/example.pb.cc [for host]:
bazel-out/host/genfiles/external/protobuf/src: warning: directory does not exist.
ERROR: /tensorflow/tensorflow/core/kernels/BUILD:3749:1: C++ compilation of rule '//tensorflow/core/kernels:android_tensorflow_kernels' failed: arm-linux-androideabi-gcc failed: error executing command external/androidndk/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -fstack-protector-strong -fpic -ffunction-sections -funwind-tables ... (remaining 71 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 4.
arm-linux-androideabi-gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
Target //tensorflow/examples/android:tensorflow_demo failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1527.289s, Critical Path: 1501.49s

Here's the result with the --verbose_failures option set:

# bazel --verbose_failures build -c opt //tensorflow/examples/android:tensorflow_demo
INFO: Reading 'startup' options from /root/.bazelrc: --batch
Unknown Bazel startup option: '--verbose_failures'.
  For more info, run 'Bazel help startup_options'.
root@a80d6a5002cd:/tensorflow# bazel build -c opt --verbose_failures //tensorflow/examples/android:tensorflow_demo
INFO: Reading 'startup' options from /root/.bazelrc: --batch
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.build/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:avgpooling_op.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:bounds_check.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:cwise_ops.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:cwise_ops_common.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:cwise_ops_gradients.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_activations.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_attention.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_backward_cuboid_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_backward_spatial_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_cuboid_convolution.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_patch_3d.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_pooling.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_softmax.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_spatial_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:fifo_queue.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:maxpooling_op.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:ops_util.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:ops_util.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:padding_fifo_queue.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:pooling_ops_common.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:pooling_ops_common.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:queue_base.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:queue_op.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:typed_queue.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_entry.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_scorer.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_search.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_decoder.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_loss_util.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:naming.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:naming.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:tensor_bundle.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:tensor_bundle.h' directly. You should either move the file to this package or depend on an appropriate rule there.
INFO: Found 1 target...
INFO: From Compiling tensorflow/core/kernels/split_op.cc:
tensorflow/core/kernels/split_op.cc: In instantiation of 'void tensorflow::SplitOpCPU<T>::Compute(tensorflow::OpKernelContext*) [with T = Eigen::QUInt8]':
tensorflow/core/kernels/split_op.cc:357:1:   required from here
tensorflow/core/kernels/split_op.cc:159:64: warning: narrowing conversion of '(tensorflow::int64)split_dim_output_size' from 'tensorflow::int64 {aka long long int}' to 'int' inside { } [-Wnarrowing]
         prefix_dim_size, split_dim_output_size, suffix_dim_size};
                                                                ^
tensorflow/core/kernels/split_op.cc: In instantiation of 'void tensorflow::SplitOpCPU<T>::Compute(tensorflow::OpKernelContext*) [with T = float]':
tensorflow/core/kernels/split_op.cc:357:1:   required from here
tensorflow/core/kernels/split_op.cc:159:64: warning: narrowing conversion of '(tensorflow::int64)split_dim_output_size' from 'tensorflow::int64 {aka long long int}' to 'int' inside { } [-Wnarrowing]
tensorflow/core/kernels/split_op.cc: In instantiation of 'void tensorflow::SplitOpCPU<T>::Compute(tensorflow::OpKernelContext*) [with T = int]':
tensorflow/core/kernels/split_op.cc:357:1:   required from here
tensorflow/core/kernels/split_op.cc:159:64: warning: narrowing conversion of '(tensorflow::int64)split_dim_output_size' from 'tensorflow::int64 {aka long long int}' to 'int' inside { } [-Wnarrowing]
ERROR: /tensorflow/tensorflow/core/kernels/BUILD:3749:1: C++ compilation of rule '//tensorflow/core/kernels:android_tensorflow_kernels' failed: arm-linux-androideabi-gcc failed: error executing command 
  (cd /root/.cache/bazel/_bazel_root/68a62076e91007a7908bc42a32e4cff9/execroot/tensorflow && \
  exec env - \
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
  external/androidndk/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -fstack-protector-strong -fpic -ffunction-sections -funwind-tables -no-canonical-prefixes -fno-canonical-system-headers '-march=armv7-a' '-mfpu=vfpv3-d16' '-mfloat-abi=softfp' -mthumb -Os -g -DNDEBUG -MD -MF bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/bin/tensorflow/core/kernels/_objs/android_tensorflow_kernels/tensorflow/core/kernels/cwise_op_mul_2.d '-frandom-seed=bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/bin/tensorflow/core/kernels/_objs/android_tensorflow_kernels/tensorflow/core/kernels/cwise_op_mul_2.o' -DEIGEN_MPL2_ONLY -iquote . -iquote bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles -iquote external/protobuf -iquote bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/protobuf -iquote external/bazel_tools -iquote bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/bazel_tools -iquote external/eigen_archive -iquote bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/eigen_archive -iquote external/local_config_sycl -iquote bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/local_config_sycl -iquote external/gemmlowp -iquote bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/gemmlowp -isystem external/protobuf/src -isystem bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/eigen_archive -isystem bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/eigen_archive -DEIGEN_AVOID_STL_ARRAY -Iexternal/gemmlowp -Wno-sign-compare -fno-exceptions '-mfpu=neon' '-std=c++11' -DTF_LEAN_BINARY -O2 '--sysroot=external/androidndk/ndk/platforms/android-21/arch-arm' -isystem external/androidndk/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/include -isystem external/androidndk/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/include-fixed -isystem external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -c tensorflow/core/kernels/cwise_op_mul_2.cc -o bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/bin/tensorflow/core/kernels/_objs/android_tensorflow_kernels/tensorflow/core/kernels/cwise_op_mul_2.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 4.
arm-linux-androideabi-gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
Target //tensorflow/examples/android:tensorflow_demo failed to build
INFO: Elapsed time: 160.782s, Critical Path: 138.06s
@andrewharp
Copy link
Contributor

This seems similar to tensorflow/serving#97, probably due to some interaction with Docker.

Can you try adding --spawn_strategy=sandboxed --genrule_strategy=sandboxed to the build flags to see if that helps?

@poxvoculi poxvoculi added the stat:awaiting response Status - Awaiting response from author label Feb 21, 2017
@andrewharp
Copy link
Contributor

Also, are both of the laptops you tried this on running osx?

@daj
Copy link
Contributor Author

daj commented Feb 21, 2017

They are both OS X, one is El Capitan, one is Sierra (I updated the description to record the details).

If you can point me at Docker container which supports building the TensorFlow Android demo, then I can try using that. I couldn't find one when I searched online.

I added the --spawn_strategy=sandboxed --genrule_strategy=sandboxed flags, here's the result:

# bazel build -c opt --verbose_failures --spawn_strategy=sandboxed --genrule_strategy=sandboxed //tensorflow/examples/android:tensorflow_demo
INFO: Reading 'startup' options from /root/.bazelrc: --batch
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.build/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:avgpooling_op.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:bounds_check.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:cwise_ops.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:cwise_ops_common.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:cwise_ops_gradients.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_activations.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_attention.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_backward_cuboid_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_backward_spatial_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_cuboid_convolution.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_patch_3d.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_pooling.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_softmax.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_spatial_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:fifo_queue.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:maxpooling_op.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:ops_util.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:ops_util.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:padding_fifo_queue.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:pooling_ops_common.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:pooling_ops_common.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:queue_base.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:queue_op.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:typed_queue.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_entry.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_scorer.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_search.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_decoder.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_loss_util.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:naming.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:naming.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:tensor_bundle.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:tensor_bundle.h' directly. You should either move the file to this package or depend on an appropriate rule there.
INFO: Found 1 target...
ERROR: /tensorflow/tensorflow/core/kernels/BUILD:3749:1: C++ compilation of rule '//tensorflow/core/kernels:android_tensorflow_kernels' failed: process-wrapper failed: error executing command 
  (cd /root/.cache/bazel/_bazel_root/68a62076e91007a7908bc42a32e4cff9/bazel-sandbox/383bb6e0-70e1-4f65-b0b0-feb77e82e2c2-6/execroot/tensorflow && \
  exec env - \
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
  /root/.cache/bazel/_bazel_root/68a62076e91007a7908bc42a32e4cff9/execroot/tensorflow/_bin/process-wrapper -1 5 - - external/androidndk/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -fstack-protector-strong -fpic -ffunction-sections -funwind-tables -no-canonical-prefixes -fno-canonical-system-headers '-march=armv7-a' '-mfpu=vfpv3-d16' '-mfloat-abi=softfp' -mthumb -Os -g -DNDEBUG -MD -MF bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/bin/tensorflow/core/kernels/_objs/android_tensorflow_kernels/tensorflow/core/kernels/cwise_op_greater.d '-frandom-seed=bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/bin/tensorflow/core/kernels/_objs/android_tensorflow_kernels/tensorflow/core/kernels/cwise_op_greater.o' -DEIGEN_MPL2_ONLY -iquote . -iquote bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles -iquote external/protobuf -iquote bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/protobuf -iquote external/bazel_tools -iquote bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/bazel_tools -iquote external/eigen_archive -iquote bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/eigen_archive -iquote external/local_config_sycl -iquote bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/local_config_sycl -iquote external/gemmlowp -iquote bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/gemmlowp -isystem external/protobuf/src -isystem bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/eigen_archive -isystem bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/genfiles/external/eigen_archive -DEIGEN_AVOID_STL_ARRAY -Iexternal/gemmlowp -Wno-sign-compare -fno-exceptions '-mfpu=neon' '-std=c++11' -DTF_LEAN_BINARY -O2 '--sysroot=external/androidndk/ndk/platforms/android-21/arch-arm' -isystem external/androidndk/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/include -isystem external/androidndk/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/include-fixed -isystem external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -c tensorflow/core/kernels/cwise_op_greater.cc -o bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/bin/tensorflow/core/kernels/_objs/android_tensorflow_kernels/tensorflow/core/kernels/cwise_op_greater.o).
arm-linux-androideabi-gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
Target //tensorflow/examples/android:tensorflow_demo failed to build
INFO: Elapsed time: 159.378s, Critical Path: 134.32s

@aselle aselle removed the stat:awaiting response Status - Awaiting response from author label Feb 22, 2017
@andrewharp
Copy link
Contributor

andrewharp commented Feb 22, 2017

Can you ensure that you have enough memory available in your docker environment? This seems like a common issue: https://groups.google.com/a/tensorflow.org/forum/#!topic/discuss/zjwDXhD6k1w

@poxvoculi poxvoculi added the stat:awaiting response Status - Awaiting response from author label Feb 22, 2017
@daj
Copy link
Contributor Author

daj commented Feb 23, 2017

Awesome, adding --local_resources 4096,4.0,1.0 -j 1 resolved the issue - thanks!

Full output:

# bazel build -c opt --verbose_failures --local_resources 4096,4.0,1.0 -j 1 //tensorflow/examples/android:tensorflow_demo
INFO: Reading 'startup' options from /root/.bazelrc: --batch
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.build/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:avgpooling_op.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:bounds_check.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:cwise_ops.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:cwise_ops_common.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:cwise_ops_gradients.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_activations.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_attention.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_backward_cuboid_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_backward_spatial_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_cuboid_convolution.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_patch_3d.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_pooling.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_softmax.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_spatial_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:fifo_queue.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:maxpooling_op.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:ops_util.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:ops_util.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:padding_fifo_queue.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:pooling_ops_common.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:pooling_ops_common.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:queue_base.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:queue_op.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:typed_queue.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_entry.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_scorer.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_search.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_decoder.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_loss_util.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:naming.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:naming.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:tensor_bundle.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /tensorflow/tensorflow/core/BUILD:816:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/tensor_bundle:tensor_bundle.h' directly. You should either move the file to this package or depend on an appropriate rule there.
INFO: Found 1 target...
INFO: From Compiling tensorflow/core/kernels/unpack_op.cc:
tensorflow/core/kernels/unpack_op.cc: In instantiation of 'void tensorflow::UnpackOp<Device, T>::Compute(tensorflow::OpKernelContext*) [with Device = Eigen::ThreadPoolDevice; T = float]':
tensorflow/core/kernels/unpack_op.cc:177:1:   required from here
tensorflow/core/kernels/unpack_op.cc:113:75: warning: narrowing conversion of 'before_dim' from 'tensorflow::int64 {aka long long int}' to 'int' inside { } [-Wnarrowing]
         Eigen::DSizes<Eigen::DenseIndex, 3> sizes{1, before_dim, after_dim};
                                                                           ^
tensorflow/core/kernels/unpack_op.cc: In instantiation of 'void tensorflow::UnpackOp<Device, T>::Compute(tensorflow::OpKernelContext*) [with Device = Eigen::ThreadPoolDevice; T = int]':
tensorflow/core/kernels/unpack_op.cc:177:1:   required from here
tensorflow/core/kernels/unpack_op.cc:113:75: warning: narrowing conversion of 'before_dim' from 'tensorflow::int64 {aka long long int}' to 'int' inside { } [-Wnarrowing]
INFO: From Compiling tensorflow/core/kernels/split_v_op.cc:
tensorflow/core/kernels/split_v_op.cc: In instantiation of 'void tensorflow::SplitVOpCPU<T, Tlen>::Compute(tensorflow::OpKernelContext*) [with T = tensorflow::bfloat16; Tlen = long long int]':
tensorflow/core/kernels/split_v_op.cc:401:1:   required from here
tensorflow/core/kernels/split_v_op.cc:212:63: warning: narrowing conversion of 'split_sizes_vec.std::vector<_Tp, _Alloc>::operator[]<long long int, std::allocator<long long int> >(((std::vector<long long int, std::allocator<long long int> >::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int> >::value_type {aka long long int}' to 'int' inside { } [-Wnarrowing]
           prefix_dim_size, split_sizes_vec[i], suffix_dim_size};
                                                               ^
tensorflow/core/kernels/split_v_op.cc: In instantiation of 'void tensorflow::SplitVOpCPU<T, Tlen>::Compute(tensorflow::OpKernelContext*) [with T = float; Tlen = long long int]':
tensorflow/core/kernels/split_v_op.cc:401:1:   required from here
tensorflow/core/kernels/split_v_op.cc:212:63: warning: narrowing conversion of 'split_sizes_vec.std::vector<_Tp, _Alloc>::operator[]<long long int, std::allocator<long long int> >(((std::vector<long long int, std::allocator<long long int> >::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int> >::value_type {aka long long int}' to 'int' inside { } [-Wnarrowing]
tensorflow/core/kernels/split_v_op.cc: In instantiation of 'void tensorflow::SplitVOpCPU<T, Tlen>::Compute(tensorflow::OpKernelContext*) [with T = int; Tlen = long long int]':
tensorflow/core/kernels/split_v_op.cc:401:1:   required from here
tensorflow/core/kernels/split_v_op.cc:212:63: warning: narrowing conversion of 'split_sizes_vec.std::vector<_Tp, _Alloc>::operator[]<long long int, std::allocator<long long int> >(((std::vector<long long int, std::allocator<long long int> >::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int> >::value_type {aka long long int}' to 'int' inside { } [-Wnarrowing]
INFO: From Compiling tensorflow/core/kernels/tensor_array_ops.cc:
tensorflow/core/kernels/tensor_array_ops.cc: In instantiation of 'void tensorflow::TensorArraySplitOp<Device, T>::Compute(tensorflow::OpKernelContext*) [with Device = Eigen::ThreadPoolDevice; T = float]':
tensorflow/core/kernels/tensor_array_ops.cc:1400:1:   required from here
tensorflow/core/kernels/tensor_array_ops.cc:1242:72: warning: narrowing conversion of 'previous_length' from 'tensorflow::int64 {aka long long int}' to 'int' inside { } [-Wnarrowing]
       Eigen::DSizes<Eigen::DenseIndex, 3> indices{0, previous_length, 0};
                                                                        ^
tensorflow/core/kernels/tensor_array_ops.cc:1244:65: warning: narrowing conversion of '(Scalar)tensor_lengths_t.Eigen::TensorMap<PlainObjectType, Options_, MakePointer_>::operator()<Eigen::Tensor<const long long int, 1, 1, int>, 16, Eigen::MakePointer>(i)' from 'Scalar {aka long long int}' to 'int' inside { } [-Wnarrowing]
                                                 elements_per_row};
                                                                 ^
tensorflow/core/kernels/tensor_array_ops.cc: In instantiation of 'void tensorflow::TensorArraySplitOp<Device, T>::Compute(tensorflow::OpKernelContext*) [with Device = Eigen::ThreadPoolDevice; T = int]':
tensorflow/core/kernels/tensor_array_ops.cc:1400:1:   required from here
tensorflow/core/kernels/tensor_array_ops.cc:1242:72: warning: narrowing conversion of 'previous_length' from 'tensorflow::int64 {aka long long int}' to 'int' inside { } [-Wnarrowing]
       Eigen::DSizes<Eigen::DenseIndex, 3> indices{0, previous_length, 0};
                                                                        ^
tensorflow/core/kernels/tensor_array_ops.cc:1244:65: warning: narrowing conversion of '(Scalar)tensor_lengths_t.Eigen::TensorMap<PlainObjectType, Options_, MakePointer_>::operator()<Eigen::Tensor<const long long int, 1, 1, int>, 16, Eigen::MakePointer>(i)' from 'Scalar {aka long long int}' to 'int' inside { } [-Wnarrowing]
                                                 elements_per_row};
                                                                 ^
Slow read: a 756175936-byte read from /root/.cache/bazel/_bazel_root/68a62076e91007a7908bc42a32e4cff9/execroot/tensorflow/bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-opt/bin/tensorflow/core/kernels/libandroid_tensorflow_kernels.lo took 5357ms.
Target //tensorflow/examples/android:tensorflow_demo up-to-date:
  bazel-bin/tensorflow/examples/android/tensorflow_demo_deploy.jar
  bazel-bin/tensorflow/examples/android/tensorflow_demo_unsigned.apk
  bazel-bin/tensorflow/examples/android/tensorflow_demo.apk
INFO: Elapsed time: 945.344s, Critical Path: 66.98s

@daj daj closed this as completed Feb 23, 2017
hongxu-jia added a commit to hongxu-jia/meta-tensorflow that referenced this issue Apr 21, 2020
There is gcc Killed failure:
...
|tmp-glibc/work/corei7-32-wrsmllib32-linux/lib32-tensorflow/
1.13.0-r0/git/tensorflow/core/kernels/BUILD:3158:1: C++ compilation
of rule '//tensorflow/core/kernels:cwise_op' failed (Killed): gcc
failed: error executing command
...

From Bazel User Manual
--local_resources availableRAM,availableCPU,availableIO

This option, which takes three comma-separated floating point arguments,
specifies the amount of local resources that Bazel can take into
consideration when scheduling build and test activities. Option expects
amount of available RAM (in MB), number of CPU cores (with 1.0 representing
single full core) and workstation I/O capability (with 1.0 representing
average workstation). [1]

According to [2][3], explicitly set the amount of local host RAM
4096 MB available to Bazel, the number of local CPU 4 cores
available to Bazel,  the number of jobs is 4 which should be
executed concurrently.

Refer:
[1] https://stackoverflow.com/questions/34756370/is-there-a-way-to-limit-the-number-of-cpu-cores-bazel-uses
[2] tensorflow/tensorflow#7723
[3] tensorflow/tensorflow#24318

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
hongxu-jia added a commit to hongxu-jia/meta-tensorflow that referenced this issue Apr 21, 2020
There is gcc Killed failure:
...
|tmp-glibc/work/corei7-32-wrsmllib32-linux/lib32-tensorflow/
1.13.0-r0/git/tensorflow/core/kernels/BUILD:3158:1: C++ compilation
of rule '//tensorflow/core/kernels:cwise_op' failed (Killed): gcc
failed: error executing command
...

From Bazel User Manual
--local_resources availableRAM,availableCPU,availableIO

This option, which takes three comma-separated floating point arguments,
specifies the amount of local resources that Bazel can take into
consideration when scheduling build and test activities. Option expects
amount of available RAM (in MB), number of CPU cores (with 1.0 representing
single full core) and workstation I/O capability (with 1.0 representing
average workstation). [1]

According to [2][3], explicitly set the amount of local host RAM
4096 MB available to Bazel, the number of local CPU 4 cores
available to Bazel,  the number of jobs is 4 which should be
executed concurrently.

Refer:
[1] https://stackoverflow.com/questions/34756370/is-there-a-way-to-limit-the-number-of-cpu-cores-bazel-uses
[2] tensorflow/tensorflow#7723
[3] tensorflow/tensorflow#24318

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
daregit pushed a commit to daregit/yocto-combined that referenced this issue May 22, 2024
…res Bazel uses

There is gcc Killed failure:
...
|tmp-glibc/work/corei7-32-wrsmllib32-linux/lib32-tensorflow/
1.13.0-r0/git/tensorflow/core/kernels/BUILD:3158:1: C++ compilation
of rule '//tensorflow/core/kernels:cwise_op' failed (Killed): gcc
failed: error executing command
...

From Bazel User Manual
--local_resources availableRAM,availableCPU,availableIO

This option, which takes three comma-separated floating point arguments,
specifies the amount of local resources that Bazel can take into
consideration when scheduling build and test activities. Option expects
amount of available RAM (in MB), number of CPU cores (with 1.0 representing
single full core) and workstation I/O capability (with 1.0 representing
average workstation). [1]

According to [2][3], explicitly set the amount of local host RAM
4096 MB available to Bazel, the number of local CPU 4 cores
available to Bazel,  the number of jobs is 4 which should be
executed concurrently.

Refer:
[1] https://stackoverflow.com/questions/34756370/is-there-a-way-to-limit-the-number-of-cpu-cores-bazel-uses
[2] tensorflow/tensorflow#7723
[3] tensorflow/tensorflow#24318

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
daregit pushed a commit to daregit/yocto-combined that referenced this issue May 22, 2024
…res Bazel uses

There is gcc Killed failure:
...
|tmp-glibc/work/corei7-32-wrsmllib32-linux/lib32-tensorflow/
1.13.0-r0/git/tensorflow/core/kernels/BUILD:3158:1: C++ compilation
of rule '//tensorflow/core/kernels:cwise_op' failed (Killed): gcc
failed: error executing command
...

From Bazel User Manual
--local_resources availableRAM,availableCPU,availableIO

This option, which takes three comma-separated floating point arguments,
specifies the amount of local resources that Bazel can take into
consideration when scheduling build and test activities. Option expects
amount of available RAM (in MB), number of CPU cores (with 1.0 representing
single full core) and workstation I/O capability (with 1.0 representing
average workstation). [1]

According to [2][3], explicitly set the amount of local host RAM
4096 MB available to Bazel, the number of local CPU 4 cores
available to Bazel,  the number of jobs is 4 which should be
executed concurrently.

Refer:
[1] https://stackoverflow.com/questions/34756370/is-there-a-way-to-limit-the-number-of-cpu-cores-bazel-uses
[2] tensorflow/tensorflow#7723
[3] tensorflow/tensorflow#24318

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting response Status - Awaiting response from author
Projects
None yet
Development

No branches or pull requests

4 participants