Re: [xml] Generating a correct xml2-config for use with --libs



On Thu, 13 Jun 2002, Gary Pennington wrote:

I didn't think this was Solaris specific...

An application need only link against libraries it explicitly uses. If 
foo uses networking code, then it should link with the appropriate 
networking libraries. If however, foo's only "use" of networking is 
performed by libxml2, then it is libxml2 which needs to link with the 
networking libraries and not foo.

So, the patch I provided removes unneccessary dependencies on libraries 
that applications, such as foo, don't need.

If you are saying that Linux (I presume you are talking about Linux) 
requires all libraries to be specified (even libraries that a dependant 
of a dependant of a dependant, etc...) to the linker, then I am really 
surprised. That is the case with static libraries (and ordering is 
important); but not with shared objects. That's the job of the linker.


There are a number of "defective" ld.so-s that don't correctly support
shared library dependnencies, the result being that linking an so-lib
against other libs is a no-op and the program needs to be linked against
all the shared libraries it depends on and all of their dependnencies. 

I do think gnu binutils have had that bug fixed for some time now.

Gary

        Sander

        you'll rescue me right?
        in the exact same way that they never did
        i'll be happy right?
        when your healing powers kick in





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]