[patch] Don't add PTH include path to gpgme's CFLAGS globally
lofi at freebsd.org
Mon Aug 29 20:49:54 CEST 2005
On Monday, 29. August 2005 14:02, Marcus Brinkmann wrote:
> thanks for your report.
> At Mon, 8 Aug 2005 19:54:11 +0200,
> Michael Nottebrock <lofi at freebsd.org> wrote:
> > This causes a compile error in gpgme due to conflicting types for
> > pthread_* if pth-support is enabled, since the pth include directory is
> > globally added to CFLAGS and ath-pthread.c picks up the pth-supplied
> > pthread.h header instead of the system include.
> Can you give more details about the compile error, just to know what
> the actual problem is? (Reports should always include such
cc -DHAVE_CONFIG_H -I. -I. -I.. -I../assuan -I/usr/local/include -O2 -pipe
-march=athlon-xp -I/usr/local/include/pth -Wall -Wcast-align -Wshadow
-Wstrict-prototypes -MT ath-pthread.lo -MD -MP -MF .deps/ath-pthread.Tpo -c
ath-pthread.c -fPIC -DPIC -o .libs/ath-pthread.o
In file included from ath-pthread.c:36:
/usr/local/include/pth/pthread.h:285: error: conflicting types for 'pthread_t'
/usr/include/sys/_pthreadtypes.h:64: error: previous declaration of
'pthread_t' was here
/usr/local/include/pth/pthread.h:286: error: conflicting types for
/usr/include/sys/_pthreadtypes.h:65: error: previous declaration of
'pthread_attr_t' was here
/usr/local/include/pth/pthread.h:288: error: conflicting types for
/usr/include/sys/_pthreadtypes.h:71: error: previous declaration of
'pthread_once_t' was here
/usr/local/include/pth/pthread.h:289: error: conflicting types for
/usr/include/sys/_pthreadtypes.h:67: error: previous declaration of
'pthread_mutexattr_t' was here
/usr/local/include/pth/pthread.h:290: error: conflicting types for
/usr/include/sys/_pthreadtypes.h:66: error: previous declaration of
'pthread_mutex_t' was here
/usr/local/include/pth/pthread.h:291: error: conflicting types for
/usr/include/sys/_pthreadtypes.h:69: error: previous declaration of
'pthread_condattr_t' was here
/usr/local/include/pth/pthread.h:292: error: conflicting types for
/usr/include/sys/_pthreadtypes.h:68: error: previous declaration of
'pthread_cond_t' was here
/usr/local/include/pth/pthread.h:293: error: conflicting types for
/usr/include/sys/_pthreadtypes.h:73: error: previous declaration of
'pthread_rwlockattr_t' was here
/usr/local/include/pth/pthread.h:294: error: conflicting types for
/usr/include/sys/_pthreadtypes.h:72: error: previous declaration of
'pthread_rwlock_t' was here
ath-pthread.c: In function `_gpgme_ath_connect':
ath-pthread.c:161: warning: passing arg 2 of `__pthread_connect' discards
qualifiers from pointer target type
> > The attached patch changes gpgme's global configure template and the
> > Makefile template in gpgme/gpgme so that PTH_CFLAGS are only added to the
> > include path where needed. The patch should apply to both the latest
> > gpgme in CVS and gpgme 1.0.x.
> Does the patch work?
> From your interpretation of the problem, a
> compile error should occur in ath-pthread-compat.c, because it will
> pick up the pth supplied header file rather than the system header
It's been a while - I tend to agree that ath-pthread-compat.c should fail as
well, but for some reason it apparently doesn't.
Then again, I didn't (and still don't) have access to a FreeBSD 6 system
myself, but the the patches to gpgme/Makefile.in of the 1.0.2 distribution
tarball which I produced with the patch against CVS I were confirmed to be
working by the person who reported the error to me. Fun.
> It seems to me that the pth include directory should only be added to
> the ath-pth.c and ath-pth-compat.c compilation.
Yes, that would probably be best.
,_, | 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
Size: 187 bytes
Desc: not available
Url : /pipermail/attachments/20050829/300775b6/attachment.pgp
More information about the Gpa-dev