Date: Sat, 22 Dec 2007 18:07:55 +0100 From: Alexander Leidinger <Alexander@Leidinger.net> To: Ed Schouten <ed@fxq.nl> Cc: ports@freebsd.org Subject: Re: pkg-config and library dependencies Message-ID: <20071222180755.435a4b08@deskjail> In-Reply-To: <20071222122149.GK1169@hoeg.nl> References: <20071222122149.GK1169@hoeg.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Ed Schouten <ed@fxq.nl> (Sat, 22 Dec 2007 13:21:49 +0100): > It turns out that my configure script added some unneeded -lfoo's, so I > removed those, but there were still a lot of libraries that got added by > pkg-config and friends. It turns out that a lot of those .pc's add > rubbish: [...] > The last case is even worse. Your application will link directly against > libthr if your use libgthread, voiding the entire idea of abstracting > the threads library. I guess the reason they were added, is keep things > working when compiling static binaries, because you can't recursively > pull dependencies in that case, but that is a wrong argument, because > you can then add the libraries to Libs.private and use > `pkg-config --static'. The problem is even deeper. libtool does not enable the "OS has recursive resolver" knob on most systems. Debian has a custom patch. The problem is, that in some cases this doesn't work. I can't remember them, but have a look at the libtool archive, I asked there about the problem. libtool-2 is AFAIR supposed to fix the problems. I also asked the gome maintainers if they are interested in patches to their libs which fix the issues you mentioned. The outcome is (and I agree with them), that patches should go to the authors of the problematic software first, and come into FreeBSD via regular updates of the software in question. I also have some patches regarding this, but they are outdated (and just a proof of concept, as I wanted to play around with this first), since I haven't updated to the new X.org / GNOME yet. You can find patches at http://www.leidinger.net/FreeBSD/port-patches/, feel free to take some and play around with them. I would like to see that "the right thing" is done in the software which is ported, so if someone wants to give this a high priority on his TODO list, count me in for some help (as time permits). Bye, Alexander. -- Ferengi Rule of Acquisition #16: A deal is a deal... until a better one comes along. -- ST:DS9, "Melora" http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071222180755.435a4b08>