Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failing bld tflite_vx_delegate #11

Open
Sergey-Coral opened this issue Dec 22, 2024 · 3 comments
Open

failing bld tflite_vx_delegate #11

Sergey-Coral opened this issue Dec 22, 2024 · 3 comments

Comments

@Sergey-Coral
Copy link

Sergey-Coral commented Dec 22, 2024

It appears to be missing StringRef definition:

-- Generating done
-- Build files have been written to: /home/ubuntu/flexbuild/components_lsdk2406/apps/ml/tflite_vx_delegate/build_debian_arm64
[  0%] Building CXX object CMakeFiles/vx_delegate.dir/delegate_main.cc.o
[  0%] Building CXX object CMakeFiles/vx_delegate.dir/op_map.cc.o
In file included from /home/ubuntu/flexbuild/components_lsdk2406/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/reference_ops.h:83,
                 from /home/ubuntu/flexbuild/components_lsdk2406/apps/ml/tflite_vx_delegate/delegate_main.cc:38:
/home/ubuntu/flexbuild/components_lsdk2406/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:30:36: error: 'StringRef' does not name a type; did you mean 'string'?
   30 | inline bool StringRefEqualFn(const StringRef& lhs, const StringRef& rhs) {
      |                                    ^~~~~~~~~
      |                                    string
/home/ubuntu/flexbuild/components_lsdk2406/apps/ml/tflite/tensorflow/lite/kernels/internal/reference/string_comparisons.h:30:58: error: 'StringRef' does not name a type; did you mean 'string'?
   30 | inline bool StringRefEqualFn(const StringRef& lhs, const StringRef& rhs) {
      |                                                          ^~~~~~~~~
      |                                                          string

I'm running inside Docker on Ubuntu 22.04.4 LTS.

@Sergey-Coral
Copy link
Author

It appears that some testing header files get in the way of the build.
If I remove flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/testing and flexbuild/build_lsdk2412/apps/apps_arm64_debian_desktop/usr/include/tensorflow, the build succeeds.

@Sergey-Coral
Copy link
Author

Namely flexbuild/components_lsdk2412/apps/ml/tflite/tensorflow/lite/testing/string_util.h instead of being installed under flexbuild/build_lsdk2412/apps/apps_arm64_debian_desktop/usr/include/tensorflow/lite/testing overwrites the file flexbuild/build_lsdk2412/apps/apps_arm64_debian_desktop/usr/include/tensorflow/lite/string_util.h.

@Sergey-Coral
Copy link
Author

Sergey-Coral commented Dec 25, 2024

This line seems to cause the problem:

find . -name "*.h" | xargs -I {} cp {} $(DESTDIR)/usr/include/tensorflow/lite && \

Here is a working version:
find . -name "*.h" | grep -v lite/testing | xargs -I {} cp {} $(DESTDIR)/usr/include/tensorflow/lite && \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant