All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pseudo: fix link with new sqlite3
@ 2018-11-06 12:24 Ross Burton
  2018-11-06 12:33 ` ✗ patchtest: failure for " Patchwork
  2018-11-08 14:53 ` [PATCH] " Jens Rehsack
  0 siblings, 2 replies; 5+ messages in thread
From: Ross Burton @ 2018-11-06 12:24 UTC (permalink / raw)
  To: openembedded-core

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@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@intel.com>
+
+From 4633a8750f0966621d258548fba82bc6aa5aa997 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* ✗ patchtest: failure for pseudo: fix link with new sqlite3
  2018-11-06 12:24 [PATCH] pseudo: fix link with new sqlite3 Ross Burton
@ 2018-11-06 12:33 ` Patchwork
  2018-11-08 14:53 ` [PATCH] " Jens Rehsack
  1 sibling, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-11-06 12:33 UTC (permalink / raw)
  To: Ross Burton; +Cc: openembedded-core

== Series Details ==

Series: pseudo: fix link with new sqlite3
Revision: 1
URL   : https://patchwork.openembedded.org/series/14807/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Upstream-Status is Submitted, but it is not mentioned where [test_upstream_status_presence_format] 
  Suggested fix    Include where libm.patch was submitted
  Current          Upstream-Status: Submitted
  Standard format  Upstream-Status: Submitted [where]



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] pseudo: fix link with new sqlite3
  2018-11-06 12:24 [PATCH] pseudo: fix link with new sqlite3 Ross Burton
  2018-11-06 12:33 ` ✗ patchtest: failure for " Patchwork
@ 2018-11-08 14:53 ` Jens Rehsack
  2018-11-08 15:43   ` Burton, Ross
  1 sibling, 1 reply; 5+ messages in thread
From: Jens Rehsack @ 2018-11-08 14:53 UTC (permalink / raw)
  To: Ross Burton; +Cc: openembedded-core


[-- Attachment #1.1: Type: text/plain, Size: 2962 bytes --]



> Am 06.11.2018 um 13:24 schrieb Ross Burton <ross.burton@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@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@intel.com>
> +
> +From 4633a8750f0966621d258548fba82bc6aa5aa997 Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton@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@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@gmail.com


[-- Attachment #1.2: Type: text/html, Size: 5967 bytes --]

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] pseudo: fix link with new sqlite3
  2018-11-08 14:53 ` [PATCH] " Jens Rehsack
@ 2018-11-08 15:43   ` Burton, Ross
  2018-11-08 16:20     ` Jens Rehsack
  0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2018-11-08 15:43 UTC (permalink / raw)
  To: Jens Rehsack; +Cc: OE-core

On Thu, 8 Nov 2018 at 14:53, Jens Rehsack <rehsack@gmail.com> wrote:

> 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

Yes for libz, but I'd assumed the readline dependency was solely in
the binary not the library.

Annoyingly the fairly simple change to pseudo to make it use
pkg-config for flags then failed to link statically.  If you want to
see what I did and fancy fixing it, then my WIP is in the pkgconfig
branch at https://gitlab.com/rossburton/pseudo.

Ross


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] pseudo: fix link with new sqlite3
  2018-11-08 15:43   ` Burton, Ross
@ 2018-11-08 16:20     ` Jens Rehsack
  0 siblings, 0 replies; 5+ messages in thread
From: Jens Rehsack @ 2018-11-08 16:20 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core


[-- Attachment #1.1: Type: text/plain, Size: 1173 bytes --]



> Am 08.11.2018 um 16:43 schrieb Burton, Ross <ross.burton@intel.com>:
> 
> On Thu, 8 Nov 2018 at 14:53, Jens Rehsack <rehsack@gmail.com> wrote:
> 
>> 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
> 
> Yes for libz, but I'd assumed the readline dependency was solely in
> the binary not the library.
> 
> Annoyingly the fairly simple change to pseudo to make it use
> pkg-config for flags then failed to link statically.  If you want to
> see what I did and fancy fixing it, then my WIP is in the pkgconfig
> branch at https://gitlab.com/rossburton/pseudo.


That looks even better then my patch (I send it for review), which results in
> DB_LDFLAGS=$(SQLITE)/$(SQLITE_LIB)/libsqlite3.a -lz -lm -ldl -lpthread -lpthread
for pseudo to link ...

I'm a bit confused wrt. the requirement of static linking anyway ... but let's assume it's necessary and not dig into that :D

Cheers
--
Jens Rehsack - rehsack@gmail.com


[-- Attachment #1.2: Type: text/html, Size: 2823 bytes --]

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-08 16:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-06 12:24 [PATCH] pseudo: fix link with new sqlite3 Ross Burton
2018-11-06 12:33 ` ✗ patchtest: failure for " Patchwork
2018-11-08 14:53 ` [PATCH] " Jens Rehsack
2018-11-08 15:43   ` Burton, Ross
2018-11-08 16:20     ` Jens Rehsack

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.