GPGME CVS branched

Marcus Brinkmann marcus.brinkmann at ruhr-uni-bochum.de
Sat Dec 11 20:38:57 CET 2004


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.  The
undefined references clearly come from the system library, not from
GPGME (ie, GPGME refers to write(), and that is replaced in the
pthread case with __pthread_write(), I assume.  You have to check why
-lpthread is not enough on your system (or where the error lies).  I
don't see how pth could enter the picture in any way here.

Thanks,
Marcus





More information about the Gnupg-devel mailing list