[OE-core] [PATCH] sqlite3: Always build sqlite3-native with zlib

Jason Wessel jason.wessel at windriver.com
Tue Aug 6 17:31:01 UTC 2019


The build of sqlite3-native is not fully deterministic.  There is some
corner case as shown with the recent pseudo commit where the sqlite3
will sometimes link against zlib.  It is possible that in a build with
sstate that since the zlib is not listed, that pseudo-native will fail
to build because it calls the pkg-config to get the link arguments for
sqlite3 and will ultimately try to link against zlib.

===  As observed on the YP Autobuilder ===
/pseudo-native/1.9.0+gitAUTOINC+060058bb29-r0/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=TOPDIR/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 TOPDIR/tmp/work/x86_64-linux/pseudo-native/1.9.0+gitAUTOINC+060058bb29-r0/recipe-sysroot-native/usr/lib/libsqlite3.a -lz -lm -ldl -lpthread -lpthread -ldl -lpthread
TOPDIR//tmp/home/hosttoolspokybuild//yoctold-:worker/ qemuarmcannot/build /buildfind/ tmp/-hosttoolslz/ld
: cannot find -lz
======

The simple fix is to depend to the zlib-native which will only impact
the sqlite3-native build, and then deterministically complete all the
dependencies for pseudo-native.  For a target build the host native
library is ignored as usual.

Signed-off-by: Jason Wessel <jason.wessel at windriver.com>
---
 meta/recipes-support/sqlite/sqlite3.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-support/sqlite/sqlite3.inc b/meta/recipes-support/sqlite/sqlite3.inc
index daf3db5e9f..2e48f303ee 100644
--- a/meta/recipes-support/sqlite/sqlite3.inc
+++ b/meta/recipes-support/sqlite/sqlite3.inc
@@ -2,6 +2,8 @@ SUMMARY = "Embeddable SQL database engine"
 HOMEPAGE = "http://www.sqlite.org"
 SECTION = "libs"
 
+DEPENDS = "zlib-native"
+
 PE = "3"
 
 def sqlite_download_version(d):
-- 
2.21.0



More information about the Openembedded-core mailing list