On Thu, 15 Mar 2018 at 20:23:59 +0200, Adrian Bunk wrote: > On Thu, Mar 15, 2018 at 06:38:30PM +0100, Andreas Metzler wrote: > > --- > > ./libinput-1.10.3-builtwithmeson0.44.1-1/debian/libinput-dev/usr/lib/x86_64-linux-gnu/pkgconfig/libinput.pc > > 2018-03-15 18:24:08.366925927 +0100 > > +++ > > ./libinput-1.10.3-builtwithmeson0.45.0-1/debian/libinput-dev/usr/lib/x86_64-linux-gnu/pkgconfig/libinput.pc > > 2018-03-15 18:15:49.059380110 +0100 > > @@ -5,5 +5,7 @@ includedir=${prefix}/include > > Name: Libinput > > Description: Input device library > > Version: 1.10.3 > > +Requires.private: libwacom libudev mtdev libevdev > > This is wrong. > > Whether or not libinput internally uses other libraries like libwacom is > an implementation detail, not something that should leak through the cflags.
Yes and no. You're right that in this case, these dependencies are implementation details; however, even implementation details do need to be mentioned in the .pc file in at least some cases (if static linking is supported), not all users of Requires.private are as invisible as those, and at the moment this is pkg-config being used as designed. https://people.freedesktop.org/~dbn/pkg-config-guide.html#faq recommends the behaviour that Meson now provides. Adrian and I discussed this a bit on IRC yesterday, and I've now written up what we discussed in more detail on a related pkg-config bug/feature request. Please reply there with any further comments on the design of pkg-config. I've tried to summarize what Adrian said on IRC about the reasons why it's bad to have excess CFLAGS; if there's something I've missed or got wrong, please say so there. https://bugs.freedesktop.org/show_bug.cgi?id=105572 I don't think this is really a RC bug in either meson or pkg-config. It's RC for libinput, but #893067 was already filed against libinput after this one was reassigned to meson, so please use that bug number to represent the short term response (either a workaround or a solution, depending what happens upstream) of adding the missing dependencies so that sudo apt install libinput-dev; gcc hello.c $(pkg-config --cflags --libs libinput) will work again. Regards, smcv