Created attachment 41637 [details] [review] dbus-1.pc.in: move -lpthread, -lrt, Winsock to Libs.private dbus-1.pc.in has libpthread, librt and/or Winsock in its Libs, whereas they should be in Libs.private: "Private libraries are libraries which are not exposed through your library, but are needed in the case of static linking" -- pkg-config(1) Meanwhile, it'd be nice for developers if there was an uninstalled version of the .pc file so you can link against an uninstalled copy of libdbus; see http://smcv.pseudorandom.co.uk/2008/09/pc-uninstalled/ for more about that.
Created attachment 41638 [details] [review] Add dbus-1-uninstalled.pc.in
*** Bug 27287 has been marked as a duplicate of this bug. ***
(In reply to comment #0) > Created an attachment (id=41637) [details] > dbus-1.pc.in: move -lpthread, -lrt, Winsock to Libs.private > > dbus-1.pc.in has libpthread, librt and/or Winsock in its Libs, whereas they > should be in Libs.private: Hmmm, ouch. We really should have noticed this in the first place =/ But...I'm worried about application compatibility. It's possible that an application was building using -ldbus and was using e.g. clock_gettime() and not explicitly linking to -lrt. Granted this is just a compilation and probably won't break existing binaries, but still I think this one is better on the 1.5 branch and not in a stable release.
(In reply to comment #1) > Created an attachment (id=41638) [details] > Add dbus-1-uninstalled.pc.in Looks good, and thanks for the blog entry link - I never knew exactly how the -uninstalled stuff was supposed to work.
(In reply to comment #3) > But...I'm worried about application compatibility. It's possible that an > application was building using -ldbus and was using e.g. clock_gettime() and > not explicitly linking to -lrt. OK, I only applied this commit on master (for 1.5.2). > Granted this is just a compilation and probably won't break existing binaries It won't, pkg-config is only used at compile time. (In reply to comment #4) > (In reply to comment #1) > > Created an attachment (id=41638) [details] [details] > > Add dbus-1-uninstalled.pc.in > > Looks good Fixed in git for 1.4.10, 1.5.2. Note that because this was based on the improved .pc from the commit above, people using an uninstalled dbus *do* get the Libs.private fix - but if you're using an uninstalled copy of dbus I think it's OK to enforce stricter correctness.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.