Re: Ocamlfind does not allow -thread

"Gabriel Scherer [email protected] [ocaml_beginners]" <[email protected]> Fri, 18 Dec 2015 15:55:04 +0100
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <CAPFanBGtT8ZLAJjHZ-Dtc5TeSu8ZtTW0PH7NK=nw-gpC758v0g@mail.gmail.com>
Are you sure that ocamlfind is correctly installed in your new 4.02.3
switch (opam install ocamlfind), that you are not using some other
ocamlfind version? You can check with

  ocamlfind -printconf

OCamlfind thread heuristics depends on the value of the type_of_threads
variable in the file

  $(opam config var lib)/threads/META

Try with your two different opam switches. When it says

  type_of_threads = "posix"

then ocamlopt -thread option should be available. If it says "vm", or is
not set, then it should not be available.

If this line has "posix" on your 4.02.3 switch, then the failure of
ocamlfind may be an ocamlfind issue, and you should send an email to its
maintainer (Gerd Stolpmann).
If this line does not have "posix", then this may be a configuration issue
happening when installing ocamlfind in the new switch. I don't know how to
solve this, and would also contact Gerd Stolpmann in that case.


On Fri, Dec 18, 2015 at 1:46 PM, Sébastien Dailly
[email protected] [ocaml_beginners] <
[email protected]> wrote:

> Hello,
>
> I do not know where I should post this message, if this should be
> reported to opam or ocamlfind…
>
> I've switch my opam env from ocaml 4.02.1 to 4.02.3
>
> After this operation, ocamlfind does not detect anymore that my system
> is thread compatible (I'm using cygwin)
>
> $ ocamlfind ocamlopt -thread
> ocamlfind: ocamlopt does not support multi-threaded programs for your
> configuration
>
> invoking directly ocamlopt does not report errors :
>
> $ ocamlopt -thread ; echo $?
> 0
>
> invoking the previous version works also fine :
>
> $ ~/.opam/4.02.1/bin/ocamlfind.exe  ocamlopt -thread ; echo $?
> 0
>
> Is this a configuration problem ?
>
>
> Thanks !
>
>
> ------------------------------------
> Posted by: =?UTF-8?Q?S=C3=A9bastien_Dailly?= <[email protected]>
> ------------------------------------
>
> Archives up to December 31, 2011 are also downloadable at
> http://www.connettivo.net/cntprojects/ocaml_beginners
> The archives of the very official ocaml list (the seniors' one) can be
> found at http://caml.inria.fr
> Attachments are banned and you're asked to be polite, avoid flames etc.
> ------------------------------------
>
> Yahoo Groups Links
>
>
>
>