[OE-core] [PATCH] pseudo: fix link with new sqlite3

Jens Rehsack rehsack at gmail.com
Thu Nov 8 14:53:16 UTC 2018



> Am 06.11.2018 um 13:24 schrieb Ross Burton <ross.burton at intel.com>:
> 
> If sqlite3 is built with FTS5 it uses log() from libm, but that linkage is lost
> if we manually statically link so explicitly link to libm.
> 
> Signed-off-by: Ross Burton <ross.burton at intel.com>
> ---
> meta/recipes-devtools/pseudo/files/libm.patch | 33 +++++++++++++++++++++++++++
> meta/recipes-devtools/pseudo/pseudo_git.bb    |  1 +
> 2 files changed, 34 insertions(+)
> create mode 100644 meta/recipes-devtools/pseudo/files/libm.patch
> 
> diff --git a/meta/recipes-devtools/pseudo/files/libm.patch b/meta/recipes-devtools/pseudo/files/libm.patch
> new file mode 100644
> index 00000000000..1a82979313d
> --- /dev/null
> +++ b/meta/recipes-devtools/pseudo/files/libm.patch
> @@ -0,0 +1,33 @@
> +If sqlite3 is built with FTS5 enabled then it links to libm.so for log(), but if
> +we statically link to libsqlite3.a then this linkage is lost.
> +
> +Work around this by always linking to libm.so.
> +
> +Upstream-Status: Submitted
> +Signed-off-by: Ross Burton <ross.burton at intel.com>
> +
> +From 4633a8750f0966621d258548fba82bc6aa5aa997 Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton at intel.com>
> +Date: Tue, 6 Nov 2018 12:13:17 +0000
> +Subject: [PATCH] Makefile: sqlite can need libm
> +
> +---
> + Makefile.in | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/Makefile.in b/Makefile.in
> +index ad6541b..28b5ecb 100644
> +--- a/Makefile.in
> ++++ b/Makefile.in
> +@@ -73,7 +73,7 @@ WRAPOBJS=pseudo_wrappers.o
> +
> + # needed for anything that links with pseduo_client.o, pretty much
> + CLIENT_LDFLAGS=-ldl -lpthread
> +-DB_LDFLAGS=@SQLITE_LDARG@ -lpthread
> ++DB_LDFLAGS=@SQLITE_LDARG@ -lpthread -lm
> +
> + PSEUDO=$(BIN)/pseudo
> + PSEUDODB=$(BIN)/pseudodb
> +--
> +2.11.0
> +
> diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
> index 79e0b6bd21a..c9a4ecd2e23 100644
> --- a/meta/recipes-devtools/pseudo/pseudo_git.bb
> +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
> @@ -2,6 +2,7 @@ require pseudo.inc
> 
> SRC_URI = "git://git.yoctoproject.org/pseudo \
>            file://0001-configure-Prune-PIE-flags.patch \
> +           file://libm.patch \
>            file://fallback-passwd \
>            file://fallback-group \
>            file://moreretries.patch \
> --
> 2.11.0
> 
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


I digged a bit deeper (since I'd like to get a reasonable solution even for other dependent components) and would say, pseudo will also fail, when sqlite3 is build using readline or libz.
The better option will be to let pseudo use the libs and link-flags from sqlite.pc

Cheers
--
Jens Rehsack - rehsack at gmail.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20181108/c565db83/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20181108/c565db83/attachment-0001.sig>


More information about the Openembedded-core mailing list