lmdb: only set SONAME on the shared library

Setting soname in LDFLAGS means that the extra mdb tools also
incorrectly get soname set.  This then triggers package.bbclass to add a
duplicate shlib_provider in /usr/bin for liblmdb.so.0.9.29.  Then any
other recipe depending on liblmdb is going to get a 'Multiple shlib
provider' error.

shlibs2/lmdb.list before:
    liblmdb.so.0.9.29:/usr/bin:0.9.29
    liblmdb.so.0.9.29:/usr/lib:0.9.29

shlibs2/lmdb.list after:
    liblmdb.so.0.9.29:/usr/lib:0.9.29

Signed-off-by: Justin Bronder <jsbronder@cold-front.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Justin Bronder 2022-08-25 18:02:57 -04:00 committed by Khem Raj
parent 3fa331f5e7
commit 011390333b
2 changed files with 23 additions and 2 deletions

View File

@ -0,0 +1,22 @@
From b4d418bf3f78748d84e3cfb110833443eef34284 Mon Sep 17 00:00:00 2001
From: Justin Bronder <jsbronder@cold-front.org>
Date: Thu, 25 Aug 2022 17:22:20 -0400
Subject: [PATCH] make: set soname on liblmdb
---
libraries/liblmdb/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile
index 1ec74e6..ea08cd6 100644
--- a/libraries/liblmdb/Makefile
+++ b/libraries/liblmdb/Makefile
@@ -66,7 +66,7 @@ liblmdb.a: mdb.o midl.o
liblmdb$(SOEXT): mdb.lo midl.lo
# $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
- $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS)
+ $(CC) $(LDFLAGS) -pthread -shared -Wl,-soname,$@ -o $@ mdb.lo midl.lo $(SOLIBS)
mdb_stat: mdb_stat.o liblmdb.a
mdb_copy: mdb_copy.o liblmdb.a

View File

@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972"
SRC_URI = "git://github.com/LMDB/lmdb.git;nobranch=1;protocol=https \
file://run-ptest \
file://0001-Makefile-use-libprefix-instead-of-libdir.patch \
file://0001-make-set-soname-on-liblmdb.patch;patchdir=../.. \
"
SRCREV = "8ad7be2510414b9506ec9f9e24f24d04d9b04a1a"
@ -19,8 +20,6 @@ inherit ptest
S = "${WORKDIR}/git/libraries/liblmdb"
LDFLAGS += "-Wl,-soname,lib${PN}.so.${PV}"
do_compile() {
oe_runmake CC="${CC}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}"
}