tensorflow / tensorflow

An Open Source Machine Learning Framework for Everyone
https://tensorflow.org
Apache License 2.0
185.73k stars 74.2k forks source link

Cross-compilation for Raspberry Pi fails on macOS #46015

Closed mstfldmr closed 2 years ago

mstfldmr commented 3 years ago

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

Describe the problem

Cross-compilation for Raspberry Pi fails on macOS. The same steps work well on an Ubuntu server.

Provide the exact sequence of commands / steps that you executed before running into the problem

git clone https://github.com/tensorflow/tensorflow
cd tensorflow
git checkout r2.4
tensorflow/tools/ci_build/ci_build.sh PI-PYTHON37 \
    tensorflow/tools/ci_build/pi/build_raspberry_pi.sh

Any other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

WORKSPACE: /Users/aldemim/ws/tensorflow CI_DOCKER_BUILD_EXTRA_PARAMS: CI_DOCKER_EXTRA_PARAMS: COMMAND: tensorflow/tools/ci_build/pi/build_raspberry_pi.sh CI_COMMAND_PREFIX: ./tensorflow/tools/ci_build/builds/with_the_same_user ./tensorflow/tools/ci_build/builds/configured pi-python37 CONTAINER_TYPE: pi-python37 BUILD_TAG: tf_ci (docker container name will be tf_ci.pi-python37)

