Skip to content

LiteRT 2.1.2 //litert/kotlin:litert compile issue #6135

@lyranyueya

Description

@lyranyueya

from issue#4360
this issue has been fixed in the commit dd126b9

Now I use LiteRT 2.1.2 code and use this commit to change the code
NDK version : 21.4.7075529
Command bazel build --config=android_arm64 //litert/kotlin:litert

Issue is like this:

root@1f028d386a7f:/workspace# bazel build --config=android_arm64 //litert/kotlin:litert
INFO: Reading 'startup' options from /workspace/.bazelrc: --windows_enable_symlinks
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=283
INFO: Reading rc options for 'build' from /workspace/.bazelrc:
  Inherited 'common' options: --incompatible_default_to_explicit_init_py --copt=-DMLIR_PYTHON_PACKAGE_PREFIX=ai_edge_litert.mlir. --copt=-DNB_DOMAIN=litert --registry=https://raw.githubusercontent.com/bazelbuild/bazel-central-registry/main/ --experimental_repo_remote_exec --experimental_repo_remote_exec --noenable_bzlmod
INFO: Reading rc options for 'build' from /etc/bazel.bazelrc:
  'build' options: --action_env=DOCKER_CACHEBUSTER=1760025221404393282 --host_action_env=DOCKER_HOST_CACHEBUSTER=1760025221713450770
INFO: Reading rc options for 'build' from /workspace/.bazelrc:
  'build' options: --incompatible_enable_cc_toolchain_resolution --repo_env USE_HERMETIC_CC_TOOLCHAIN=1 --repo_env=USE_PYWRAP_RULES=True --copt=-DGRPC_BAZEL_BUILD --cxxopt=-std=gnu++17 --cxxopt=-fpermissive --host_copt=-DGRPC_BAZEL_BUILD --host_cxxopt=-fpermissive --action_env=GRPC_BAZEL_RUNTIME=1 --repo_env=PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=upb --action_env=PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=upb --@rules_python//python/config_settings:precompile=force_disabled --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 --define=disable_tf_lite_py=true
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:litert_prefixes in file /workspace/.bazelrc: --define=litert_prefixes=external/org_tensorflow/
INFO: Found applicable config definition build:android_arm64 in file /workspace/.bazelrc: --config=android --cpu=arm64-v8a --fat_apk_cpu=arm64-v8a --platforms=@org_tensorflow//tensorflow/tools/toolchains/android:arm64-v8a
INFO: Found applicable config definition build:android in file /workspace/.bazelrc: --config=clang_local --crosstool_top=//external:android/crosstool --host_crosstool_top=@bazel_tools//tools/cpp:toolchain --dynamic_mode=off --define=xnn_enable_avxvnniint8=false --noenable_platform_specific_config --copt=-w --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --define=with_xla_support=false
INFO: Found applicable config definition build:clang_local in file /workspace/.bazelrc: --noincompatible_enable_cc_toolchain_resolution --noincompatible_enable_android_toolchain_resolution --repo_env USE_HERMETIC_CC_TOOLCHAIN=1
INFO: Analyzed target //litert/kotlin:litert (250 packages loaded, 27833 targets configured).
ERROR: /workspace/litert/runtime/BUILD:111:11: Compiling litert/runtime/dmabuf_buffer.cc failed: (Exit 1): clang failed: error executing CppCompile command (from target //litert/runtime:dmabuf_buffer) external/androidndk/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -gcc-toolchain external/androidndk/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 -target ... (remaining 50 arguments skipped)
litert/runtime/dmabuf_buffer.cc:33:10: fatal error: 'linux/dma-heap.h' file not found
#include <linux/dma-heap.h>
         ^~~~~~~~~~~~~~~~~~
1 error generated.
Target //litert/kotlin:litert failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 29.382s, Critical Path: 4.00s
INFO: 630 processes: 330 internal, 300 local.
ERROR: Build did NOT complete successfully

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions