Subject: Re: pkg/30414 [email@example.com: Re: [Rui Paulo] libgpgme.so problem when linked to libpthread]
To: None <tech-pkg@NetBSD.org>
From: Rui Paulo <firstname.lastname@example.org>
Date: 09/29/2005 18:56:36
[Forwarded with explicit permission]
----- Forwarded message from Marcus Brinkmann <email@example.com> -----
From: Marcus Brinkmann <firstname.lastname@example.org>
To: Rui Paulo <rpaulo@NetBSD.org>
Subject: Re: [Rui Paulo] libgpgme.so problem when linked to libpthread
Date: Thu, 29 Sep 2005 02:51:57 +0200
User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.7
(Sanj?) APEL/10.6 Emacs/21.4 (i386-pc-linux-gnu)
At Mon, 4 Jul 2005 15:09:54 +0100,
Rui Paulo <rpaulo@NetBSD.org> wrote:
> While investigating a supposed pthread problem under NetBSD with the
> help of Nathan Williams, he noticed that our pkg infrastructure, pkgsrc,
> is linking libgpgme.so with libpthread.so, event that should only
> happen with libgpgme-pthread.so.
> This causes the problem described under PR#30414 .
> I'm new to gpgme code, but seems like if libgpgme.so isn't linked with
> pthread (which should be the correct way), ath_* calls get translated to
> no-ops or to their libc counterpart (recvmsg, sendmsg, etc).
> While there is a problem with pkgsrc, I would like to know your opinion
> about this problem, as it may happen under other systems or package
This part of the code was always a bit on the dark and ugly side. In
the CVS version of GPGME (HEAD branch), this code is now removed, and
only libgpgme-pthread is linked against pthread. Also, the Pth CFLAGS
are only added when compiling the pth related files, so the pth
pthread.h header doesn't get mixed up with the system header
accidentially. See the below NEWS and ChangeLog entry.
This fix will be part of the upcoming GPGME 1.1.x branch release.
If you test the CVS HEAD version, I would appreciate your feedback how
it worked for you.
* The code for "automagically detecting the thread library" has been
removed from libgpgme. It is deprecated since version 0.4.3.
Since then, you had to link against libgpgme-pthread for
applications using pthread and libgpgme-pth for applications using
The code was removed because it caused compilation problems on
systems where the pthread.h header from GNU Pth is available in
addition to the system header (FreeBSD 6 and later for example).
2005-09-12 Marcus Brinkmann <email@example.com>
* Makefile.am (libgpgme_la_SOURCES): Set to ath.h and ath.c.
(ath_pth_src, ath_pthread_src): Removed.
(w32_o_files): Replace ath-compat.o with ath.o.
(libgpgme_pth_la_CFLAGS): New variable.
* ath-compat.c, ath-pthread-compat.c, ath-pth-compat.c: Removed.
* ath.h (ath_pthread_available, ath_pth_available): Removed.
(ath_init) [!_ATH_EXT_SYM_PREFIX]: Do not define macro.
(struct ath_ops, ath_init) [_ATH_COMPAT]: Removed.
(_ATH_COMPAT): Macro removed.
* posix-sema.c (_gpgme_sema_subsystem_init): Do not call
----- End forwarded message -----
-- Rui Paulo