All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH pseudo] Makefile: add -lm when linking to sqlite3
@ 2018-11-06 12:25 Ross Burton
  0 siblings, 0 replies; only message in thread
From: Ross Burton @ 2018-11-06 12:25 UTC (permalink / raw)
  To: yocto

If sqlite3 is built with FTS5 then it needs log() from libm.so.  This is pulled
in automatically when dynamically linking as usual, or if static linking via
pkg-config. However as pseudo will link directly to libsqlite3.a this potential
linkage is lost and the build will fail with undefined symbols.

Solve this by always linking to 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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-06 12:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-06 12:25 [PATCH pseudo] Makefile: add -lm when linking to sqlite3 Ross Burton

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.