Skip to content

Build fails when building using the Docker container of ARMNN build tool #823

Description

@vincentwan-mythic

I am on the main branch (2b61cecc9df7a43fca1463795062cf359e6be820) and built armnn according to the instructions after installing Docker:
/home/user/armnn/build-tool$ docker build --build-arg SETUP_ARGS="--target-arch=aarch64 --all" --build-arg BUILD_ARGS="--target-arch=aarch64 --all --neon-backend --cl-backend" --tag armnn:aarch64 --file docker/Dockerfile .

This resulted in an error:

428.9 ***** Building LiteRT for aarch64 *****
428.9 +++ Running Bazel build: /home/arm-user/source/bazelisk/bazelisk build --define xnn_enable_avx512amx=false --define xnn_enable_avxvnniint8=false --define xnn_enable_avxvnni=false --define xnn_enable_avx512fp16=false --cpu=aarch64 --host_cpu=aarch64 //tflite:tensorflowlite //tflite/c:libtensorflowlite_c.so //tflite/kernels:custom_ops //tflite/core/acceleration/configuration:delegate_registry
428.9 2026/07/21 03:44:59 Downloading https://releases.bazel.build/7.4.1/release/bazel-7.4.1-linux-x86_64...
432.2 Extracting Bazel installation...
433.7 Starting local Bazel server and connecting to it...
435.1 INFO: Reading 'startup' options from /home/arm-user/source/LiteRT/.bazelrc: --windows_enable_symlinks
435.1 INFO: Options provided by the client:
435.1 Inherited 'common' options: --isatty=0 --terminal_columns=80
435.1 INFO: Reading rc options for 'build' from /home/arm-user/source/LiteRT/.bazelrc:
435.1 Inherited 'common' options: --experimental_repo_remote_exec --experimental_repo_remote_exec --noenable_bzlmod --noincompatible_enable_cc_toolchain_resolution --noincompatible_enable_android_toolchain_resolution
435.1 INFO: Reading rc options for 'build' from /home/arm-user/source/LiteRT/.bazelrc:
435.1 'build' options: --repo_env=USE_PYWRAP_RULES=True --copt=-DGRPC_BAZEL_BUILD --host_copt=-DGRPC_BAZEL_BUILD --action_env=GRPC_BAZEL_RUNTIME=1 --repo_env=PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=upb --action_env=PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=upb --repo_env=RULES_PYTHON_ENABLE_PYSTAR=0 --define framework_shared_object=true --define tsl_protobuf_header_only=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --features=-force_no_whole_archive --host_features=-force_no_whole_archive --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --experimental_cc_shared_library --experimental_link_static_libraries_once=false --incompatible_enforce_config_setting_visibility --config=v2 --config=litert_prefixes
435.1 INFO: Found applicable config definition build:short_logs in file /home/arm-user/source/LiteRT/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
435.1 INFO: Found applicable config definition build:v2 in file /home/arm-user/source/LiteRT/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
435.1 INFO: Found applicable config definition build:litert_prefixes in file /home/arm-user/source/LiteRT/.bazelrc: --define=litert_prefixes=external/org_tensorflow/
435.1 INFO: Found applicable config definition build:linux in file /home/arm-user/source/LiteRT/.bazelrc: --host_copt=-w --copt=-Wno-all --copt=-Wno-extra --copt=-Wno-deprecated --copt=-Wno-deprecated-declarations --copt=-Wno-ignored-attributes --copt=-Wno-array-bounds --copt=-Wunused-result --copt=-Werror=unused-result --copt=-Wswitch --copt=-Werror=switch --copt=-Wno-gnu-offsetof-extensions --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --config=dynamic_kernels --experimental_guard_against_concurrent_changes
435.1 INFO: Found applicable config definition build:dynamic_kernels in file /home/arm-user/source/LiteRT/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS
435.2 Computing main repo mapping:
436.2 Computing main repo mapping:
437.2 Computing main repo mapping:
438.3 Computing main repo mapping:
439.4 Computing main repo mapping:
440.4 Computing main repo mapping:
441.4 Computing main repo mapping:
442.4 Computing main repo mapping:
443.5 Computing main repo mapping:
444.5 Computing main repo mapping:
445.6 Computing main repo mapping:
447.2 Computing main repo mapping:
450.1 Computing main repo mapping:
451.1 Computing main repo mapping:
451.1 DEBUG: /home/arm-user/.cache/bazel/_bazel_arm-user/f186de38da7ce35d5ec1d6e21ef0ee64/external/local_xla/third_party/py/python_repo.bzl:82:14: !!!Using pywrap rules instead of directly creating .so objects!!!
451.1 DEBUG: /home/arm-user/.cache/bazel/_bazel_arm-user/f186de38da7ce35d5ec1d6e21ef0ee64/external/local_xla/third_party/py/python_repo.bzl:87:10:
451.1 =============================
451.1 Hermetic Python configuration:
451.1 Version: "3.10"
451.1 Kind: ""
451.1 Interpreter: "default" (provided by rules_python)
451.1 Requirements_lock label: "@python_version_repo//:requirements_lock_3_10.txt"
451.1 =====================================
452.1 Computing main repo mapping:
453.2 Computing main repo mapping:
454.2 Computing main repo mapping:
455.2 Computing main repo mapping:
456.2 Computing main repo mapping:
457.2 Computing main repo mapping:
458.3 Computing main repo mapping:
459.3 Computing main repo mapping:
460.3 Computing main repo mapping:
461.3 Computing main repo mapping:
462.5 Computing main repo mapping:
463.7 Computing main repo mapping:
464.9 Computing main repo mapping:
466.1 Computing main repo mapping:
467.2 Computing main repo mapping:
468.2 Computing main repo mapping:
480.2 Computing main repo mapping:
481.2 Computing main repo mapping:
481.2 WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/protocolbuffers/protobuf/archive/refs/tags/v5.28.3.zip failed: class java.io.FileNotFoundException GET returned 404 Not Found
482.2 Computing main repo mapping:
483.3 Computing main repo mapping:
484.4 Computing main repo mapping:
485.5 Computing main repo mapping:
486.6 Loading:
486.6 Loading: 0 packages loaded
486.6 DEBUG: /home/arm-user/.cache/bazel/_bazel_arm-user/f186de38da7ce35d5ec1d6e21ef0ee64/external/local_xla/third_party/gpus/cuda/hermetic/cuda_configure.bzl:73:14: Cannot find clang, either correct your path, or set the CLANG_CUDA_COMPILER_PATH or CC environment variables
487.3 Analyzing: 4 targets (4 packages loaded, 0 targets configured)
487.3 Analyzing: 4 targets (4 packages loaded, 0 targets configured)
487.3
488.7 Analyzing: 4 targets (61 packages loaded, 43 targets configured)
488.7
489.9 Analyzing: 4 targets (61 packages loaded, 43 targets configured)
489.9
491.0 Analyzing: 4 targets (61 packages loaded, 43 targets configured)
491.0
492.2 Analyzing: 4 targets (61 packages loaded, 43 targets configured)
492.2
493.2 Analyzing: 4 targets (61 packages loaded, 43 targets configured)
493.2
494.2 Analyzing: 4 targets (72 packages loaded, 447 targets configured)
494.2
494.9 ERROR: /home/arm-user/.cache/bazel/_bazel_arm-user/f186de38da7ce35d5ec1d6e21ef0ee64/external/local_config_cc/BUILD:72:19: in cc_toolchain_suite rule @@local_config_cc//:toolchain: cc_toolchain_suite '@@local_config_cc//:toolchain' does not contain a toolchain for cpu 'aarch64'
494.9 ERROR: /home/arm-user/.cache/bazel/_bazel_arm-user/f186de38da7ce35d5ec1d6e21ef0ee64/external/local_config_cc/BUILD:72:19: Analysis of target '@@local_config_cc//:toolchain' failed
495.0 ERROR: Analysis of target '//tflite/core/acceleration/configuration:delegate_registry' failed; build aborted: Analysis failed
495.0 INFO: Elapsed time: 62.727s, Critical Path: 0.05s
495.0 INFO: 1 process: 1 internal.
495.0 ERROR: Build did NOT complete successfully
495.0 FAILED:

5 warnings found (use docker --debug to expand):

  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 12)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 27)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 28)
  • FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 60)
  • FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 73)
    Dockerfile:57

55 | ARG SETUP_ARGS=""
56 | RUN echo "SETUP_ARGS: $SETUP_ARGS"
57 | >>> RUN ./setup-armnn.sh $SETUP_ARGS
58 |
59 | # This build-dev stage (inherits 'build-production' stage) is only used in final image if $BUILD_TYPE is 'dev'

ERROR: failed to build: failed to solve: process "/bin/sh -c ./setup-armnn.sh $SETUP_ARGS" did not complete successfully: exit code: 1

Is there something I am missing? I would have expected the container to build since I am running docker build per the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions