GPGME CVS branched

Michael Nottebrock michaelnottebrock at gmx.net
Sat Dec 11 21:04:45 CET 2004


On Saturday, 11. December 2004 20:38, Marcus Brinkmann wrote:
> At Sat, 11 Dec 2004 18:17:06 +0100,
>
> Michael Nottebrock <michaelnottebrock at gmx.net> wrote:
> > > gcc -g -O2 -I/usr/local/include/pth -Wall -Wcast-align -Wshadow
> > > -Wstrict-prototypes -o .libs/t-thread1
> > > t-thread1.o  ../../gpgme/.libs/libgpgme-pthread.so -lpthread
> > > -L/usr/local/lib /usr/local/lib/libgpg-error.so -lintl -Wl,--rpath
> > > -Wl,/usr/local/lib
> > > ../../gpgme/.libs/libgpgme-pthread.so: warning: warning: tmpnam()
> > > possibly used unsafely; consider using mkstemp()
> > > t-thread1.o(.text+0x12d): In function `passphrase_cb':
> > > /mnt/stable-usr/home/lofi/freebsd/ports/security/gpgme/work/gpgme-1.0.1
> > >/tes ts/gpg/t-support.h:67: undefined reference to `__pthread_write'
> > > ../../gpgme/.libs/libgpgme-pthread.so: undefined reference to
> > > `__pthread_select'
> > > ../../gpgme/.libs/libgpgme-pthread.so: undefined reference to
> > > `__pthread_connect'
> > > ../../gpgme/.libs/libgpgme-pthread.so: undefined reference to
> > > `__pthread_accept'
> > > ../../gpgme/.libs/libgpgme-pthread.so: undefined reference to
> > > `__pthread_waitpid'
> > > ../../gpgme/.libs/libgpgme-pthread.so: undefined reference to
> > > `__pthread_read'
> > >
> > > This looks kind of bogus to me, what's going on there?
> >
> > Looking at the Makefile templates a bit, it seems to me that in the
> > pth-case PTH_LDFLAGS would need to be added to the t_thread1_LDFLAGS. If
> > I do this manually, the test compiles.
>
> I don't understand that at all.  What does PTH have to do with
> libpthread, which is used in the test?
>
> The above indicates some breakage using pthread on your system.

No, like I said before this works fine if pth is disabled.

In the pth case this test needs to be linked against pth's libpthread though, 
not the system threads library, i.e. an additional -L parameter is needed 
that points to (PREFIX)/lib/pth so the libpthread that resides there gets 
picked up (why exactly this is necessary I haven't investigated, but it's 
definitely the case here).

Perhaps the tests should be modified so that they're compiled and performed 
twice - once for libgpgme-pthread and once for libgpgme-pth.

-- 
   ,_,   | Michael Nottebrock               | lofi at freebsd.org
 (/^ ^\) | FreeBSD - The Power to Serve     | http://www.freebsd.org
   \u/   | K Desktop Environment on FreeBSD | http://freebsd.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : /pipermail/attachments/20041211/93f72221/attachment-0001.bin


More information about the Gnupg-devel mailing list