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



Your description of "*the same* Makefiles on all platforms" is a fantasy anyway, since there is no way that this can be true for anything but the simplest of applications. In fact, by listing unrequired dependancines on Solaris to libraries that your application does not depend on, your makefile is (in some sense) incorrect.

Well, I have the same Makefile config for LibXML2 on Solaris, Linux and HP.
Why I should change it?

Let me be clear, you should only link your application with -lsocket if your application needs access to a member of libsocket. Otherwise you are creating a completely unneccessary dependancy on a library that your application doesn't directly depend on.

Solaris 2.6 + Sun Workshop CC 4.2 generate "unresolved external symbols" error if indirect linked library is not specified (I know that nobody uses 2.6 except me these days but it's more simple to move from 2.6 to Linux than to 2.8 or 2.9). The problem with LibXML is that you could not determine on linkage stage will networking code be used or not. And in order to load libxml2.so you have to load libsocket.so. So we are talking only about a question do we need to list all
dependencies by the application or we can have hierarhical dependencies.
From my point of view, the first option is better because it removes possible
problems with stupid linkers and loaders. And I still could not understand
what is the "dependencies" differences between these two approaches.


Aleksey



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