From owner-svn-src-all@FreeBSD.ORG Fri Mar 20 18:21:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 084481065679 for ; Fri, 20 Mar 2009 18:21:08 +0000 (UTC) (envelope-from cokane@FreeBSD.org) Received: from mail-out1.fuse.net (mail-out1.fuse.net [216.68.8.175]) by mx1.freebsd.org (Postfix) with ESMTP id B277E8FC14 for ; Fri, 20 Mar 2009 18:21:07 +0000 (UTC) (envelope-from cokane@FreeBSD.org) X-CNFS-Analysis: v=1.0 c=1 a=r_5zXaxxhK4A:10 a=SrmVwFdnOH0A:10 a=6I5d2MoRAAAA:8 a=mDV3o1hIAAAA:8 a=tVtli89e7P5fUUDGNEkA:9 a=sHmOR11LvyQCMGWePOYA:7 a=gOTDsefWpYLdnwcWseGZ4D1YLwEA:4 a=LY0hPdMaydYA:10 a=3our312xe5wwGToX:21 a=5q22virFVcgRI0ER:21 a=2l8Pv3DlLmjInSRyVz8A:9 a=6hzxJyPt57ZiYCNgerb-OijkPcsA:4 a=rPt6xJ-oxjAA:10 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Authentication-Results: gwout1 smtp.mail=cokane@FreeBSD.org; spf=softfail Received-SPF: softfail (gwout1: transitional domain FreeBSD.org does not designate 74.215.227.9 as permitted sender) Received: from [74.215.227.9] ([74.215.227.9:50399] helo=discordia) by gwout1 (envelope-from ) (ecelerity 2.2.2.37 r(28805/28810M)) with ESMTP id DA/39-27669-29ED3C94; Fri, 20 Mar 2009 14:21:06 -0400 Received: by discordia (Postfix, from userid 103) id 75CB135A7F2; Fri, 20 Mar 2009 14:21:06 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.1.8-gr1 (2007-02-13) on discordia X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, URIBL_SBL autolearn=ham version=3.1.8-gr1 Received: from [172.31.1.6] (unknown [172.31.1.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by discordia (Postfix) with ESMTP id 7C27F35A7F1; Fri, 20 Mar 2009 14:20:58 -0400 (EDT) From: Coleman Kane To: Sam Leffler In-Reply-To: <49C3D518.6070105@freebsd.org> References: <200903142010.n2EKAESF006945@svn.freebsd.org> <20090320140015.GA17645@hub.freebsd.org> <20090320153405.GA62675@zim.MIT.EDU> <49C3BCD4.4030605@freebsd.org> <1237567495.1993.2.camel@localhost> <49C3D518.6070105@freebsd.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-pMvLpvf7zNpuZdBfNYIa" Organization: FreeBSD Project Date: Fri, 20 Mar 2009 14:19:35 -0400 Message-Id: <1237573175.1993.19.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 FreeBSD GNOME Team Port Cc: svn-src-head@freebsd.org, Vasil Dimov , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r189828 - in head: include sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2009 18:21:08 -0000 --=-pMvLpvf7zNpuZdBfNYIa Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2009-03-20 at 10:40 -0700, Sam Leffler wrote: > Coleman Kane wrote: > > On Fri, 2009-03-20 at 08:57 -0700, Sam Leffler wrote: > > =20 > >> David Schultz wrote: > >> =20 > >>> On Fri, Mar 20, 2009, Vasil Dimov wrote: > >>> =20 > >>> =20 > >>>> On Sat, Mar 14, 2009 at 08:10:14PM +0000, David Schultz wrote: > >>>> =20 > >>>> =20 > >>>>> Author: das > >>>>> Date: Sat Mar 14 20:10:14 2009 > >>>>> New Revision: 189828 > >>>>> URL: http://svn.freebsd.org/changeset/base/189828 > >>>>> > >>>>> Log: > >>>>> Fix the visibility of several prototypes. Also move pthread_kill(= ) and > >>>>> pthread_sigmask() to signal.h. In principle, this shouldn't break= anything, > >>>>> =20 > >>>>> =20 > >>>> [...] > >>>> > >>>> But it did break, see http://www.freebsd.org/cgi/query-pr.cgi?pr=3D1= 32828 > >>>> > >>>> I think one's namespace shouldn't be polluted with the prototype of > >>>> pthread_kill() if he has not included pthread.h. > >>>> =20 > >>>> =20 > >>> The pthreads API has always defined pthread_kill() to be in > >>> signal.h, not pthread.h. This is what is done in glibc and > >>> elsewhere. > >>> > >>> GNU Pth has some bogus and extremely unportable hacks to ``trick'' > >>> system headers into not declaring symbols: > >>> > >>> /* > >>> * Prevent system includes from implicitly including > >>> * possibly existing vendor Pthread headers > >>> */ > >>> #define PTHREAD > >>> #define PTHREAD_H > >>> #define _PTHREAD_T > >>> #define _PTHREAD_H > >>> #define _PTHREAD_H_ > >>> #define PTHREAD_INCLUDED > >>> #define _PTHREAD_INCLUDED > >>> #define SYS_PTHREAD_H > >>> #define _SYS_PTHREAD_H > >>> #define _SYS_PTHREAD_H_ > >>> #define SYS_PTHREAD_INCLUDED > >>> #define _SYS_PTHREAD_INCLUDED > >>> #define BITS_PTHREADTYPES_H > >>> #define _BITS_PTHREADTYPES_H > >>> #define _BITS_PTHREADTYPES_H_ > >>> #define _BITS_SIGTHREAD_H > >>> > >>> The one that works for glibc is _BITS_SIGTHREAD_H. I'd rather not > >>> be complicit in these shenanigans, but if we can't easily fix the > >>> problem in Pth, I suppose we can teach signal.h about one of these > >>> bogus macros. What do you think? > >>> > >>> =20 > >>> =20 > >> Dumb question, why do we need devel/pth? Isn't the native pthread=20 > >> support sufficient? > >> > >> Sam > >> > >> =20 > > > > For whatever reason, both security/libassuan and security/gnupg want > > pth. > > > > I was able to solve the problem by removing the "#include " > > from the offending file (there is only one) in devel/pth. After that, i= t > > built fine and I am using it now. > > > > Maybe devel/pth doesn't even really need to #include > > anymore.... > > =20 >=20 > Well a recent foray into dealing with this ports breakage made me=20 > question why we drag in various packages. devel/pth is one example; I=20 > see many others scroll by that appear to duplicate functionality in the=20 > base system. At the end of the day it's clearly an issue of maintenance=20 > overhead--we'd have to mod apps to do things like remove use of=20 > gnu-long-opts in to switch away from things like gtar and the savings is=20 > unclear. But I can ask... >=20 > Sam >=20 I've found that many of the GNU apps are notorious for this. I really can't say that I know why libassuan or gnupg explicitly require GNU pth, rather than first attempting to use POSIX pthread API. Their configure scripts both want to search for and run pth-config, and fail to enable some sort of threaded features if it doesn't exist. I already tried removing pth stuff from both port Makefiles to see what would happen. I didn't spend much time on it after I figured out that devel/pth would just work if I removed the signal.h include. I am guessing that some non-standard extensions which GNU pth provides are not provided by the normal POSIX spec. In fact, libassuan just goes ahead and uses a bunch of pth_* overrides for dealing with them in a thread-safe manner (waitpid, read, write, select, usleep). According to GnuPG (security/gnupg in the configure.ac file): *** To support concurrent access to the gpg-agent and the SCdaemon *** we need the support of the GNU Portable Threads Library. *** Download it from ftp://ftp.gnu.org/gnu/pth/ *** On a Debian GNU/Linux system you might want to try *** apt-get install libpth-dev --=20 Coleman Kane --=-pMvLpvf7zNpuZdBfNYIa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEUEABECAAYFAknD3jcACgkQcMSxQcXat5e7/gCcDlgCxULcbgTEj2q89CbRChlu WiwAmJteH+rbT4/avhddMACqM4YFlcI= =6CFn -----END PGP SIGNATURE----- --=-pMvLpvf7zNpuZdBfNYIa--