On Tue, Sep 16, 2008 at 08:36:03PM +1000, Greg Schafer wrote: > I just hit this too. My scenario is different to Robert's but quite > non-standard nonetheless. To cut a long story short: > > - native build > - only static libs from e2fsprogs > - non-standard --prefix > > util-linux-ng-2.13.1 works fine ie: -lblkid -luuid is passed on the link > line and everything is sweet. > > > You needn't to specify all possible dependencies on gcc command > > line... see my previous e-mail. It works. The -lblkid is enough if > > your linker is able to evaluate dependencies and found all .so libs. > > True. But it feels kinda wrong relying on the linker like this. As has been > proven, it doesn't work in all scenarios eg: non-standard prefix. Yeah, the linker only is able to evaluate dependencies on shared libraries. It doesn't work on static libraries. I've been working on solving the problem in e2fsprogs by trying to make the pkg-config files better --- and there have been more improvements in the latest git branch, but the .pc files don't completely handle the case where people are only building static libraries. I consider that a bug, and I'll fix it. I'll note that historically, especially in the days before pkg-config existed, using external libraries was extremely painful, and that's why I bundled many libraries directly into the e2fsprogs sources; since I authored many of them, or was the first to bring things like libcom_err and libss into the Linux world, it was just simpler for myself to include them into e2sprogs source tree directly, where I could more easily use autoconf and Makefile.in hackery to make the right thing happen automatically. Of course, it doesn't work for all projects to use internally maintained libraries (so much for code reuse), so pkg-config definitely does help here; and that's why e2fsprogs does provide pkg-config .pc files. That being said, I know they still aren't perfect and don't handle all of these cases yet; no surprise, this problem is difficult one, and not all projects are as flexible about supporting people building libraries statically, for example. But if you find problems using pkg-config, please let me know by filing a bug in e2fsprogs SourceForge tracker. I've added a SF bug for the case of pkg-config files not being correct for static-only builds already it's 2114274. Regards, - Ted -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html