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

Re: [xml] xmlParseMemory() and xmlParseDTD()



You are right, Gary. It works perfectly if I use the
static library and I link my application with
-lpthread.

thank you again :-).

Ainhoa




 --- Gary Pennington <Gary Pennington sun com>
escribió: > MDC A. wrote:
> 
> >Hi,
> >
> >I was using the binary packages downloaded from
> your
> >page, Gary. But I was linking against the static
> >library libxml2.a.
> >I have linked against the dynamic library and the
> >problem has disappeared.
> >
> Ah. I think that if you link with the static library
> you must also link 
> your application with -lpthread (otherwise the
> support required for the 
> multi-threaded library (-lxml2) is not present).
> 
> Could you try re-using the static library and adding
> -lpthread to the 
> compile line to see if that works?
> 
> I'd like to add some information on this to my
> webpage, so I would 
> appreciate your letting me know what happens if you
> do the above.
> 
> >
> >Thank you very much to both of you for your time
> and
> >help
> >
> >Ainhoa
> >
> You're welcome.
> 
> Gary
> 
> >
> >
> > --- Gary Pennington <Gary Pennington sun com>
> >escribió: > Daniel Veillard wrote:
> >
> >>>On Wed, Mar 06, 2002 at 01:07:54PM +0100, MDC A.
> >>>
> >>wrote:
> >>
> >>>> xmlParserError(0x160840, 0x122cf0, 0x1646c8,
> >>>>
> >>0x0,
> >>
> >>>>0x0, 0x164afd)
> >>>>
> >>>   xmlParserError calls the xmlGenericError
> >>>
> >>routine which is initialized
> >>
> >>>to xmlGenericErrorDefaultFunc, with the default
> >>>
> >>xmlGenericErrorContext which
> >>
> >>>is initialized to NULL.
> >>>
> >>>>  xmlGenericErrorDefaultFunc(0x0, 0x12fcf8, 0x5,
> >>>>0xfffffff8,
> >>>>0x44, 0x1646b8)
> >>>>
> >>> So that call is correct. 
> >>> BUT xmlGenericErrorDefaultFunc() code is:
> >>>
> >>>---------------
> >>>void
> >>>xmlGenericErrorDefaultFunc(void *ctx
> >>>
> >>ATTRIBUTE_UNUSED, const char *msg, ...) {
> >>
> >>>   va_list args;
> >>>
> >>>   if (xmlGenericErrorContext == NULL)
> >>>	xmlGenericErrorContext = (void *) stderr;
> >>>
> >>>   va_start(args, msg);
> >>>   vfprintf((FILE *)xmlGenericErrorContext, msg,
> >>>
> >>args);
> >>
> >>>   va_end(args);
> >>>}
> >>>---------------
> >>>
> >>> Unless stderr == NULL in Solaris which would be
> >>>
> >>really really strange,
> >>
> >>>>vfprintf(0x0, 0xffbef0e4, 0xfeabf9b4, 0x8,
> >>>>
> >>0x12fcf8,
> >>
> >>>>0x1646c8)
> >>>>
> >>> I really don't see how the first argument to
> >>>
> >>vfprintf being passed can be
> >>
> >>>NULL !
> >>>
> >>>>which is the problem here?
> >>>>
> >>> I really don't know there is something really
> >>>
> >>really strange here !
> >>
> >>>>How can the problem be solved?
> >>>>
> >>> Take a debugger and check by single stepping,
> >>>
> >>possibly looking at
> >>
> >>>the assembly generated. I don't understand how
> the
> >>>
> >>first argument of the
> >>
> >>>call can be NULL ! Or someone else on Solaris can
> >>>
> >>reproduce your problem
> >>
> >>>and check it for you, sorry I can't ...
> >>>
> >>>Daniel
> >>>
> >>Hi,
> >>
> >>To cut a long story short, I think this is a
> problem
> >>to do with the 
> >>configure script. The linkage to -lpthread wasn't
> >>specified and so if 
> >>your application was single threaded and you built
> >>libxml2 for 
> >>multi-threaded use, failures of this nature would
> be
> >>caused.
> >>
> >>This was fixed before I reported it, but I think
> >>that it was only fixed 
> >>in 2.4.16.
> >>
> >>You can check by seeing if libxml2.so is linked to
> >>-lpthread, e.g.:
> >>
> >>bash-2.03$ ldd
> >>/usr/local/libxml/sparc/lib/libxml2.so
> >>        libpthread.so.1 =>      
> >>/usr/lib/libpthread.so.1
> >>        libz.so.1 =>     /usr/lib/libz.so.1
> >>        libm.so.1 =>     /usr/lib/libm.so.1
> >>        libsocket.so.1 =>       
> >>/usr/lib/libsocket.so.1
> >>        libnsl.so.1 =>   /usr/lib/libnsl.so.1
> >>        libc.so.1 =>     /usr/lib/libc.so.1
> >>        libdl.so.1 =>    /usr/lib/libdl.so.1
> >>        libmp.so.2 =>    /usr/lib/libmp.so.2
> >>        libthread.so.1 =>       
> >>/usr/lib/libthread.so.1
> >>       
> >>/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
> >>bash-2.03$
> >>
> >>If it isn't linked to -lpthread, then it's broken
> >>for use with single 
> >>threaded apps.
> >>
> >>The easy answer is to upgrade your version of
> >>libxml2 to use the latest 
> >>set of binaries that I ship from
> >>http://garypennington.net/libxml2/. 
> >>Alternatively, if you use an older version of
> >>Solaris, download the 
> >>source for 2.4.16 and build it.
> >>
> >>Gary
> >>
> >>-- 
> >>Gary Pennington
> >>Solaris Kernel Development,
> >>Sun Microsystems
> >>Gary Pennington sun com
> >>
> >>
> >> 
> >>
> >
>
>_______________________________________________________________
> >Do You Yahoo!?
> >Yahoo! Messenger
> >Comunicación instantánea gratis con tu gente.
> >http://messenger.yahoo.es
> >
> 
> 
> -- 
> 
=== message truncated === 

_______________________________________________________________
Do You Yahoo!?
Yahoo! Messenger
Comunicación instantánea gratis con tu gente.
http://messenger.yahoo.es



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