Hi Thomas,

2005/11/17, Thomas Petazzoni <[EMAIL PROTECTED]>:
> After some search, I found that the ocaml available in Mandriva was
> compiled without -with-pthread. So I recompiled the ocaml package with
> this option, but I still get the same error.

Weird.

> I've looked inside findlib code, but I don't really understand what's
> going on. It seems that there are two types of threads: Posix Threads
> (on Ocaml thread mapped to one Posix thread), and VM Threads (threads
> simulated by Ocaml). The following source code:

Yep. See: http://caml.inria.fr/pub/docs/manual-ocaml/manual038.html


> seems to indicate that VM_Threads are not possible with ocamlopt.

Yes (see above link).

> However, I compiled ocaml with POSIX_threads, so it should work,
> doesn't it ?

Yes.

> Am I missing something ?

Is the right compiler used? You can use "ocamlopt -v" to know the path
of the standard library used (and thus location of the compiler).

> How can I check that my Ocaml
> compiler was really compiled with -with-pthread ?

You should have the file "threads.cmxa" in the thread/ directory in
the standard library (in my case on Cygwin
/usr/lib/ocaml/thread/threads.cmxa).

You can try to compile a test program:

$ cat > toto.ml
let f a = a + 1

$ ocamlopt -thread threads.cmxa toto.ml

Yours,
d.


_______________________________________________
Demexp-dev mailing list
Demexp-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/demexp-dev

Répondre à