0

I have been following the guide at https://www.tensorflow.org/lite/guide/build_arm in an attempt to compile TfLite for a Nvidia Jetson Nano. Following the instructions for the c++ install, I've installed Bazel and proceeded to build, only to get the following error:

ERROR: /home/user/tensorflow/tensorflow_src/tensorflow/lite/kernels/internal/BUILD:857:11: Compiling tensorflow/lite/kernels/internal/mfcc.cc failed: (Exit 2): aarch64-linux-gnu-gcc failed: error executing command
  (cd /home/user/.cache/bazel/_bazel_user/d40cf1f049552d54fe67262adae8a272/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/user/.cache/bazelisk/downloads/bazelbuild/bazel-5.3.0-linux-arm64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin \
    PWD=/proc/self/cwd \
    TF2_BEHAVIOR=1 \
  /home/user/.cache/bazel/_bazel_user/d40cf1f049552d54fe67262adae8a272/external/aarch64_linux_toolchain/bin/aarch64-linux-gnu-gcc -fstack-protector -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections -isystem /home/user/.cache/bazel/_bazel_user/d40cf1f049552d54fe67262adae8a272/external/aarch64_linux_toolchain/lib/gcc/aarch64-linux-gnu/8.3.0/include -isystem /home/user/.cache/bazel/_bazel_user/d40cf1f049552d54fe67262adae8a272/external/aarch64_linux_toolchain/lib/gcc/aarch64-linux-gnu/8.3.0/include-fixed -isystem /home/user/.cache/bazel/_bazel_user/d40cf1f049552d54fe67262adae8a272/external/aarch64_linux_toolchain/aarch64-linux-gnu/include/c++/8.3.0/ -isystem /home/user/.cache/bazel/_bazel_user/d40cf1f049552d54fe67262adae8a272/external/aarch64_linux_toolchain/aarch64-linux-gnu/libc/usr/include/ -isystem /usr/include/python3.5 -isystem /usr/include/ -MD -MF bazel-out/aarch64-opt/bin/tensorflow/lite/kernels/internal/_objs/audio_utils/mfcc.pic.d '-frandom-seed=bazel-out/aarch64-opt/bin/tensorflow/lite/kernels/internal/_objs/audio_utils/mfcc.pic.o' -fPIC -iquote . -iquote bazel-out/aarch64-opt/bin -iquote external/fft2d -iquote bazel-out/aarch64-opt/bin/external/fft2d -Wno-all -Wno-extra -Wno-deprecated -Wno-deprecated-declarations -Wno-ignored-attributes -Wno-unknown-warning -Wno-array-parameter -Wno-stringop-overflow -Wno-array-bounds -Wunused-result '-Werror=unused-result' -DAUTOLOAD_DYNAMIC_KERNELS '-std=c++17' -DFARMHASH_NO_CXX_STRING -Wno-sign-compare -O3 -fno-exceptions -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -no-canonical-prefixes -fno-canonical-system-headers -c tensorflow/lite/kernels/internal/mfcc.cc -o bazel-out/aarch64-opt/bin/tensorflow/lite/kernels/internal/_objs/audio_utils/mfcc.pic.o)
# Configuration: ab27fd0d011bfd59c6f8c4ad9e07f710413fd94d9d706bfa323f3377eb0d533e
# Execution platform: @local_execution_config_platform//:platform
/home/user/.cache/bazel/_bazel_user/d40cf1f049552d54fe67262adae8a272/external/aarch64_linux_toolchain/bin/aarch64-linux-gnu-gcc: 1: /home/user/.cache/bazel/_bazel_user/d40cf1f049552d54fe67262adae8a272/external/aarch64_linux_toolchain/bin/aarch64-linux-gnu-gcc: Syntax error: "(" unexpected

Checking the file where it exploded, this seems to be the line in question

# Audio support classes imported directly from TensorFlow.
cc_library(
    name = "audio_utils",
    srcs = [
        "mfcc.cc",
        "mfcc_dct.cc",
        "mfcc_mel_filterbank.cc",
        "spectrogram.cc",
    ],
    hdrs = [
        "mfcc.h",
        "mfcc_dct.h",
        "mfcc_mel_filterbank.h",
        "spectrogram.h",
    ],
    compatible_with = get_compatible_with_portable(),
    copts = tflite_copts(),
    deps = [
        "//third_party/fft2d:fft2d_headers",
        "@fft2d",
    ],
)

But I have no idea why it would have an issue here in particular. This is an otherwise clean OS install. Any idea what might be causing this?

0 Answers0