Issue 1:
System information

OSX 10.14.5

TensorFlow installed from (source or binary): source

TensorFlow version: 1.13.1

Python version: 2.7

Installed using virtualenv? pip? conda?: docker

Bazel version (if compiling from source):

GCC/Compiler version (if compiling from source):

CUDA/cuDNN version:

GPU model and memory:

Describe the problem

I am following this official guide to cross-compile for the Raspberry Pi. I am doing:

tensorflow/tools/ci_build/ci_build.sh PI \
tensorflow/tools/ci_build/pi/build_raspberry_pi.sh

The process hungs (all CPUs being used 100% for a long long time) while compiling. Each time I kill it and the next time hungs at a different place. The scenario is always very similar.. I paste below some examples:

Example1

[1,152 / 1,160] Compiling tensorflow/core/kernels/data/experimental/group_by_reducer_dataset_op.cc; 131s local ... (4 actions running)
ERROR: /workspace/tensorflow/core/kernels/BUILD:3114:1: C++ compilation of rule '//tensorflow/core/kernels:batch_matmul_op' failed (Exit 4): arm-linux-gnueabihf-gcc failed: error executing command
(cd /Users/mariano/Trabajo/Instantiations/InstantiationsShared/TensorFlow/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_mariano/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow && \
exec env - \
LD_LIBRARY_PATH='' \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin \
PWD=/proc/self/cwd \
PYTHON_BIN_PATH=/usr/bin/python \
PYTHON_LIB_PATH=/usr/local/lib/python2.7/dist-packages \
TF_DOWNLOAD_CLANG=0 \
TF_NEED_CUDA=0 \
TF_NEED_OPENCL_SYCL=0 \
TF_NEED_ROCM=0 \
/Users/mariano/Trabajo/Instantiations/InstantiationsShared/TensorFlow/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_mariano/eab0d61a99b6696edb3d2aff87b585e8/external/arm_compiler/bin/arm-linux-gnueabihf-gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -DRASPBERRY_PI -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -isystem /usr/include/arm-linux-gnueabihf -isystem /usr/include/python2.7 -isystem /usr/include/ -MD -MF bazel-out/armeabi-opt/bin/tensorflow/core/kernels/_objs/batch_matmul_op/batch_matmul_op_real.d '-frandom-seed=bazel-out/armeabi-opt/bin/tensorflow/core/kernels/_objs/batch_matmul_op/batch_matmul_op_real.o' -DEIGEN_MPL2_ONLY '-DEIGEN_MAX_ALIGN_BYTES=64' '-DEIGEN_HAS_TYPE_TRAITS=0' -D__CLANG_SUPPORT_DYN_ANNOTATION__ -DTF_USE_SNAPPY -DCURL_STATICLIB -iquote . -iquote bazel-out/armeabi-opt/genfiles -iquote bazel-out/armeabi-opt/bin -iquote external/bazel_tools -iquote bazel-out/armeabi-opt/genfiles/external/bazel_tools -iquote bazel-out/armeabi-opt/bin/external/bazel_tools -iquote external/eigen_archive -iquote bazel-out/armeabi-opt/genfiles/external/eigen_archive -iquote bazel-out/armeabi-opt/bin/external/eigen_archive -iquote external/local_config_sycl -iquote bazel-out/armeabi-opt/genfiles/external/local_config_sycl -iquote bazel-out/armeabi-opt/bin/external/local_config_sycl -iquote external/com_google_absl -iquote bazel-out/armeabi-opt/genfiles/external/com_google_absl -iquote bazel-out/armeabi-opt/bin/external/com_google_absl -iquote external/nsync -iquote bazel-out/armeabi-opt/genfiles/external/nsync -iquote bazel-out/armeabi-opt/bin/external/nsync -iquote external/gif_archive -iquote bazel-out/armeabi-opt/genfiles/external/gif_archive -iquote bazel-out/armeabi-opt/bin/external/gif_archive -iquote external/jpeg -iquote bazel-out/armeabi-opt/genfiles/external/jpeg -iquote bazel-out/armeabi-opt/bin/external/jpeg -iquote external/protobuf_archive -iquote bazel-out/armeabi-opt/genfiles/external/protobuf_archive -iquote bazel-out/armeabi-opt/bin/external/protobuf_archive -iquote external/com_googlesource_code_re2 -iquote bazel-out/armeabi-opt/genfiles/external/com_googlesource_code_re2 -iquote bazel-out/armeabi-opt/bin/external/com_googlesource_code_re2 -iquote external/farmhash_archive -iquote bazel-out/armeabi-opt/genfiles/external/farmhash_archive -iquote bazel-out/armeabi-opt/bin/external/farmhash_archive -iquote external/fft2d -iquote bazel-out/armeabi-opt/genfiles/external/fft2d -iquote bazel-out/armeabi-opt/bin/external/fft2d -iquote external/highwayhash -iquote bazel-out/armeabi-opt/genfiles/external/highwayhash -iquote bazel-out/armeabi-opt/bin/external/highwayhash -iquote external/zlib_archive -iquote bazel-out/armeabi-opt/genfiles/external/zlib_archive -iquote bazel-out/armeabi-opt/bin/external/zlib_archive -iquote external/double_conversion -iquote bazel-out/armeabi-opt/genfiles/external/double_conversion -iquote bazel-out/armeabi-opt/bin/external/double_conversion -iquote external/snappy -iquote bazel-out/armeabi-opt/genfiles/external/snappy -iquote bazel-out/armeabi-opt/bin/external/snappy -iquote external/curl -iquote bazel-out/armeabi-opt/genfiles/external/curl -iquote bazel-out/armeabi-opt/bin/external/curl -iquote external/boringssl -iquote bazel-out/armeabi-opt/genfiles/external/boringssl -iquote bazel-out/armeabi-opt/bin/external/boringssl -iquote external/jsoncpp_git -iquote bazel-out/armeabi-opt/genfiles/external/jsoncpp_git -iquote bazel-out/armeabi-opt/bin/external/jsoncpp_git -iquote external/aws -iquote bazel-out/armeabi-opt/genfiles/external/aws -iquote bazel-out/armeabi-opt/bin/external/aws -isystem external/eigen_archive -isystem bazel-out/armeabi-opt/genfiles/external/eigen_archive -isystem bazel-out/armeabi-opt/bin/external/eigen_archive -isystem external/nsync/public -isystem bazel-out/armeabi-opt/genfiles/external/nsync/public -isystem bazel-out/armeabi-opt/bin/external/nsync/public -isystem external/gif_archive/lib -isystem bazel-out/armeabi-opt/genfiles/external/gif_archive/lib -isystem bazel-out/armeabi-opt/bin/external/gif_archive/lib -isystem external/protobuf_archive/src -isystem bazel-out/armeabi-opt/genfiles/external/protobuf_archive/src -isystem bazel-out/armeabi-opt/bin/external/protobuf_archive/src -isystem external/farmhash_archive/src -isystem bazel-out/armeabi-opt/genfiles/external/farmhash_archive/src -isystem bazel-out/armeabi-opt/bin/external/farmhash_archive/src -isystem external/zlib_archive -isystem bazel-out/armeabi-opt/genfiles/external/zlib_archive -isystem bazel-out/armeabi-opt/bin/external/zlib_archive -isystem external/double_conversion -isystem bazel-out/armeabi-opt/genfiles/external/double_conversion -isystem bazel-out/armeabi-opt/bin/external/double_conversion -isystem external/curl/include -isystem bazel-out/armeabi-opt/genfiles/external/curl/include -isystem bazel-out/armeabi-opt/bin/external/curl/include -isystem external/boringssl/src/include -isystem bazel-out/armeabi-opt/genfiles/external/boringssl/src/include -isystem bazel-out/armeabi-opt/bin/external/boringssl/src/include -isystem external/jsoncpp_git/include -isystem bazel-out/armeabi-opt/genfiles/external/jsoncpp_git/include -isystem bazel-out/armeabi-opt/bin/external/jsoncpp_git/include -isystem external/aws/aws-cpp-sdk-core/include -isystem bazel-out/armeabi-opt/genfiles/external/aws/aws-cpp-sdk-core/include -isystem bazel-out/armeabi-opt/bin/external/aws/aws-cpp-sdk-core/include -isystem external/aws/aws-cpp-sdk-kinesis/include -isystem bazel-out/armeabi-opt/genfiles/external/aws/aws-cpp-sdk-kinesis/include -isystem bazel-out/armeabi-opt/bin/external/aws/aws-cpp-sdk-kinesis/include -isystem external/aws/aws-cpp-sdk-s3/include -isystem bazel-out/armeabi-opt/genfiles/external/aws/aws-cpp-sdk-s3/include -isystem bazel-out/armeabi-opt/bin/external/aws/aws-cpp-sdk-s3/include '-march=armv7-a' '-mfpu=neon-vfpv4' '-std=gnu11' '-DS_IREAD=S_IRUSR' '-DS_IWRITE=S_IWUSR' -O3 -U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 -U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 -U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 -funsafe-math-optimizations -ftree-vectorize -fomit-frame-pointer -DEIGEN_AVOID_STL_ARRAY -Iexternal/gemmlowp -Wno-sign-compare -fno-exceptions '-ftemplate-depth=900' -DTENSORFLOW_MONOLITHIC_BUILD -pthread -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -no-canonical-prefixes -fno-canonical-system-headers -c tensorflow/core/kernels/batch_matmul_op_real.cc -o bazel-out/armeabi-opt/bin/tensorflow/core/kernels/_objs/batch_matmul_op/batch_matmul_op_real.o)
Execution platform: @bazel_tools//platforms:host_platform
cc1plus: warning: command line option '-std=gnu11' is valid for C/ObjC but not for C++
arm-linux-gnueabihf-gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
INFO: Elapsed time: 781.885s, Critical Path: 218.64s
INFO: 108 processes: 108 local.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
>>> elapsed time 16m45s

