Hi all,
In the "i.MX Machine Learning User's Guide" (UG10166) section 2.6.2 there are detailed instructions for building the TensorFlow Lite Library with the Flex Delegate for i.MX Linux platforms. I need this to execute inference in a TF model containing processing nodes named FlexErf. Unfortunately the build is failing for me, even though the instructions are based on a Docker that includes the entire build environment and is not supposed to be affected by the environment on which it's running. I have tried this on Ubuntu 20.04, Ubuntu 22.04 and Linux Mint 22.1 systems with the same error.
Here are the commands I am entering. On Ubuntu 20 I had to add '--network host' to the docker run line.
$ git clone https://github.com/nxp-imx/tensorflow-imx.git -b lf-6.12.3_1.0.0
$ cd tensorflow-imx
$ docker pull tensorflow/build:2.18-python3.12
$ docker run -e "no_proxy=localhost,127.0.0.1" -it -w /tensorflow -v /`pwd`:/tensorflow -e HOST_PERMS="\\((id -u):\\)(id -g)" tensorflow/build:2.18-python3.12
tf-docker /tensorflow > ./configure # accepted all defaults
tf-docker /tensorflow > bazel --output_base=/tensorflow/docker-build/ build --config=monolithic --config=elinux_aarch64 -c opt --cxxopt='--std=c++17' --host_crosstool_top=@bazel_tools//tools/cpp:toolchain //tensorflow/lite/delegates/flex/test:benchmark_model_plus_flex_full
The error I am receiving is:
ERROR: /tensorflow/docker-build/external/icu/BUILD.bazel:33:11: Compiling icu4c/source/common/brkiter.cpp failed: (Exit 1): aarch64-none-linux-gnu-gcc failed: error executing command (from target @icu//:icuuc) /tensorflow/docker-build/external/aarch64_linux_toolchain/bin/aarch64-none-linux-gnu-gcc -fstack-protector -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections -isystem ... (remaining 50 arguments skipped)
In file included from external/icu/icu4c/source/common/brkiter.cpp:27:
external/icu/icu4c/source/common/unicode/rbbi.h:263:19: error: conflicting return type specified for 'virtual UBool icu_70::RuleBasedBreakIterator::operator==(const icu_70::BreakIterator&) const'
263 | virtual UBool operator==(const BreakIterator& that) const;
| ^~~~~~~~
In file included from external/icu/icu4c/source/common/unicode/rbbi.h:30,
from external/icu/icu4c/source/common/brkiter.cpp:27:
/usr/include/unicode/brkiter.h:127:18: note: overridden function is 'virtual bool icu_70::BreakIterator::operator==(const icu_70::BreakIterator&) const'
127 | virtual bool operator==(const BreakIterator&) const = 0;
| ^~~~~~~~
Target //tensorflow/lite/delegates/flex/test:benchmark_model_plus_flex_full failed to build
Since both the version of tensorflow-imx and of the docker are specified according to the versions recommend in the document, and the commands I typed are exactly as described, I would have expected this to work. Does anyone have an idea what I may be doing wrong? Thanks.