Date: Thu, 06 Apr 2017 18:22:39 +0200 From: Matthew Rezny <rezny@freebsd.org> To: Jan Beich <jbeich@freebsd.org> Cc: freebsd-ports@freebsd.org Subject: Re: Excessive CFLAGS: -pthread -D_THREAD_SAFE Message-ID: <27162610.17bN93c29e@workstation.reztek> In-Reply-To: <d1cp-1ugi-wny@FreeBSD.org> References: <d1cp-1ugi-wny@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1976495.Ged48x1UuB Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Thursday 06 April 2017 16:28:29 Jan Beich wrote: > A few weeks ago (just before 2017Q2 has branched) many GUI apps started > to have very long compile lines. Most of it is composed of duplicate > occurence of the same flags with the first bad being r437182 e.g., > > $ pkg-config --cflags gtk+-2.0 > -I/usr/local/include/gtk-2.0 -I/usr/local/include/pango-1.0 > -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include > -I/usr/local/include -I/usr/local/include/cairo > -I/usr/local/include/pixman-1-I/usr/local/include/freetype2 > -I/usr/local/include/libpng16 -I/usr/local/include/harfbuzz > -I/usr/local/include/libdrm -pthread -D_THREAD_SAFE -pthread -D_THREAD_SAFE > -pthread -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread -D_THREAD_SAFE > -pthread -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread -D_THREAD_SAFE > -pthread -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread -D_THREAD_SAFE > -pthread -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread -D_THREAD_SAFE > -pthread -D_THREAD_SAFE -pthread -I/usr/local/include/gdk-pixbuf-2.0 > -I/usr/local/include/atk-1.0 -pthread -D_THREAD_SAFE -pthread > -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread > -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread > -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread > -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread > -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread -pthread > > Is this intentional? A bug in pkgconf or .pc file? The commit to which you refer is the update of libpthread-stubs, which is no longer a library but simply a .pc file that adds -pthread to Cflags and Libs. That .pc is used for building a dozen or so ports, one of which is libxcb. libxcb happens to need a RUN_DEPENDS as well because it references pthread- stubs in xcb.pc. The next step is libX11 which has a RUN_DEPENDS on libxcb via USE_XORG=xcb, and whose x11.pc references xcb and appends -D_THREAD_SAFE to Cflags. Thus, the culprit of the repeated -D_THREAD_SAFE -pthread must be multiple inclusions of x11.pc. X11 applications have a USE_XORG=x11 which is in effect both BUILD_ and RUN_DEPENDS on x11.pc. USE_XORG=x11 will appear multiple times up the chain to the application; in GTK+, in libs used by or with GTK that link to libX11, in the application itself, etc. If the x11.pc is used at every place that there is the dependency then that explains what we see now. The question now is where in the chain to fix it. --nextPart1976495.Ged48x1UuB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iHUEABEKAB0WIQRDZfND9SZODbvdAiNgGkPUEUo+QwUCWOZrTwAKCRBgGkPUEUo+ Q12EAP9zuLrX3QL8v2WT8YMzQFq1q2MSSfGL/BxUS5sPtFxsvgD/c02Dinag4mm/ 49c4dDpJoV4xfbRB1EIANuwrTLnk+js= =cCPz -----END PGP SIGNATURE----- --nextPart1976495.Ged48x1UuB--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?27162610.17bN93c29e>