re-fix-TFLite-build-error-on-linux-with-system-zlib.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From dda01a706453ded8c01c41775707cb5ef4e316f8 Mon Sep 17 00:00:00 2001
  2. From: Andres Salomon <dilinger@queued.net>
  3. Date: Tue, 25 Oct 2022 21:11:46 +0000
  4. Subject: [PATCH] Re-fix TFLite build error on linux when using the system zlib
  5. In commit ae0f9adb7e14c0d19ca695ef6ad40b321a8cb64c, I fixed some build
  6. errors related to minizip patch inclusion in TFLite. However, after that
  7. when TFLite Support was rolled to HEAD, a small part of that patch got
  8. dropped. The result is the following build error with 107.0.5304.62:
  9. ../../third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc:22:10: fatal error: 'contrib/minizip/ioapi.h' file not found
  10. ^~~~~~~~~~~~~~~~~~~~~~~~~
  11. 1 error generated.
  12. This commit re-adds the lost fix.
  13. R=junzou@chromium.org
  14. Change-Id: Ie96c3571894b5100a1e2a2771da29699eff0beb3
  15. Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3972087
  16. Reviewed-by: Robert Ogden <robertogden@chromium.org>
  17. Commit-Queue: Robert Ogden <robertogden@chromium.org>
  18. Auto-Submit: Andres Salomon <dilinger@queued.net>
  19. Cr-Commit-Position: refs/heads/main@{#1063478}
  20. ---
  21. .../metadata/cc/utils/zip_readonly_mem_file.cc | 2 +-
  22. 1 file changed, 1 insertion(+), 1 deletion(-)
  23. diff --git a/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc b/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
  24. index 392b6b411fe..525ae4a2b45 100644
  25. --- a/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
  26. +++ b/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
  27. @@ -19,7 +19,7 @@ limitations under the License.
  28. #include <cstdio>
  29. #include "absl/strings/string_view.h" // from @com_google_absl
  30. -#include "contrib/minizip/ioapi.h"
  31. +#include "third_party/zlib/contrib/minizip/ioapi.h"
  32. namespace tflite {
  33. namespace metadata {