Building container (tf_ci.pi-python37)... [+] Building 2.0s (18/18) FINISHED
=> [internal] load build definition from Dockerfile.pi-python37 0.0s => => transferring dockerfile: 49B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/ubuntu:16.04 1.9s => [auth] library/ubuntu:pull token for registry-1.docker.io 0.0s => [ 1/12] FROM docker.io/library/ubuntu:16.04@sha256:3355b6e4ba1b12071ba5fe9742042a2f10b257c908fbdfac81912a16eb463879 0.0s => [internal] load build context 0.0s => => transferring context: 1.74kB 0.0s => CACHED [ 2/12] COPY install/*.sh /install/ 0.0s => CACHED [ 3/12] RUN /install/install_bootstrap_deb_packages.sh 0.0s => CACHED [ 4/12] RUN add-apt-repository -y ppa:openjdk-r/ppa && add-apt-repository -y ppa:george-edison55/cmake-3.x 0.0s => CACHED [ 5/12] RUN /install/install_deb_packages.sh 0.0s => CACHED [ 6/12] RUN /install/install_pi_python3x_toolchain.sh "3.7" 0.0s => CACHED [ 7/12] RUN /install/install_bazel.sh 0.0s => CACHED [ 8/12] RUN /install/install_proto3.sh 0.0s => CACHED [ 9/12] RUN /install/install_buildifier.sh 0.0s => CACHED [10/12] RUN /install/install_auditwheel.sh 0.0s => CACHED [11/12] RUN /install/install_golang.sh 0.0s => CACHED [12/12] COPY install/.bazelrc /etc/bazel.bazelrc 0.0s => exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:0102277c114ff3d600ff1e82e705a7522bf542d9a22125c9c3fa391b0838979b 0.0s => => naming to docker.io/library/tf_ci.pi-python37 0.0s Running 'tensorflow/tools/ci_build/pi/build_raspberry_pi.sh' inside tf_ci.pi-python37... Reading package lists... Building dependency tree... Reading state information... sudo is already the newest version (1.8.16-0ubuntu1.9). 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. dialout:x:20: adduser: Warning: The home directory `/Users/aldemim/ws/tensorflow/bazel-ci_build-cache' does not belong to the user you are currently creating. /workspace /workspace You have bazel 3.1.0 installed. Found possible Python library paths: /usr/lib/python3/dist-packages /usr/local/lib/python3.7/dist-packages Please input the desired Python library path to use. Default is [/usr/lib/python3/dist-packages] Do you wish to build TensorFlow with ROCm support? [y/N]: No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: No CUDA support will be enabled for TensorFlow.

Do you wish to download a fresh release of clang? (Experimental) [y/N]: Clang will not be downloaded.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native -Wno-sign-compare]:

Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: Not configuring the WORKSPACE for Android builds.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details. --config=mkl # Build with MKL support. --config=mkl_aarch64 # Build with oneDNN support for Aarch64. --config=monolithic # Config for mostly static monolithic build. --config=ngraph # Build with Intel nGraph support. --config=numa # Build with NUMA support. --config=dynamic_kernels # (Experimental) Build kernels into separate shared objects. --config=v2 # Build TensorFlow 2.x instead of 1.x. Preconfigured Bazel build configs to DISABLE default on features: --config=noaws # Disable AWS S3 filesystem support. --config=nogcp # Disable GCP support. --config=nohdfs # Disable HDFS support. --config=nonccl # Disable NVIDIA NCCL support. /workspace Extracting Bazel installation... TF_BUILD_INFO = {container_type: "pi-python37", command: "tensorflow/tools/ci_build/pi/build_raspberry_pi.sh", source_HEAD: "5485ec964e7d51b5e51139943e02f8241aa56cfa", source_remote_origin: "https://github.com/tensorflow/tensorflow.git", OS: "Linux", kernel: "4.19.121-linuxkit", architecture: "x86_64", processor: "Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz", processor_count: "4", memory_total: "2036452 kB", swap_total: "1048572 kB", Bazel_version: "Build label: 3.1.0", Java_version: "1.8.0_275", Python_version: "2.7.12", gpp_version: "g++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609", swig_version: "", NVIDIA_driver_version: "", CUDA_device_count: "0", CUDA_device_names: "", CUDA_toolkit_version: ""} You have bazel 3.1.0 installed. Found possible Python library paths: /usr/local/lib/python3.7/dist-packages /usr/lib/python3/dist-packages Please input the desired Python library path to use. Default is [/usr/local/lib/python3.7/dist-packages] Do you wish to build TensorFlow with ROCm support? [y/N]: No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: No CUDA support will be enabled for TensorFlow.

Do you wish to download a fresh release of clang? (Experimental) [y/N]: Clang will not be downloaded.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native -Wno-sign-compare]:

Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: Not configuring the WORKSPACE for Android builds.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details. --config=mkl # Build with MKL support. --config=mkl_aarch64 # Build with oneDNN support for Aarch64. --config=monolithic # Config for mostly static monolithic build. --config=ngraph # Build with Intel nGraph support. --config=numa # Build with NUMA support. --config=dynamic_kernels # (Experimental) Build kernels into separate shared objects. --config=v2 # Build TensorFlow 2.x instead of 1.x. Preconfigured Bazel build configs to DISABLE default on features: --config=noaws # Disable AWS S3 filesystem support. --config=nogcp # Disable GCP support. --config=nohdfs # Disable HDFS support. --config=nonccl # Disable NVIDIA NCCL support. Configuration finished Building for the Pi Two/Three, with NEON acceleration INFO: Options provided by the client: Inherited 'common' options: --isatty=0 --terminal_columns=80 INFO: Reading rc options for 'build' from /etc/bazel.bazelrc: Inherited 'common' options: --color=yes INFO: Reading rc options for 'build' from /workspace/.bazelrc: Inherited 'common' options: --experimental_repo_remote_exec INFO: Reading rc options for 'build' from /etc/bazel.bazelrc: 'build' options: --verbose_failures --spawn_strategy=standalone --strategy=Genrule=standalone INFO: Reading rc options for 'build' from /workspace/.bazelrc: 'build' options: --apple_platform_type=macos --define framework_shared_object=true --define open_source_build=true --java_toolchain=//third_party/toolchains/java:tf_java_toolchain --host_java_toolchain=//third_party/toolchains/java:tf_java_toolchain --define=tensorflow_enable_mlir_generated_gpu_kernels=0 --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --noincompatible_prohibit_aapt1 --enable_platform_specific_config --config=short_logs --config=v2 INFO: Reading rc options for 'build' from /workspace/.tf_configure.bazelrc: 'build' options: --action_env PYTHON_BIN_PATH=/usr/local/bin/python3.7 --action_env PYTHON_LIB_PATH=/usr/local/lib/python3.7/dist-packages --python_path=/usr/local/bin/python3.7 --action_env TF_CONFIGURE_IOS=0 INFO: Found applicable config definition build:short_logs in file /workspace/.bazelrc: --output_filter=DONT_MATCH_ANYTHING INFO: Found applicable config definition build:v2 in file /workspace/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1 INFO: Found applicable config definition build:monolithic in file /workspace/.bazelrc: --define framework_shared_object=false INFO: Found applicable config definition build:linux in file /workspace/.bazelrc: --copt=-w --host_copt=-w --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 --config=dynamic_kernels INFO: Found applicable config definition build:dynamic_kernels in file /workspace/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS Loading: Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded DEBUG: Rule 'io_bazel_rules_go' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1557349968 -0400" DEBUG: Repository io_bazel_rules_go instantiated at: no stack (--record_rule_instantiation_callstack not enabled) Repository rule git_repository defined at: /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18: in Loading: 0 packages loaded Analyzing: 4 targets (3 packages loaded, 0 targets configured) Analyzing: 4 targets (60 packages loaded, 36 targets configured) DEBUG: Rule 'io_bazel_rules_docker' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1556410077 -0400" DEBUG: Repository io_bazel_rules_docker instantiated at: no stack (--record_rule_instantiation_callstack not enabled) Repository rule git_repository defined at: /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18: in Analyzing: 4 targets (183 packages loaded, 3775 targets configured)

Analyzing: 4 targets (194 packages loaded, 3818 targets configured)

Analyzing: 4 targets (196 packages loaded, 3818 targets configured) Analyzing: 4 targets (196 packages loaded, 3818 targets configured) INFO: Repository aws instantiated at: no stack (--record_rule_instantiation_callstack not enabled) Repository rule third_party_http_archive defined at: /workspace/third_party/repo.bzl:216:28: in WARNING: Download from https://mirror.bazel.build/github.com/aws/aws-sdk-cpp/archive/1.7.336.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found ERROR: An error occurred during the fetch of repository 'aws': java.io.IOException: Error extracting /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/aws/1.7.336.tar.gz to /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/aws: /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/aws/aws-cpp-sdk-dataexchange/include/aws/dataexchange/model/CreateJobResult.h (Input/output error) INFO: Repository aarch64_compiler instantiated at: no stack (--record_rule_instantiation_callstack not enabled) Repository rule tf_http_archive defined at: /workspace/third_party/repo.bzl:131:19: in ERROR: /workspace/tensorflow/tools/pip_package/BUILD:175:1: //tensorflow/tools/pip_package:licenses depends on @aws//:LICENSE in repository @aws which failed to fetch. no such package '@aws//': java.io.IOException: Error extracting /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/aws/1.7.336.tar.gz to /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/aws: /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/aws/aws-cpp-sdk-dataexchange/include/aws/dataexchange/model/CreateJobResult.h (Input/output error) ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: no such package '@aws//': java.io.IOException: Error extracting /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/aws/1.7.336.tar.gz to /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/aws: /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/aws/aws-cpp-sdk-dataexchange/include/aws/dataexchange/model/CreateJobResult.h (Input/output error) INFO: Elapsed time: 357.129s INFO: 0 processes. FAILED: Build did NOT complete successfully (206 packages loaded, 3958 targets configured)

terryheo commented 3 years ago

Could you check if your docker has enough memory assigned? https://docs.docker.com/docker-for-mac/#resources

My docker has 2GB memory assigned by default which is not enough to build TF. I changed it to 8GB and it works well.

google-ml-butler[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

mstfldmr commented 3 years ago

I increased Docker's memory to 8GB and cloned the repo fresh clean, but I'm getting this error now:

(base) aldemim@3c22fb0301d7 tensorflow % tensorflow/tools/ci_build/ci_build.sh PI-PYTHON37 \
    tensorflow/tools/ci_build/pi/build_raspberry_pi.sh
WORKSPACE: /Users/aldemim/ws/tensorflow
CI_DOCKER_BUILD_EXTRA_PARAMS: 
CI_DOCKER_EXTRA_PARAMS: 
COMMAND: tensorflow/tools/ci_build/pi/build_raspberry_pi.sh
CI_COMMAND_PREFIX: ./tensorflow/tools/ci_build/builds/with_the_same_user ./tensorflow/tools/ci_build/builds/configured pi-python37
CONTAINER_TYPE: pi-python37
BUILD_TAG: tf_ci
  (docker container name will be tf_ci.pi-python37)

Building container (tf_ci.pi-python37)...
[+] Building 1.6s (18/18) FINISHED                                                                                                                                    
 => [internal] load build definition from Dockerfile.pi-python37                                                                                                 0.0s
 => => transferring dockerfile: 49B                                                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                                                0.0s
 => => transferring context: 2B                                                                                                                                  0.0s
 => [internal] load metadata for docker.io/library/ubuntu:16.04                                                                                                  1.5s
 => [auth] library/ubuntu:pull token for registry-1.docker.io                                                                                                    0.0s
 => [ 1/12] FROM docker.io/library/ubuntu:16.04@sha256:e74994b7a9ec8e2129cfc6a871f3236940006ed31091de355578492ed140a39c                                          0.0s
 => [internal] load build context                                                                                                                                0.0s
 => => transferring context: 1.74kB                                                                                                                              0.0s
 => CACHED [ 2/12] COPY install/*.sh /install/                                                                                                                   0.0s
 => CACHED [ 3/12] RUN /install/install_bootstrap_deb_packages.sh                                                                                                0.0s
 => CACHED [ 4/12] RUN add-apt-repository -y ppa:openjdk-r/ppa &&     add-apt-repository -y ppa:george-edison55/cmake-3.x                                        0.0s
 => CACHED [ 5/12] RUN /install/install_deb_packages.sh                                                                                                          0.0s
 => CACHED [ 6/12] RUN /install/install_pi_python3x_toolchain.sh "3.7"                                                                                           0.0s
 => CACHED [ 7/12] RUN /install/install_bazel.sh                                                                                                                 0.0s
 => CACHED [ 8/12] RUN /install/install_proto3.sh                                                                                                                0.0s
 => CACHED [ 9/12] RUN /install/install_buildifier.sh                                                                                                            0.0s
 => CACHED [10/12] RUN /install/install_auditwheel.sh                                                                                                            0.0s
 => CACHED [11/12] RUN /install/install_golang.sh                                                                                                                0.0s
 => CACHED [12/12] COPY install/.bazelrc /etc/bazel.bazelrc                                                                                                      0.0s
 => exporting to image                                                                                                                                           0.0s
 => => exporting layers                                                                                                                                          0.0s
 => => writing image sha256:5ccb89c8d4daef8c9a88ec9a954fd73880c7d018f934dd94afad44524dd6964b                                                                     0.0s
 => => naming to docker.io/library/tf_ci.pi-python37                                                                                                             0.0s
Running 'tensorflow/tools/ci_build/pi/build_raspberry_pi.sh' inside tf_ci.pi-python37...
Reading package lists...
Building dependency tree...
Reading state information...
sudo is already the newest version (1.8.16-0ubuntu1.9).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
dialout:x:20:
adduser: Warning: The home directory `/Users/aldemim/ws/tensorflow/bazel-ci_build-cache' does not belong to the user you are currently creating.
/workspace /workspace
You have bazel 3.1.0 installed.
Found possible Python library paths:
  /usr/local/lib/python3.7/dist-packages
  /usr/lib/python3/dist-packages
Please input the desired Python library path to use.  Default is [/usr/local/lib/python3.7/dist-packages]
Do you wish to build TensorFlow with ROCm support? [y/N]: No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: No CUDA support will be enabled for TensorFlow.

Do you wish to download a fresh release of clang? (Experimental) [y/N]: Clang will not be downloaded.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -Wno-sign-compare]: 

Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: Not configuring the WORKSPACE for Android builds.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
        --config=mkl            # Build with MKL support.
        --config=mkl_aarch64    # Build with oneDNN support for Aarch64.
        --config=monolithic     # Config for mostly static monolithic build.
        --config=ngraph         # Build with Intel nGraph support.
        --config=numa           # Build with NUMA support.
        --config=dynamic_kernels        # (Experimental) Build kernels into separate shared objects.
        --config=v2             # Build TensorFlow 2.x instead of 1.x.
Preconfigured Bazel build configs to DISABLE default on features:
        --config=noaws          # Disable AWS S3 filesystem support.
        --config=nogcp          # Disable GCP support.
        --config=nohdfs         # Disable HDFS support.
        --config=nonccl         # Disable NVIDIA NCCL support.
/workspace
TF_BUILD_INFO = {container_type: "pi-python37", command: "tensorflow/tools/ci_build/pi/build_raspberry_pi.sh", source_HEAD: "85c8b2a817f95a3e979ecd1ed95bff1dc1335cff", source_remote_origin: "https://github.com/tensorflow/tensorflow", OS: "Linux", kernel: "4.19.121-linuxkit", architecture: "x86_64", processor: "Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz", processor_count: "4", memory_total: "8156056 kB", swap_total: "1048572 kB", Bazel_version: "Build label: 3.1.0", Java_version: "1.8.0_275", Python_version: "2.7.12", gpp_version: "g++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609", swig_version: "", NVIDIA_driver_version: "", CUDA_device_count: "0", CUDA_device_names: "", CUDA_toolkit_version: ""}
You have bazel 3.1.0 installed.
Found possible Python library paths:
  /usr/lib/python3/dist-packages
  /usr/local/lib/python3.7/dist-packages
Please input the desired Python library path to use.  Default is [/usr/lib/python3/dist-packages]
Do you wish to build TensorFlow with ROCm support? [y/N]: No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: No CUDA support will be enabled for TensorFlow.

Do you wish to download a fresh release of clang? (Experimental) [y/N]: Clang will not be downloaded.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -Wno-sign-compare]: 

Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: Not configuring the WORKSPACE for Android builds.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
        --config=mkl            # Build with MKL support.
        --config=mkl_aarch64    # Build with oneDNN support for Aarch64.
        --config=monolithic     # Config for mostly static monolithic build.
        --config=ngraph         # Build with Intel nGraph support.
        --config=numa           # Build with NUMA support.
        --config=dynamic_kernels        # (Experimental) Build kernels into separate shared objects.
        --config=v2             # Build TensorFlow 2.x instead of 1.x.
Preconfigured Bazel build configs to DISABLE default on features:
        --config=noaws          # Disable AWS S3 filesystem support.
        --config=nogcp          # Disable GCP support.
        --config=nohdfs         # Disable HDFS support.
        --config=nonccl         # Disable NVIDIA NCCL support.
Configuration finished
Building for the Pi Two/Three, with NEON acceleration
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=0 --terminal_columns=80
INFO: Reading rc options for 'build' from /etc/bazel.bazelrc:
  Inherited 'common' options: --color=yes
INFO: Reading rc options for 'build' from /workspace/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /etc/bazel.bazelrc:
  'build' options: --verbose_failures --spawn_strategy=standalone --strategy=Genrule=standalone
INFO: Reading rc options for 'build' from /workspace/.bazelrc:
  'build' options: --apple_platform_type=macos --define framework_shared_object=true --define open_source_build=true --java_toolchain=//third_party/toolchains/java:tf_java_toolchain --host_java_toolchain=//third_party/toolchains/java:tf_java_toolchain --define=tensorflow_enable_mlir_generated_gpu_kernels=0 --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --noincompatible_prohibit_aapt1 --enable_platform_specific_config --config=short_logs --config=v2
INFO: Reading rc options for 'build' from /workspace/.tf_configure.bazelrc:
  'build' options: --action_env PYTHON_BIN_PATH=/usr/local/bin/python3.7 --action_env PYTHON_LIB_PATH=/usr/lib/python3/dist-packages --python_path=/usr/local/bin/python3.7 --action_env TF_CONFIGURE_IOS=0
INFO: Found applicable config definition build:short_logs in file /workspace/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /workspace/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:monolithic in file /workspace/.bazelrc: --define framework_shared_object=false
INFO: Found applicable config definition build:linux in file /workspace/.bazelrc: --copt=-w --host_copt=-w --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 --config=dynamic_kernels
INFO: Found applicable config definition build:dynamic_kernels in file /workspace/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: tensorflow ... (2 packages)
Analyzing: 4 targets (3 packages loaded, 0 targets configured)
Analyzing: 4 targets (23 packages loaded, 36 targets configured)
Analyzing: 4 targets (47 packages loaded, 36 targets configured)
Analyzing: 4 targets (58 packages loaded, 36 targets configured)
Analyzing: 4 targets (71 packages loaded, 61 targets configured)
Analyzing: 4 targets (72 packages loaded, 61 targets configured)
Analyzing: 4 targets (75 packages loaded, 180 targets configured)
Analyzing: 4 targets (82 packages loaded, 215 targets configured)
Analyzing: 4 targets (118 packages loaded, 779 targets configured)
Analyzing: 4 targets (159 packages loaded, 3138 targets configured)
Analyzing: 4 targets (198 packages loaded, 3947 targets configured)
Analyzing: 4 targets (225 packages loaded, 4235 targets configured)
Analyzing: 4 targets (238 packages loaded, 4934 targets configured)
Analyzing: 4 targets (260 packages loaded, 5512 targets configured)
Analyzing: 4 targets (267 packages loaded, 5600 targets configured)
Analyzing: 4 targets (267 packages loaded, 5600 targets configured)
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/www.sqlite.org/2020/sqlite-amalgamation-3340000.zip failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
Analyzing: 4 targets (272 packages loaded, 5794 targets configured)
Analyzing: 4 targets (293 packages loaded, 6686 targets configured)
Analyzing: 4 targets (314 packages loaded, 8590 targets configured)
Analyzing: 4 targets (314 packages loaded, 8590 targets configured)
Analyzing: 4 targets (314 packages loaded, 8590 targets configured)
Analyzing: 4 targets (343 packages loaded, 9198 targets configured)
Analyzing: 4 targets (343 packages loaded, 9198 targets configured)
Analyzing: 4 targets (343 packages loaded, 9198 targets configured)
Analyzing: 4 targets (345 packages loaded, 9671 targets configured)
Analyzing: 4 targets (345 packages loaded, 9694 targets configured)
Analyzing: 4 targets (345 packages loaded, 9694 targets configured)
Analyzing: 4 targets (345 packages loaded, 9694 targets configured)
Analyzing: 4 targets (349 packages loaded, 10112 targets configured)
Analyzing: 4 targets (349 packages loaded, 10112 targets configured)
Analyzing: 4 targets (349 packages loaded, 10112 targets configured)
Analyzing: 4 targets (354 packages loaded, 10138 targets configured)
Analyzing: 4 targets (355 packages loaded, 10235 targets configured)
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
Analyzing: 4 targets (361 packages loaded, 14512 targets configured)
Analyzing: 4 targets (368 packages loaded, 16383 targets configured)
Analyzing: 4 targets (397 packages loaded, 23608 targets configured)
Analyzing: 4 targets (398 packages loaded, 25473 targets configured)
Analyzing: 4 targets (398 packages loaded, 25473 targets configured)
Analyzing: 4 targets (398 packages loaded, 25473 targets configured)
INFO: Analyzed 4 targets (403 packages loaded, 33805 targets configured).
INFO: Found 4 targets...
[0 / 1,422] [Prepa] BazelWorkspaceStatusAction stable-status.txt ... (2 actions, 0 running)
[159 / 1,611] Compiling external/com_google_protobuf/src/google/protobuf/compiler/main.cc [for host]; 3s local ... (4 actions, 3 running)
[580 / 2,392] Compiling external/llvm-project/mlir/tools/mlir-tblgen/mlir-tblgen.cpp [for host]; 4s local ... (4 actions, 3 running)
[928 / 2,891] Compiling tensorflow/core/lib/io/zlib_compression_options.cc [for host]; 2s local ... (4 actions, 3 running)
[1,475 / 4,108] Compiling external/llvm-project/llvm/utils/TableGen/Attributes.cpp [for host]; 4s local ... (4 actions, 3 running)

[3,041 / 9,193] Compiling external/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp; 12s local ... (4 actions, 3 running)
[3,498 / 9,193] Compiling tensorflow/core/data/service/credentials_factory.cc; 9s local ... (4 actions, 3 running)
[3,966 / 9,193] Compiling external/aws/aws-cpp-sdk-s3/source/S3Client.cpp; 17s local ... (4 actions, 3 running)
[4,996 / 9,193] Compiling tensorflow/core/protobuf/cluster.pb.cc [for host]; 6s local ... (4 actions, 3 running)
[5,342 / 9,193] Compiling tensorflow/compiler/xla/service/hlo_evaluator_typed_visitor_uint16.cc; 32s local ... (4 actions running)
[5,714 / 9,193] Compiling tensorflow/core/kernels/padding_fifo_queue.cc; 21s local ... (4 actions, 3 running)
[6,086 / 9,193] Compiling tensorflow/core/kernels/identity_reader_op.cc; 16s local ... (4 actions running)
[6,425 / 9,193] Compiling tensorflow/core/kernels/batch_matmul_op_real.cc; 154s local ... (4 actions, 3 running)
ERROR: /workspace/tensorflow/core/kernels/BUILD:3376:1: C++ compilation of rule '//tensorflow/core/kernels:cwise_op' failed (Exit 4): arm-rpi-linux-gnueabihf-gcc failed: error executing command 
  (cd /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/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/local/bin/python3.7 \
    PYTHON_LIB_PATH=/usr/lib/python3/dist-packages \
    TF2_BEHAVIOR=1 \
    TF_CONFIGURE_IOS=0 \
  /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/arm_compiler/bin/arm-rpi-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 /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/arm_compiler/lib/gcc/arm-rpi-linux-gnueabihf/6.5.0/include -isystem /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/arm_compiler/lib/gcc/arm-rpi-linux-gnueabihf/6.5.0/include-fixed -isystem /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/arm_compiler/arm-rpi-linux-gnueabihf/include/c++/6.5.0/ -isystem /Users/aldemim/ws/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_aldemim/eab0d61a99b6696edb3d2aff87b585e8/external/arm_compiler/arm-rpi-linux-gnueabihf/sysroot/usr/include/ -isystem /usr/include/python3.7 -isystem /usr/include/ -MD -MF bazel-out/armeabi-opt/bin/tensorflow/core/kernels/_objs/cwise_op/cwise_op_select.pic.d '-frandom-seed=bazel-out/armeabi-opt/bin/tensorflow/core/kernels/_objs/cwise_op/cwise_op_select.pic.o' -fPIC -DCURL_STATICLIB -DTF_USE_SNAPPY -DHAVE_SYS_UIO_H -D__CLANG_SUPPORT_DYN_ANNOTATION__ -DEIGEN_MPL2_ONLY '-DEIGEN_MAX_ALIGN_BYTES=64' '-DEIGEN_HAS_TYPE_TRAITS=0' -iquote . -iquote bazel-out/armeabi-opt/bin -iquote external/com_google_absl -iquote bazel-out/armeabi-opt/bin/external/com_google_absl -iquote external/nsync -iquote bazel-out/armeabi-opt/bin/external/nsync -iquote external/eigen_archive -iquote bazel-out/armeabi-opt/bin/external/eigen_archive -iquote external/gif -iquote bazel-out/armeabi-opt/bin/external/gif -iquote external/libjpeg_turbo -iquote bazel-out/armeabi-opt/bin/external/libjpeg_turbo -iquote external/com_google_protobuf -iquote bazel-out/armeabi-opt/bin/external/com_google_protobuf -iquote external/zlib -iquote bazel-out/armeabi-opt/bin/external/zlib -iquote 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/bin/external/farmhash_archive -iquote external/fft2d -iquote bazel-out/armeabi-opt/bin/external/fft2d -iquote external/highwayhash -iquote bazel-out/armeabi-opt/bin/external/highwayhash -iquote external/double_conversion -iquote bazel-out/armeabi-opt/bin/external/double_conversion -iquote external/snappy -iquote bazel-out/armeabi-opt/bin/external/snappy -iquote external/curl -iquote bazel-out/armeabi-opt/bin/external/curl -iquote external/boringssl -iquote bazel-out/armeabi-opt/bin/external/boringssl -iquote external/jsoncpp_git -iquote bazel-out/armeabi-opt/bin/external/jsoncpp_git -iquote external/aws -iquote bazel-out/armeabi-opt/bin/external/aws -iquote external/aws-c-common -iquote bazel-out/armeabi-opt/bin/external/aws-c-common -iquote external/aws-c-event-stream -iquote bazel-out/armeabi-opt/bin/external/aws-c-event-stream -iquote external/aws-checksums -iquote bazel-out/armeabi-opt/bin/external/aws-checksums -isystem external/nsync/public -isystem bazel-out/armeabi-opt/bin/external/nsync/public -isystem external/eigen_archive -isystem bazel-out/armeabi-opt/bin/external/eigen_archive -isystem external/gif -isystem bazel-out/armeabi-opt/bin/external/gif -isystem external/com_google_protobuf/src -isystem bazel-out/armeabi-opt/bin/external/com_google_protobuf/src -isystem external/zlib -isystem bazel-out/armeabi-opt/bin/external/zlib -isystem external/farmhash_archive/src -isystem bazel-out/armeabi-opt/bin/external/farmhash_archive/src -isystem external/double_conversion -isystem bazel-out/armeabi-opt/bin/external/double_conversion -isystem external/curl/include -isystem bazel-out/armeabi-opt/bin/external/curl/include -isystem external/boringssl/src/include -isystem bazel-out/armeabi-opt/bin/external/boringssl/src/include -isystem 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/bin/external/aws/aws-cpp-sdk-core/include -isystem external/aws/aws-cpp-sdk-s3/include -isystem bazel-out/armeabi-opt/bin/external/aws/aws-cpp-sdk-s3/include -isystem external/aws/aws-cpp-sdk-transfer/include -isystem bazel-out/armeabi-opt/bin/external/aws/aws-cpp-sdk-transfer/include -isystem external/aws-c-common/include -isystem bazel-out/armeabi-opt/bin/external/aws-c-common/include -isystem external/aws-c-event-stream/include -isystem bazel-out/armeabi-opt/bin/external/aws-c-event-stream/include -isystem external/aws-checksums/include -isystem bazel-out/armeabi-opt/bin/external/aws-checksums/include -w -DAUTOLOAD_DYNAMIC_KERNELS '-march=armv7-a' '-mfpu=neon-vfpv4' '-std=gnu11' '-DS_IREAD=S_IRUSR' '-DS_IWRITE=S_IWUSR' -O3 -fno-tree-pre -fpermissive -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 '-std=c++14' -DEIGEN_AVOID_STL_ARRAY -Iexternal/gemmlowp -Wno-sign-compare '-ftemplate-depth=900' -fno-exceptions -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/cwise_op_select.cc -o bazel-out/armeabi-opt/bin/tensorflow/core/kernels/_objs/cwise_op/cwise_op_select.pic.o)
Execution platform: @local_execution_config_platform//:platform
In file included from external/com_google_absl/absl/container/inlined_vector.h:53:0,
                 from ./tensorflow/core/lib/gtl/inlined_vector.h:19,
                 from ./tensorflow/core/lib/gtl/array_slice.h:22,
                 from ./tensorflow/core/framework/tensor_shape.h:26,
                 from ./tensorflow/core/framework/resource_handle.h:19,
                 from ./tensorflow/core/framework/register_types.h:21,
                 from tensorflow/core/kernels/cwise_op_select.cc:23:
external/com_google_absl/absl/container/internal/inlined_vector.h: In member function 'void absl::lts_2020_02_25::inlined_vector_internal::Storage<T, N, A>::Resize(ValueAdapter, absl::lts_2020_02_25::inlined_vector_internal::Storage<T, N, A>::size_type) [with ValueAdapter = absl::lts_2020_02_25::inlined_vector_internal::DefaultValueAdapter<std::allocator<long long int> >; T = long long int; unsigned int N = 4u; A = std::allocator<long long int>]':
external/com_google_absl/absl/container/internal/inlined_vector.h:543:6: note: parameter passing for argument of type 'absl::lts_2020_02_25::inlined_vector_internal::DefaultValueAdapter<std::allocator<long long int> >' will change in GCC 7.1
 auto Storage<T, N, A>::Resize(ValueAdapter values, size_type new_size) -> void {
      ^~~~~~~~~~~~~~~~
external/com_google_absl/absl/container/internal/inlined_vector.h: In member function 'void absl::lts_2020_02_25::inlined_vector_internal::Storage<T, N, A>::Resize(ValueAdapter, absl::lts_2020_02_25::inlined_vector_internal::Storage<T, N, A>::size_type) [with ValueAdapter = absl::lts_2020_02_25::inlined_vector_internal::CopyValueAdapter<std::allocator<long long int> >; T = long long int; unsigned int N = 4u; A = std::allocator<long long int>]':
external/com_google_absl/absl/container/internal/inlined_vector.h:543:6: note: parameter passing for argument of type 'absl::lts_2020_02_25::inlined_vector_internal::CopyValueAdapter<std::allocator<long long int> >' will change in GCC 7.1
external/com_google_absl/absl/container/internal/inlined_vector.h:543:6: note: parameter passing for argument of type 'absl::lts_2020_02_25::inlined_vector_internal::CopyValueAdapter<std::allocator<long long int> >' will change in GCC 7.1
In file included from ./tensorflow/core/lib/gtl/inlined_vector.h:19:0,
                 from ./tensorflow/core/lib/gtl/array_slice.h:22,
                 from ./tensorflow/core/framework/tensor_shape.h:26,
                 from ./tensorflow/core/framework/resource_handle.h:19,
                 from ./tensorflow/core/framework/register_types.h:21,
                 from tensorflow/core/kernels/cwise_op_select.cc:23:
external/com_google_absl/absl/container/inlined_vector.h: In constructor 'tensorflow::BCastList<N>::BCastList(const Vec (&)[N], bool, bool) [with int N = 2]':
external/com_google_absl/absl/container/inlined_vector.h:547:30: note: parameter passing for argument of type 'absl::lts_2020_02_25::inlined_vector_internal::DefaultValueAdapter<std::allocator<long long int> >' will change in GCC 7.1
   void resize(size_type n) { storage_.Resize(DefaultValueAdapter(), n); }
                              ^~~~~~~~
external/com_google_absl/absl/container/inlined_vector.h:555:5: note: parameter passing for argument of type 'absl::lts_2020_02_25::InlinedVector<long long int, 4u>::CopyValueAdapter {aka absl::lts_2020_02_25::inlined_vector_internal::CopyValueAdapter<std::allocator<long long int> >}' will change in GCC 7.1
     storage_.Resize(CopyValueAdapter(v), n);
     ^~~~~~~~
external/com_google_absl/absl/container/inlined_vector.h:555:5: note: parameter passing for argument of type 'absl::lts_2020_02_25::InlinedVector<long long int, 4u>::CopyValueAdapter {aka absl::lts_2020_02_25::inlined_vector_internal::CopyValueAdapter<std::allocator<long long int> >}' will change in GCC 7.1
external/com_google_absl/absl/container/inlined_vector.h: In constructor 'tensorflow::BCastList<N>::BCastList(const Vec (&)[N], bool, bool) [with int N = 3]':
external/com_google_absl/absl/container/inlined_vector.h:547:30: note: parameter passing for argument of type 'absl::lts_2020_02_25::inlined_vector_internal::DefaultValueAdapter<std::allocator<long long int> >' will change in GCC 7.1
   void resize(size_type n) { storage_.Resize(DefaultValueAdapter(), n); }
                              ^~~~~~~~
external/com_google_absl/absl/container/inlined_vector.h:555:5: note: parameter passing for argument of type 'absl::lts_2020_02_25::InlinedVector<long long int, 4u>::CopyValueAdapter {aka absl::lts_2020_02_25::inlined_vector_internal::CopyValueAdapter<std::allocator<long long int> >}' will change in GCC 7.1
     storage_.Resize(CopyValueAdapter(v), n);
     ^~~~~~~~
external/com_google_absl/absl/container/inlined_vector.h:555:5: note: parameter passing for argument of type 'absl::lts_2020_02_25::InlinedVector<long long int, 4u>::CopyValueAdapter {aka absl::lts_2020_02_25::inlined_vector_internal::CopyValueAdapter<std::allocator<long long int> >}' will change in GCC 7.1
external/com_google_absl/absl/container/inlined_vector.h:555:5: note: parameter passing for argument of type 'absl::lts_2020_02_25::InlinedVector<long long int, 4u>::CopyValueAdapter {aka absl::lts_2020_02_25::inlined_vector_internal::CopyValueAdapter<std::allocator<long long int> >}' will change in GCC 7.1
arm-rpi-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: 9117.058s, Critical Path: 427.25s
INFO: 4708 processes: 4708 local.
FAILED: Build did NOT complete successfully
sanatmpa1 commented 2 years ago

@mstfldmr,

We are checking to see if you still need help on this issue. Can you try following this guide to build TF lite for Rasperry-Pi and let us know if the issue still persists? Thanks!

google-ml-butler[bot] commented 2 years ago

This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you.

google-ml-butler[bot] commented 2 years ago

Closing as stale. Please reopen if you'd like to work on this further.

google-ml-butler[bot] commented 2 years ago

Are you satisfied with the resolution of your issue? Yes No