summarylogtreecommitdiffstats
path: root/re-fix-TFLite-build-error-on-linux-with-system-zlib.patch
blob: 13d504d3e7920ffdd2151c67e06fbf94fbe76e51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From dda01a706453ded8c01c41775707cb5ef4e316f8 Mon Sep 17 00:00:00 2001
From: Andres Salomon <dilinger@queued.net>
Date: Tue, 25 Oct 2022 21:11:46 +0000
Subject: [PATCH] Re-fix TFLite build error on linux when using the system zlib

In commit ae0f9adb7e14c0d19ca695ef6ad40b321a8cb64c, I fixed some build
errors related to minizip patch inclusion in TFLite. However, after that
when TFLite Support was rolled to HEAD, a small part of that patch got
dropped. The result is the following build error with 107.0.5304.62:

../../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
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

This commit re-adds the lost fix.

R=junzou@chromium.org

Change-Id: Ie96c3571894b5100a1e2a2771da29699eff0beb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3972087
Reviewed-by: Robert Ogden <robertogden@chromium.org>
Commit-Queue: Robert Ogden <robertogden@chromium.org>
Auto-Submit: Andres Salomon <dilinger@queued.net>
Cr-Commit-Position: refs/heads/main@{#1063478}
---
 .../metadata/cc/utils/zip_readonly_mem_file.cc                  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
index 392b6b411fe..525ae4a2b45 100644
--- 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
@@ -19,7 +19,7 @@ limitations under the License.
 #include <cstdio>
 
 #include "absl/strings/string_view.h"  // from @com_google_absl
-#include "contrib/minizip/ioapi.h"
+#include "third_party/zlib/contrib/minizip/ioapi.h"
 
 namespace tflite {
 namespace metadata {