"Christopher Gutteridge" <[EMAIL PROTECTED]> writes:

> I'm running a non-pthreads version of perl, and so I'm getting an
> error when xerces attempts to call the mutex_lock.

Hi Christopher,

This is the second time I've heard this, so I'm becoming a
believer... 

I am *not* running a threaded perl and Xerces works fine for me. The
Makefile forces -lpthread to be included on the link line, so this
should work. I don't know what is causing it to fail.

Could you do a 

* perl -V
* gcc -v 
* uname -a

If linux what distribution are you running?

> Would it be possible to make the perl module Xerces.so statically
> linked against pthreads if the perl install isn't? Would this work?
> Or could it check at runtime and dynamically load pthreads?

No matter how much I delve into dynamic loading, I just can't seem to
grasp all the issues involved. Meaning in this case, I can't really
answer your question with 100% certainty.

If -lpthreads was used during the link phase, then the answer really
ought to be: yes the linker will go out and load pthreads for you... 

And yes, you should be able to force inclusion of the pthread methods into
Xerces.so. The compiler/linker option is of course different for each
compiler/linker combo and I'm not sure it's one of the ones that perl
tracks. For GNU ld it is --whole-archive:

       --whole-archive
              For each archive mentioned on the command line  af�
              ter  the  --whole-archive option, include every ob�
              ject file in the archive in the link,  rather  than
              searching  the  archive  for  the  required  object
              files.  This is normally used to  turn  an  archive
              file into a shared library, forcing every object to
              be included in the resulting shared library.

Try that manually in your link and see what happens.

> Or as a rather ick last resource, if you're compiling it for a non
> threaded perl could you just add in a mutex_lock dummy functions
> (and for any other that xerces-c uses). I believe (hand not on
> heart) that xerces is only using these to be thread safe, and an
> unthreaded perl will be pretty damn thread safe.

I'd like to figure out why it's not working the way it should.

> It took me a while to figure out what's going on, so it's possible
> that this is causing trouble for other people too.

Your second in line on this one, which probably means there are others
that tried it and failed and didn't bother to post to the list. 

> (or maybe I've just missed a vital config option <grin>)

Oh, yeah --DWIM ...

(Do What I Mean)

jas.

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

Reply via email to