Index | Thread | Search

From:
Jeremie Courreges-Anglas <jca@wxcvbn.org>
Subject:
Re: Bug: several databases' pkg-config .pc files lack -lpthread
To:
Matthias Andree <matthias.andree@gmx.de>, ports@openbsd.org
Cc:
otto@openbsd.org
Date:
Mon, 14 Jul 2025 13:27:26 +0200

Download raw body.

Thread
On Mon, Jul 14, 2025 at 11:59:43AM +0100, Stuart Henderson wrote:
[...]
> I don't think there's a problem with the sqlite port, but it looks like
> -lpthread is indeed missing from lmdb's libs.private.

Indeed, thanks for checking both.  The diff below should DTRT for
lmdb.

  pbuild /usr/ports/databases/lmdb$ pkg-config --libs lmdb
  -L/usr/local/lib -llmdb
  pbuild /usr/ports/databases/lmdb$ pkg-config --libs --static lmdb
  -L/usr/local/lib -llmdb -lpthread

cc'ing otto@ who had a use for the pkg-config file.  I see no .pc in
the upstream repo, and upstream's bugzilla appears to be MIA.


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/databases/lmdb/Makefile,v
diff -u -p -r1.16 Makefile
--- Makefile	22 Apr 2024 18:02:47 -0000	1.16
+++ Makefile	14 Jul 2025 11:16:44 -0000
@@ -1,6 +1,7 @@
 COMMENT =	Symas Lightning Memory-Mapped Database
 
 VERSION =	0.9.32
+REVISION =	0
 
 DISTNAME =	openldap-LMDB_${VERSION}
 PKGNAME =	lmdb-${VERSION}
Index: files/lmdb.pc.in
===================================================================
RCS file: /home/cvs/ports/databases/lmdb/files/lmdb.pc.in,v
diff -u -p -r1.1 lmdb.pc.in
--- files/lmdb.pc.in	22 Apr 2024 17:50:04 -0000	1.1
+++ files/lmdb.pc.in	14 Jul 2025 11:17:56 -0000
@@ -8,4 +8,5 @@ Description: Lightning memory-mapped dat
 URL: https://www.symas.com/symas-embedded-database-lmdb
 Version: ${VERSION}
 Libs: -L${libdir} -llmdb
+Libs.private: -lpthread
 Cflags: -I${includedir}

-- 
jca