When configured with --disable-static, *.pc still contains .private lines which are no longer needed and can cause link failures when linking partly-static binraries
Submitted by Dan Kegel
Link to original bug (#758807)
Description
Use case for this problem is narrow.
- private build of gnome tree for SDK installed in parallel with system
- apps that build against this SDK do not interact with system gnome
- they want to be linked dynamically against glib but statically against the rest of the SDK
- they use pkg-config for finding both the private build of gnome and the rest of the SDK
- the resulting glib .pc files still contain Libs.private etc. lines, but since no static glib libraries were built, they are not needed
- apps that try to use those .pc files with pkg-config --static fail to link if those unneeded libraries are not present on system
Easy workaround: if you're in this situation, add a line late in your build script to post-process the .pc files to remove any line containing .private, e.g.
sed -i.bak -e '/private/d' DESTDIR
PREFIX/lib/pkgconfig/*.pc
Version: 2.42.x