Hi Boris,
from what I recall, convenience libraries are used because the sources are split into separate folders. On the other hand, we put in each convenience library sources coming from multiple folders (e.g. libdom.la contains files from xercesc/dom and xercesc/dom/impl; libutil.la contains files from xercesc/util and xercesc/util/regx; libframework.la from xercesc/framework and xercesc/framework/psvi; libvalidators.la from all the subfolders under xercesc/validators), defeating their purpose. As a side effect, this structure prevents Xerces from building on Cygwin with MS compilers, as the "lib" tool used to build convenience libraries doesn't behave like "ar" (it preserves the path used in the object file names, so that the linker will not find all the object files in a single folder after extracting the libraries). In the past I have tried to split the src/Makefile.am into one Makefile.am per folder, but everytime something broke; I have never attempted to get rid of the convenience libraries altogether, so I support the attempt to remove them and ask libtool to generate the final libraries in one step.

Alberto

Boris Kolpackov wrote:
Hi,

I just realized that the libtool/automake convenience libraries that
are heavily used in the new build system have one major drawback:
when both PIC and non-PIC objects are being built, the convenience
library only contains the PIC versions. As a result, later, when the
main library  (libxerces-c in our case) is built, these PIC objects
are used for both shared and static versions. This seems to me like
a bad way to do it: the code in the static version is slower than
it could be and a lot of time is wasted building the non-PIC objects
which are then simply thrown away.

I am by no means an autotools expert, but it appears that automake
can handle sources in different directories just fine. In fact,
sources for some of the convenience libraries are split into several
sub-directories and therefore already rely on this feature. I am then
wondering what is the purpose of all these convenience libraries? Since
all of them but one (libcompat.la) are built from a single makefile
(src/Makefile.am), there does not seem to be anything convenient about
them. They also have the big drawback mentioned above.

Does anyone (James?) see any potential problems in getting rid of them?
The only thing that I can think of is the command line length limit on
some platforms but then the build system in 2.x.y does not seem to have
this problem plus the ar command line has all the objects listed
explicitly.

Any feedback would be very much appreciated.


Boris




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to