[xml] makefile for libxml2 wrong with threads



There is a problem in the libxml2 build environment if you are building the
library with support for threads.

If you examine the makefile, the target which generates the library, i.e. the
libxml2.la target, (through libtool) should have $(THREAD_CFLAGS) and
$(THREAD_LIBS) added to it.

I guess that they should be actually added to a subsidiary target, maybe
libxml2_la_LDFLAGS or LIBS. I don't know...

If you don't have these flags, then the library isn't properly linked with the
required thread libraries and this can cause problems for applications which
then aren't explicitly linked with libpthread themselves.

(This is a particular problem for single threaded applications which are using
a libxml2.so which was built with threading enabled. This class of application
will cause libxml2.so to dump core.)

So, although I can hack a makefile to make it right, I'm not at all familiar
in the use of autoconf and friends, so I can't work out what actually needs
to be done to get the build environment corrected.

Is there anyone out there who can sort this out and submit a patch to the
list to the appropriate file which implements the change I've described
above?

Gary

Attachment: pgpXmN4uyczl6.pgp
Description: PGP signature



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