On Fri, Dec 07, 2007 at 01:17:27PM -0500, Mike Frysinger wrote:
> On Friday 07 December 2007, Stepan Kasal wrote:
> > 1)
> > The most important one is this:
> >
> > $ pkg-config --libs blkid
> > -L/lib -lblkid -luuid -ldevmapper
> >
> > The "-ldevmapper" option is not only redundant, it's very evil.
> > Se below for a detailed explanation (let's call this "so-deps hell").
> >
> > Karel proposes to add --as-needed (or -Wl,--as-needed) to *_LDFLAGS
> > for dynamic linking to fix this. (configure has to check that
> > --as-needed is available, of course.)
> >
> > My proposal would be to use hardwired "-lblkid -luuid" for dynamic
> > linking and start using pkg-config only when/if it is really needed,
> > ie. a real-world bug report arrives.
>
> i learned about a new option in .pc files which i think the blkid.pc provider
> should be fixed to use:
> Libs: -L${libdir} -lblkid
> Libs.private: -luuid -ldevmapper
Yeah.. I tried exactly same thing two days ago :-) You have to remove
uuid and devmapper from the "Requires:" field too.
# cat /usr/lib64/pkgconfig/blkid.pc
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib64
includedir=/usr/include
Name: blkid
Description: Block device id library
Version: 1.40.2
Requires:
Cflags: -I${includedir}
Libs: -L${libdir} -lblkid
Libs.private: -luuid -ldevmapper
# pkg-config --static --libs blkid
-lblkid -luuid -ldevmapper
# pkg-config --libs blkid
-lblkid
I'm going to send a patch to Ted next week.
> > But Karel suggests we use PKG_CHECK_EXISTS from pkg.m4 for this (that
> > would include a version number check to ensure --libs-only-* are
> > available).
> >
> > Yes, this cries for a fix in pkg.m4, but the fact that the old
> > broken interface has to be maintained may complicate the situation...
>
> an optional additional argument to the PKG_CHECK_EXISTS macro that, when not
> provided gives old behavior and when provided, controls the newer proper
> behavior ?
>
> since this sounds like architectual issues, i think the best route would be
> parallel ones:
> - have a local pkg.m4 that does what we need
> - engage with pkg-config maintainers to see if we can drive the direction
> -mike
I'll try to prepare a patch with pkg-config & PKG_CHECK_EXISTS next week.
Karel
--
Karel Zak <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html