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.
signature.asc
Description: This is a digitally signed message part.
