Hi,
We are now trying the flexbuild of Debian 12, but it build failed on "tflite_ethosu_delegate"
We know the in v24.06 does not include the ml(machine learning) in build process.
But we do want to enable the ml in debian.
Here is the log:
[root@fbdebian tn_debian_flexbuild]$ bld tflite_ethosu_delegate
Building tflite_ethosu_delegate ...
repo: tflite_ethosu_delegate
tag: lf-6.6.36-2.1.0
-- Setting build type to Release, for debug builds use'-DCMAKE_BUILD_TYPE=Debug'.
-- Cloning absl repository revision fb3621f4f897824c0dbe0615fa94543df6192f30, found in /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/../third_party/absl/workspace.bzl
CMake Warning at build_debian_arm64/abseil-cpp/CMakeLists.txt:77 (message):
A future Abseil release will default ABSL_PROPAGATE_CXX_STD to ON for CMake
3.8 and up. We recommend enabling this option to ensure your project still
builds correctly.
-- Cloning eigen repository revision aa6964bf3a34fd607837dd8123bc42465185c4f8, found in /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/../third_party/eigen3/workspace.bzl
-- Standard libraries to link to explicitly: none
-- The Fortran compiler identification is unknown
-- Could NOT find CLANG_FORMAT: Found unsuitable version "0.0", but required is exact version "9" (found CLANG_FORMAT_EXECUTABLE-NOTFOUND)
--
-- Configured Eigen 3.4.90
--
-- Cloning farmhash repository revision 0d859a811870d10f53a594927d0d0b97573ad06d, found in /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/../third_party/farmhash/workspace.bzl
-- Cloning fft2d repository from https://storage.googleapis.com/mirror.tensorflow.org/github.com/petewarden/OouraFFT/archive/v1.0.tar.gz, found in /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/workspace2.bzl
CMake Warning (dev) at /usr/share/cmake-3.25/Modules/FetchContent.cmake:1279 (message):
The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
not set. The policy's OLD behavior will be used. When using a URL
download, the timestamps of extracted files should preferably be that of
the time of extraction, otherwise code that depends on the extracted
contents might not be rebuilt if the URL changes. The OLD behavior
preserves the timestamps from the archive instead, but this is usually not
what you want. Update your project to the NEW behavior or specify the
DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
robustness issue.
Call Stack (most recent call first):
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake:398 (FetchContent_Declare)
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/tools/cmake/modules/fft2d.cmake:25 (OverridableFetchContent_Declare)
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/tools/cmake/modules/Findfft2d.cmake:18 (include)
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/CMakeLists.txt:166 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Cloning flatbuffers repository from https://github.com/google/flatbuffers/archive/7d6d99c6befa635780a4e944d37ebfd58e68a108.tar.gz, found in /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/../third_party/flatbuffers/workspace.bzl
-- Cloning flatbuffers repository revision 7d6d99c6befa635780a4e944d37ebfd58e68a108, found in /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/../third_party/flatbuffers/workspace.bzl
CMake Warning (dev) at /usr/share/cmake-3.25/Modules/FetchContent.cmake:1279 (message):
The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
not set. The policy's OLD behavior will be used. When using a URL
download, the timestamps of extracted files should preferably be that of
the time of extraction, otherwise code that depends on the extracted
contents might not be rebuilt if the URL changes. The OLD behavior
preserves the timestamps from the archive instead, but this is usually not
what you want. Update your project to the NEW behavior or specify the
DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
robustness issue.
Call Stack (most recent call first):
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake:398 (FetchContent_Declare)
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/tools/cmake/modules/flatbuffers.cmake:33 (OverridableFetchContent_Declare)
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/tools/cmake/modules/FindFlatBuffers.cmake:18 (include)
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/CMakeLists.txt:167 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Proceeding with version: 23.5.26.0
-- CMAKE_CXX_FLAGS: -O2 -pipe -g -fPIC -feliminate-unused-debug-types -I/home/joezhang/workspace/tn_debian_flexbuild/build_lsdk2412/apps/apps_arm64_debian_desktop/usr/include -I/home/joezhang/workspace/tn_debian_flexbuild/build_lsdk2412/rfs/rootfs_lsdk2412_debian_desktop_arm64/usr/include
-- Cloning gemmlowp repository revision 16e8662c34917be0065110bfcd9cc27d30f52fdf, found in /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/../third_party/gemmlowp/workspace.bzl
-- Cloning neon2sse repository from https://storage.googleapis.com/mirror.tensorflow.org/github.com/intel/ARM_NEON_2_x86_SSE/archive/a15b489e1222b2087007546b4912e21293ea86ff.tar.gz, found in /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/workspace2.bzl
CMake Warning (dev) at /usr/share/cmake-3.25/Modules/FetchContent.cmake:1279 (message):
The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
not set. The policy's OLD behavior will be used. When using a URL
download, the timestamps of extracted files should preferably be that of
the time of extraction, otherwise code that depends on the extracted
contents might not be rebuilt if the URL changes. The OLD behavior
preserves the timestamps from the archive instead, but this is usually not
what you want. Update your project to the NEW behavior or specify the
DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
robustness issue.
Call Stack (most recent call first):
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake:398 (FetchContent_Declare)
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/tools/cmake/modules/neon2sse.cmake:25 (OverridableFetchContent_Declare)
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/tools/cmake/modules/FindNEON_2_SSE.cmake:18 (include)
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/CMakeLists.txt:170 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Cloning cpuinfo repository revision ef634603954d88d2643d5809011288b890ac126e, found in /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/workspace2.bzl
-- Cloning ruy repository revision 3286a34cc8de6149ac6844107dfdffac91531e72, found in /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/../third_party/ruy/workspace.bzl
-- Cloning xnnpack repository revision dcbfffb80fb4f6fcfcfb5b3723854ec8797fa546, found in /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/workspace2.bzl
-- Could NOT find Python (missing: Interpreter Development Development.Module Development.Embed) (found version "3.11.2")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite_ethosu_delegate/build_debian_arm64
Building CXX object CMakeFiles/ethosu_delegate.dir/ethosu_delegate.cc.o
Building CXX object CMakeFiles/ethosu_delegate.dir/ethosu_delegate_utils.cc.o
Building CXX object CMakeFiles/ethosu_delegate.dir/ethosu_supported_ops.cc.o
In file included from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:83,
from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/optimized/optimized_ops.h:56,
from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite_ethosu_delegate/ethosu_supported_ops.cc:10:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:28:36: error: 'StringRef' does not name a type
28 | inline bool StringRefEqualFn(const StringRef& lhs, const StringRef& rhs) {
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:28:58: error: 'StringRef' does not name a type
28 | inline bool StringRefEqualFn(const StringRef& lhs, const StringRef& rhs) {
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: In function 'bool tflite::reference_ops::StringRefEqualFn(const int&, const int&)':
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:29:11: error: request for member 'len' in 'lhs', which is of non-class type 'const int'
29 | if (lhs.len != rhs.len) return false;
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:29:22: error: request for member 'len' in 'rhs', which is of non-class type 'const int'
29 | if (lhs.len != rhs.len) return false;
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:30:27: error: request for member 'len' in 'lhs', which is of non-class type 'const int'
30 | for (int i = 0; i < lhs.len; ++i) {
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:31:13: error: request for member 'str' in 'lhs', which is of non-class type 'const int'
31 | if (lhs.str[i] != rhs.str[i]) return false;
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:31:27: error: request for member 'str' in 'rhs', which is of non-class type 'const int'
31 | if (lhs.str[i] != rhs.str[i]) return false;
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: At global scope:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:36:39: error: 'StringRef' does not name a type
36 | inline bool StringRefNotEqualFn(const StringRef& lhs, const StringRef& rhs) {
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:36:61: error: 'StringRef' does not name a type
36 | inline bool StringRefNotEqualFn(const StringRef& lhs, const StringRef& rhs) {
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:40:50: error: 'StringRef' does not name a type
40 | inline void ComparisonStringImpl(bool (*F)(const StringRef&, const StringRef&),
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:40:68: error: 'StringRef' does not name a type
40 | inline void ComparisonStringImpl(bool (*F)(const StringRef&, const StringRef&),
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: In function 'void tflite::reference_ops::ComparisonStringImpl(bool (*)(const int&, const int&), const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, bool*)':
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:50:22: error: 'GetString' was not declared in this scope; did you mean 'testing'?
50 | const auto lhs = GetString(input1, i);
| ^~~~~~~~~
| testing
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: At global scope:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:57:21: error: 'StringRef' does not name a type
57 | bool (*F)(const StringRef&, const StringRef&),
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:57:39: error: 'StringRef' does not name a type
57 | bool (*F)(const StringRef&, const StringRef&),
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: In function 'void tflite::reference_ops::BroadcastComparison4DSlowStringImpl(bool (*)(const int&, const int&), const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, bool*)':
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:71:15: error: 'GetString' was not declared in this scope; did you mean 'testing'?
71 | GetString(input1, SubscriptToIndex(dims.desc1, b, y, x, c));
| ^~~~~~~~~
| testing
In file included from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:89:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/tensor.h: At global scope:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/tensor.h:26:30: error: 'string' was not declared in this scope; did you mean 'std::string'?
26 | class SequentialTensorWriter<string> {
| ^~~~~~
| std::string
In file included from /usr/aarch64-linux-gnu/include/c++/12/iosfwd:39,
from /usr/aarch64-linux-gnu/include/c++/12/bits/shared_ptr.h:52,
from /usr/aarch64-linux-gnu/include/c++/12/memory:77,
from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/optimized/optimized_ops.h:26:
/usr/aarch64-linux-gnu/include/c++/12/bits/stringfwd.h:77:33: note: 'std::string' declared here
77 | typedef basic_string<char> string;
| ^~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/tensor.h:26:36: error: template argument 1 is invalid
26 | class SequentialTensorWriter<string> {
| ^
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h: In function 'TfLiteStatus tflite::reference_ops::GatherNdString(const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, const IndicesT*, const tflite::RuntimeShape&, TfLiteTensor*)':
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:641:3: error: 'DynamicBuffer' was not declared in this scope
641 | DynamicBuffer buffer;
| ^~~~~~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:651:7: error: 'buffer' was not declared in this scope; did you mean 'setbuffer'?
651 | buffer.AddString(GetString(params_data, from_pos + j));
| ^~~~~~
| setbuffer
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:651:24: error: there are no arguments to 'GetString' that depend on a template parameter, so a declaration of 'GetString' must be available [-fpermissive]
651 | buffer.AddString(GetString(params_data, from_pos + j));
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:651:24: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:654:3: error: 'buffer' was not declared in this scope; did you mean 'setbuffer'?
654 | buffer.WriteToTensor(output_data, /*new_shape=*/nullptr);
| ^~~~~~
| setbuffer
In file included from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:83,
from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/optimized/optimized_ops.h:56,
from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite_ethosu_delegate/ethosu_delegate_utils.h:16,
from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite_ethosu_delegate/ethosu_delegate.cc:27:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:28:36: error: 'StringRef' does not name a type
28 | inline bool StringRefEqualFn(const StringRef& lhs, const StringRef& rhs) {
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:28:58: error: 'StringRef' does not name a type
28 | inline bool StringRefEqualFn(const StringRef& lhs, const StringRef& rhs) {
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: In function 'bool tflite::reference_ops::StringRefEqualFn(const int&, const int&)':
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:29:11: error: request for member 'len' in 'lhs', which is of non-class type 'const int'
29 | if (lhs.len != rhs.len) return false;
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:29:22: error: request for member 'len' in 'rhs', which is of non-class type 'const int'
29 | if (lhs.len != rhs.len) return false;
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:30:27: error: request for member 'len' in 'lhs', which is of non-class type 'const int'
30 | for (int i = 0; i < lhs.len; ++i) {
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:31:13: error: request for member 'str' in 'lhs', which is of non-class type 'const int'
31 | if (lhs.str[i] != rhs.str[i]) return false;
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:31:27: error: request for member 'str' in 'rhs', which is of non-class type 'const int'
31 | if (lhs.str[i] != rhs.str[i]) return false;
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: At global scope:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:36:39: error: 'StringRef' does not name a type
36 | inline bool StringRefNotEqualFn(const StringRef& lhs, const StringRef& rhs) {
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:36:61: error: 'StringRef' does not name a type
36 | inline bool StringRefNotEqualFn(const StringRef& lhs, const StringRef& rhs) {
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:40:50: error: 'StringRef' does not name a type
40 | inline void ComparisonStringImpl(bool (*F)(const StringRef&, const StringRef&),
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:40:68: error: 'StringRef' does not name a type
40 | inline void ComparisonStringImpl(bool (*F)(const StringRef&, const StringRef&),
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: In function 'void tflite::reference_ops::ComparisonStringImpl(bool (*)(const int&, const int&), const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, bool*)':
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:50:22: error: 'GetString' was not declared in this scope; did you mean 'testing'?
50 | const auto lhs = GetString(input1, i);
| ^~~~~~~~~
| testing
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: At global scope:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:57:21: error: 'StringRef' does not name a type
57 | bool (*F)(const StringRef&, const StringRef&),
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:57:39: error: 'StringRef' does not name a type
57 | bool (*F)(const StringRef&, const StringRef&),
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: In function 'void tflite::reference_ops::BroadcastComparison4DSlowStringImpl(bool (*)(const int&, const int&), const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, bool*)':
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:71:15: error: 'GetString' was not declared in this scope; did you mean 'testing'?
71 | GetString(input1, SubscriptToIndex(dims.desc1, b, y, x, c));
| ^~~~~~~~~
| testing
In file included from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:89:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/tensor.h: At global scope:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/tensor.h:26:30: error: 'string' was not declared in this scope; did you mean 'std::string'?
26 | class SequentialTensorWriter<string> {
| ^~~~~~
| std::string
In file included from /usr/aarch64-linux-gnu/include/c++/12/string:39,
from /home/joezhang/workspace/tn_debian_flexbuild/build_lsdk2412/apps/apps_arm64_debian_desktop/usr/include/flatbuffers/base.h:41,
from /home/joezhang/workspace/tn_debian_flexbuild/build_lsdk2412/apps/apps_arm64_debian_desktop/usr/include/flatbuffers/flexbuffers.h:23,
from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite_ethosu_delegate/ethosu_delegate.cc:23:
/usr/aarch64-linux-gnu/include/c++/12/bits/stringfwd.h:77:33: note: 'std::string' declared here
77 | typedef basic_string<char> string;
| ^~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/tensor.h:26:36: error: template argument 1 is invalid
26 | class SequentialTensorWriter<string> {
| ^
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h: In function 'TfLiteStatus tflite::reference_ops::GatherNdString(const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, const IndicesT*, const tflite::RuntimeShape&, TfLiteTensor*)':
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:641:3: error: 'DynamicBuffer' was not declared in this scope
641 | DynamicBuffer buffer;
| ^~~~~~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:651:7: error: 'buffer' was not declared in this scope; did you mean 'setbuffer'?
651 | buffer.AddString(GetString(params_data, from_pos + j));
| ^~~~~~
| setbuffer
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:651:24: error: there are no arguments to 'GetString' that depend on a template parameter, so a declaration of 'GetString' must be available [-fpermissive]
651 | buffer.AddString(GetString(params_data, from_pos + j));
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:651:24: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:654:3: error: 'buffer' was not declared in this scope; did you mean 'setbuffer'?
654 | buffer.WriteToTensor(output_data, /*new_shape=*/nullptr);
| ^~~~~~
| setbuffer
In file included from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:83,
from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/optimized/optimized_ops.h:56,
from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite_ethosu_delegate/ethosu_delegate_utils.h:16,
from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite_ethosu_delegate/ethosu_delegate_utils.cc:9:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:28:36: error: 'StringRef' does not name a type
28 | inline bool StringRefEqualFn(const StringRef& lhs, const StringRef& rhs) {
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:28:58: error: 'StringRef' does not name a type
28 | inline bool StringRefEqualFn(const StringRef& lhs, const StringRef& rhs) {
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: In function 'bool tflite::reference_ops::StringRefEqualFn(const int&, const int&)':
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:29:11: error: request for member 'len' in 'lhs', which is of non-class type 'const int'
29 | if (lhs.len != rhs.len) return false;
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:29:22: error: request for member 'len' in 'rhs', which is of non-class type 'const int'
29 | if (lhs.len != rhs.len) return false;
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:30:27: error: request for member 'len' in 'lhs', which is of non-class type 'const int'
30 | for (int i = 0; i < lhs.len; ++i) {
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:31:13: error: request for member 'str' in 'lhs', which is of non-class type 'const int'
31 | if (lhs.str[i] != rhs.str[i]) return false;
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:31:27: error: request for member 'str' in 'rhs', which is of non-class type 'const int'
31 | if (lhs.str[i] != rhs.str[i]) return false;
| ^~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: At global scope:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:36:39: error: 'StringRef' does not name a type
36 | inline bool StringRefNotEqualFn(const StringRef& lhs, const StringRef& rhs) {
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:36:61: error: 'StringRef' does not name a type
36 | inline bool StringRefNotEqualFn(const StringRef& lhs, const StringRef& rhs) {
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:40:50: error: 'StringRef' does not name a type
40 | inline void ComparisonStringImpl(bool (*F)(const StringRef&, const StringRef&),
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:40:68: error: 'StringRef' does not name a type
40 | inline void ComparisonStringImpl(bool (*F)(const StringRef&, const StringRef&),
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: In function 'void tflite::reference_ops::ComparisonStringImpl(bool (*)(const int&, const int&), const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, bool*)':
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:50:22: error: 'GetString' was not declared in this scope; did you mean 'flatbuffers::GetString'?
50 | const auto lhs = GetString(input1, i);
| ^~~~~~~~~
| flatbuffers::GetString
In file included from /home/joezhang/workspace/tn_debian_flexbuild/build_lsdk2412/apps/apps_arm64_debian_desktop/usr/include/flatbuffers/flatbuffer_builder.h:34,
from /home/joezhang/workspace/tn_debian_flexbuild/build_lsdk2412/apps/apps_arm64_debian_desktop/usr/include/flatbuffers/flatbuffers.h:29,
from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/schema/schema_generated.h:21,
from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite_ethosu_delegate/tflite_enum_mapping.h:19,
from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite_ethosu_delegate/ethosu_delegate_utils.cc:8:
/home/joezhang/workspace/tn_debian_flexbuild/build_lsdk2412/apps/apps_arm64_debian_desktop/usr/include/flatbuffers/string.h:44:27: note: 'flatbuffers::GetString' declared here
44 | static inline std::string GetString(const String *str) {
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: At global scope:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:57:21: error: 'StringRef' does not name a type
57 | bool (*F)(const StringRef&, const StringRef&),
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:57:39: error: 'StringRef' does not name a type
57 | bool (*F)(const StringRef&, const StringRef&),
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h: In function 'void tflite::reference_ops::BroadcastComparison4DSlowStringImpl(bool (*)(const int&, const int&), const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, bool*)':
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:71:15: error: 'GetString' was not declared in this scope; did you mean 'flatbuffers::GetString'?
71 | GetString(input1, SubscriptToIndex(dims.desc1, b, y, x, c));
| ^~~~~~~~~
| flatbuffers::GetString
/home/joezhang/workspace/tn_debian_flexbuild/build_lsdk2412/apps/apps_arm64_debian_desktop/usr/include/flatbuffers/string.h:44:27: note: 'flatbuffers::GetString' declared here
44 | static inline std::string GetString(const String *str) {
| ^~~~~~~~~
In file included from /home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:89:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/tensor.h: At global scope:
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/tensor.h:26:30: error: 'string' was not declared in this scope; did you mean 'std::string'?
26 | class SequentialTensorWriter<string> {
| ^~~~~~
| std::string
In file included from /usr/aarch64-linux-gnu/include/c++/12/iosfwd:39,
from /usr/aarch64-linux-gnu/include/c++/12/bits/shared_ptr.h:52,
from /usr/aarch64-linux-gnu/include/c++/12/memory:77,
from /home/joezhang/workspace/tn_debian_flexbuild/build_lsdk2412/apps/apps_arm64_debian_desktop/usr/include/flatbuffers/array.h:21,
from /home/joezhang/workspace/tn_debian_flexbuild/build_lsdk2412/apps/apps_arm64_debian_desktop/usr/include/flatbuffers/flatbuffers.h:24:
/usr/aarch64-linux-gnu/include/c++/12/bits/stringfwd.h:77:33: note: 'std::string' declared here
77 | typedef basic_string<char> string;
| ^~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/tensor.h:26:36: error: template argument 1 is invalid
26 | class SequentialTensorWriter<string> {
| ^
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h: In function 'TfLiteStatus tflite::reference_ops::GatherNdString(const tflite::RuntimeShape&, const TfLiteTensor*, const tflite::RuntimeShape&, const IndicesT*, const tflite::RuntimeShape&, TfLiteTensor*)':
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:641:3: error: 'DynamicBuffer' was not declared in this scope
641 | DynamicBuffer buffer;
| ^~~~~~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:651:7: error: 'buffer' was not declared in this scope; did you mean 'Buffer'?
651 | buffer.AddString(GetString(params_data, from_pos + j));
| ^~~~~~
| Buffer
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:651:24: error: there are no arguments to 'GetString' that depend on a template parameter, so a declaration of 'GetString' must be available [-fpermissive]
651 | buffer.AddString(GetString(params_data, from_pos + j));
| ^~~~~~~~~
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:651:24: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/joezhang/workspace/tn_debian_flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:654:3: error: 'buffer' was not declared in this scope; did you mean 'Buffer'?
654 | buffer.WriteToTensor(output_data, /*new_shape=*/nullptr);
| ^~~~~~
| Buffer
make[5]: *** [CMakeFiles/ethosu_delegate.dir/build.make:160: CMakeFiles/ethosu_delegate.dir/ethosu_supported_ops.cc.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: *** [CMakeFiles/ethosu_delegate.dir/build.make:104: CMakeFiles/ethosu_delegate.dir/ethosu_delegate.cc.o] Error 1
make[5]: *** [CMakeFiles/ethosu_delegate.dir/build.make:146: CMakeFiles/ethosu_delegate.dir/ethosu_delegate_utils.cc.o] Error 1
make[4]: *** [CMakeFiles/Makefile2:1258: CMakeFiles/ethosu_delegate.dir/all] Error 2
make[3]: *** [CMakeFiles/Makefile2:1265: CMakeFiles/ethosu_delegate.dir/rule] Error 2
make[2]: *** [Makefile:169: ethosu_delegate] Error 2
make[1]: *** [/home/joezhang/workspace/tn_debian_flexbuild/src/apps/ml/tflite_ethosu_delegate.mk:11: tflite_ethosu_delegate] Error 2
make: *** [Makefile:21: tflite_ethosu_delegate] Error 2
Look like there is dependency issue in tensorflow => missing llvm(`StringRef`) library?
But `apt-get install llvm` in docker won't fix.
Add llvm in target rootfs won't fix, too.
joezhang@joezhang-System-Product-Name:~/workspace/tn_debian_flexbuild$ git diff
diff --git a/configs/debian/extra_packages_list b/configs/debian/extra_packages_list
index 54dede1..9064951 100644
--- a/configs/debian/extra_packages_list
+++ b/configs/debian/extra_packages_list
@@ -95,6 +95,7 @@ extra_server_devel_packages=" \
libvorbis-dev \
libjpeg62-turbo-dev \
libjsoncpp-dev \
+ llvm-dev \
"
Or I missing something in build process?
$ bld docker
$ . setup.env
$ bld host-dep
$ bld apps -p IMX
# failed here...
THANKS~~~
Joe
Hello @charleshuang
Please try to delete the build_lsdk2412 folder and try to rebuild it again.
Best Regards,
Zhiming