On Sat, Feb 18, 2006 at 09:07:19PM +0100, Loïc Minier wrote: > On mer, jan 11, 2006, Kurt Roeckx wrote: > > I suggest if you create a convience library, you don't link any > > libraries to it at that time. Instead, when you are linking in > > the convience libraries to something, at that point you should > > add those libraries. This will avoid libtool from adding all the > > depedency libraries on the command line. > > Unfortunately, the convenience library depends on another libtool > archive which is not a convenience lib, but a real library. Beside, > that convenience libcommon.la is used in some places, and it would be > inconvenient to change that (ie. upstream probably wouldn't like it). > > I'm not sure why libtool has to link all dependency_libs of a > convenience library.
When you create a convenience library, and at that time you tell it to link to some libraries, it will add all the those libraries you had on the command line, and all the ones that those depend on, to dependency_libs, like it always does. When you then link something to that convenience library, it will add the libraries in the dependency_libs to the link line. It's doing this because you told that the library needs symbols from the libraries you had on the command line, and it's also linking in all the libraries required by those. One solution to this would be to only store the libraries that were on the command line in dependency_libs, and I've suggested that to upstream, but they see problems with it, and we're working on it. A workaround is not telling it which libraries the convenience library needs, so you end up with an empty dependency_libs. And then when linking to the convenience library you also link to those that it requires. This might require some changes, but it's the only workaround I know that would solve your problems in the short turn. Kurt

