Skip to contentSkip to conversation

sqlite3: Fix zlib determinism problem

PATCH In review Jason Wessel 2 participants 2 messages Aug 6, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 sqlite3: Fix zlib determinism problem

sqlite3-native in particular was finding zlib from the host if zlib-devel was installed. This could lead to races where pseudo-native may or may not fail to build.

We don't need/use compressed page support with sqlite so disable the dependency (it doesn't have a configure option so use a autoconf cache variable).

The target binaries were not previously building with zlib, so we will leave the default being zlib turned off, while the host binaries were building with it "occasionally", but not for anything at runtime.

---
 meta/recipes-support/sqlite/sqlite3.inc | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-support/sqlite/sqlite3.inc +3 -0
index daf3db5e9f..7cf23d0447 100644
@@ -34,6 +34,9 @@ PACKAGECONFIG[json1] = "--enable-json1,--disable-json1"
 PACKAGECONFIG[rtree] = "--enable-rtree,--disable-rtree"
 PACKAGECONFIG[session] = "--enable-session,--disable-session"
 PACKAGECONFIG[dyn_ext] = "--enable-dynamic-extensions,--disable-dynamic-extensions"
+PACKAGECONFIG[zlib] = ",,zlib"
+
+CACHED_CONFIGUREVARS += "${@bb.utils.contains('PACKAGECONFIG', 'zlib', '', 'ac_cv_search_deflate=no',d)}"
 
 EXTRA_OECONF = " \
     --enable-shared \
Signature · 1 line
2.21.0
#1 lore raw
Quoted 10 lines · Jason Wessel

sqlite3-native in particular was finding zlib from the host if zlib-devel was installed. This could lead to races where pseudo-native may or may not fail to build.

We don't need/use compressed page support with sqlite so disable the dependency (it doesn't have a configure option so use a autoconf cache variable).

The target binaries were not previously building with zlib, so we will leave the default being zlib turned off, while the host binaries were building with it "occasionally", but not for anything at runtime.

thanks for doing it this way, can't ask for more.

Quoted 20 lines
---
 meta/recipes-support/sqlite/sqlite3.inc | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-support/sqlite/sqlite3.inc +3 -0
index daf3db5e9f..7cf23d0447 100644
@@ -34,6 +34,9 @@ PACKAGECONFIG[json1] = "--enable-json1,--disable-json1"
 PACKAGECONFIG[rtree] = "--enable-rtree,--disable-rtree"
 PACKAGECONFIG[session] = "--enable-session,--disable-session"
 PACKAGECONFIG[dyn_ext] = "--enable-dynamic-extensions,--disable-dynamic-extensions"
+PACKAGECONFIG[zlib] = ",,zlib"
+
+CACHED_CONFIGUREVARS += "${@bb.utils.contains('PACKAGECONFIG', 'zlib', '', 'ac_cv_search_deflate=no',d)}"
 
 EXTRA_OECONF = " \
     --enable-shared \