Re: [patch] Don't add PTH include path to gpgme's CFLAGS globally
Michael Nottebrock <[email protected]> Mon, 29 Aug 2005 20:49:54 +0200
| Newsgroups | gmane.comp.encryption.gpg.gpa.devel |
|---|---|
| Message-ID | <[email protected]> |
On Monday, 29. August 2005 14:02, Marcus Brinkmann wrote: > Hi, > > thanks for your report. > > At Mon, 8 Aug 2005 19:54:11 +0200, > > Michael Nottebrock <[email protected]> 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 > information). 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 'pthread_attr_t' /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 'pthread_once_t' /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 'pthread_mutexattr_t' /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 'pthread_mutex_t' /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 'pthread_condattr_t' /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 'pthread_cond_t' /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 'pthread_rwlockattr_t' /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 'pthread_rwlock_t' /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 > file. 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 | [email protected] (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org _______________________________________________ Gpa-dev mailing list [email protected] http://lists.gnupg.org/mailman/listinfo/gpa-dev
signature.asc
(application/pgp-signature, 187 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDE1jYXhc68WspdLARAjJ8AJ9fAbp4eG7ppkpRDFkvDCvSSZW94gCfWsfu BC4Z6abtXKHWTIbCU4v2Zx8= =Kw/6 -----END PGP SIGNATURE-----