Example2

ERROR: /Users/mariano/Trabajo/Instantiations/InstantiationsShared/TensorFlow/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_mariano/eab0d61a99b6696edb3d2aff87b585e8/external/com_github_nanopb_nanopb/BUILD.bazel:1:1: C++ compilation of rule '@com_github_nanopb_nanopb//:nanopb' failed (Exit 1): arm-linux-gnueabihf-gcc failed: error executing command
(cd /Users/mariano/Trabajo/Instantiations/InstantiationsShared/TensorFlow/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_mariano/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow && \
exec env - \
LD_LIBRARY_PATH='' \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin \
PWD=/proc/self/cwd \
PYTHON_BIN_PATH=/usr/bin/python \
PYTHON_LIB_PATH=/usr/local/lib/python2.7/dist-packages \
TF_DOWNLOAD_CLANG=0 \
TF_NEED_CUDA=0 \
TF_NEED_OPENCL_SYCL=0 \
TF_NEED_ROCM=0 \
/Users/mariano/Trabajo/Instantiations/InstantiationsShared/TensorFlow/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_mariano/eab0d61a99b6696edb3d2aff87b585e8/external/arm_compiler/bin/arm-linux-gnueabihf-gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -DRASPBERRY_PI -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections -MD -MF bazel-out/armeabi-opt/bin/external/com_github_nanopb_nanopb/_objs/nanopb/pb_decode.pic.d -fPIC '-DPB_FIELD_32BIT=1' -iquote external/com_github_nanopb_nanopb -iquote bazel-out/armeabi-opt/genfiles/external/com_github_nanopb_nanopb -iquote bazel-out/armeabi-opt/bin/external/com_github_nanopb_nanopb -iquote external/bazel_tools -iquote bazel-out/armeabi-opt/genfiles/external/bazel_tools -iquote bazel-out/armeabi-opt/bin/external/bazel_tools '-march=armv7-a' '-mfpu=neon-vfpv4' '-std=gnu11' '-DS_IREAD=S_IRUSR' '-DS_IWRITE=S_IWUSR' -O3 -U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 -U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 -U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 -funsafe-math-optimizations -ftree-vectorize -fomit-frame-pointer -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -no-canonical-prefixes -fno-canonical-system-headers -c external/com_github_nanopb_nanopb/pb_decode.c -o bazel-out/armeabi-opt/bin/external/com_github_nanopb_nanopb/_objs/nanopb/pb_decode.pic.o)
Execution platform: @bazel_tools//platforms:host_platform
external/com_github_nanopb_nanopb/pb_decode.c:18:23: fatal error: pb_common.h: No such file or directory
#include "pb_common.h"
^
compilation terminated.
INFO: Elapsed time: 380.977s, Critical Path: 35.72s
INFO: 390 processes: 390 local.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

Any other info / logs

The very very same instructions, running on a Linux Mint 18.3 work perfectly. Docker version on OSX is "Docker version 18.09.2, build 6247962" and in Mint "Docker version 18.09.6, build 481bc77". The documentation says nothing about which Docker version to use and it does says that MacOS is supported:

it's easier to build TensorFlow on a more powerful host machine running Linux, macOS, or Windows.

Any ideas?

Issue 2:
System information

TensorFlow version (you are using): 1.13.1

Are you willing to contribute it (Yes/No): yes, at least as a tester

Describe the feature and the current behavior/state.

There is no pre-build binary for Raspberry Pi / ARM and the instructions to build from scratch here. However, there is nothing for any kind of SBC (like Raspberry Pi, ODroid, Pine64, etc) with a aarch64 architecture.

I cannot use the Python wheel. I need the C library to bind to a different language.

Will this change the current api? How?

No.

Who will benefit with this feature?

Anyone using a SBC with a aarch64 OS.