Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] Trouble with findlib and threads

7 views
Skip to first unread message

Thomas Petazzoni

unread,
Nov 21, 2005, 5:02:17 PM11/21/05
to caml...@inria.fr
Hi,

[ As I'm not on the list, please Cc: the replies. Thanks ! ]

I'm trying to get findlib to work with threads support on a Mandriva
2006 (mainly to compile equeue). For this, I've recompiled the Ocaml
compiler with --with-pthread, and then findlib. However, it still
doesn't work:

[tpetazzoni@thomas tmp]$ cat toto.ml
let f a = a + 1
[tpetazzoni@thomas tmp]$ ocamlopt -thread threads.cmxa toto.ml
[tpetazzoni@thomas tmp]$ ocamlfind ocamlopt -thread threads.cmxa toto.ml
ocamlfind: ocamlopt does not support multi-threaded programs for your
configuration

I've tested findlib 1.0.4 and 1.1, both with OCaml 3.08.3. Any idea ?

Thanks,

Thomas
--
PETAZZONI Thomas - thomas.p...@enix.org
http://{thomas,sos,kos}.enix.org - Jabber: thomas.p...@jabber.dk
http://{agenda,livret}dulibre.org - http://www.toulibre.org
Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E 1624 F653 CB30 98D3 F7A7

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Gerd Stolpmann

unread,
Nov 22, 2005, 5:57:56 AM11/22/05
to Thomas Petazzoni, caml...@inria.fr

Thomas Petazzoni said:
> Hi,
>
> [ As I'm not on the list, please Cc: the replies. Thanks ! ]
>
> I'm trying to get findlib to work with threads support on a Mandriva
> 2006 (mainly to compile equeue). For this, I've recompiled the Ocaml
> compiler with --with-pthread, and then findlib. However, it still
> doesn't work:
>
> [tpetazzoni@thomas tmp]$ cat toto.ml
> let f a = a + 1
> [tpetazzoni@thomas tmp]$ ocamlopt -thread threads.cmxa toto.ml
> [tpetazzoni@thomas tmp]$ ocamlfind ocamlopt -thread threads.cmxa toto.m
l
> ocamlfind: ocamlopt does not support multi-threaded programs for your
> configuration
>
> I've tested findlib 1.0.4 and 1.1, both with OCaml 3.08.3. Any idea ?

This is a configuration issue. I need the output of the configure script
of findlib to help you. Obviously, findlib did not detect that
multi-threading is supported.

Gerd
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany
ge...@gerd-stolpmann.de http://www.gerd-stolpmann.de
------------------------------------------------------------

Thomas Petazzoni

unread,
Nov 22, 2005, 6:02:55 AM11/22/05
to Gerd Stolpmann, caml...@inria.fr
Hi,

Thanks for your answer.

Gerd Stolpmann wrote:

> This is a configuration issue. I need the output of the configure script
> of findlib to help you. Obviously, findlib did not detect that
> multi-threading is supported.

Here is the output of the configure:

===
+ ./configure -mandir /usr/share/man -config /usr/lib/ocaml/etc/findlib.conf
Welcome to findlib version 1.1
Configuring core...
Testing threading model...
Configuring libraries...
labltk: found
camlp4: found
Configuration for dbm written to site-lib-src/dbm/META
Configuration for dynlink written to site-lib-src/dynlink/META
Configuration for graphics written to site-lib-src/graphics/META
Configuration for num written to site-lib-src/num/META
Configuration for num-top written to site-lib-src/num-top/META
Configuration for str written to site-lib-src/str/META
Configuration for threads written to site-lib-src/threads/META
Configuration for unix written to site-lib-src/unix/META
Configuration for stdlib written to site-lib-src/stdlib/META
Configuration for bigarray written to site-lib-src/bigarray/META
Configuration for labltk written to site-lib-src/labltk/META
Configuration for camlp4 written to site-lib-src/camlp4/META
Detecting compiler arguments: (extractor built) ok

About the OCAML core installation:
Standard library: /usr/lib/ocaml
Binaries: /usr/bin
Manual pages: /usr/local/man
Multi-threading type: vm
The directory of site-specific packages will be
site-lib: /usr/lib/ocaml/site-lib
The configuration file is written to:
findlib config file: /usr/lib/ocaml/etc/findlib.conf
Software will be installed:
Libraries: in <site-lib>/findlib
Binaries: /usr/bin
Manual pages: /usr/share/man
topfind script: /usr/lib/ocaml
Toolbox: no

Configuration has been written to Makefile.config

You can now do 'make all', and optionally 'make opt', to build ocamlfind.
===

Thanks,

Thomas
--
Thomas Petazzoni
thomas.p...@enix.org

Thomas Petazzoni

unread,
Nov 22, 2005, 6:18:42 AM11/22/05
to Gerd Stolpmann, caml...@inria.fr
Hi again,

Gerd Stolpmann wrote:

> This is a configuration issue. I need the output of the configure script
> of findlib to help you. Obviously, findlib did not detect that
> multi-threading is supported.

Here is the output of the test made by the configure script:

[tpetazzoni@thomas findlib-1.1]$ ocamlc -custom -thread -o
itest-aux/simple unix.cma threads.cma itest-aux/simple_threads.ml
i loop index unused ?

I don't know if it's useful or not.

Thanks !

Thomas
--
Thomas Petazzoni
thomas.p...@enix.org

_______________________________________________

Gerd Stolpmann

unread,
Nov 23, 2005, 4:05:53 AM11/23/05
to Thomas Petazzoni, caml...@inria.fr
Thomas Petazzoni said:
> Hi again,
>
> Gerd Stolpmann wrote:
>
>> This is a configuration issue. I need the output of the configure scri
pt
>> of findlib to help you. Obviously, findlib did not detect that
>> multi-threading is supported.
>
> Here is the output of the test made by the configure script:
>
> [tpetazzoni@thomas findlib-1.1]$ ocamlc -custom -thread -o
> itest-aux/simple unix.cma threads.cma itest-aux/simple_threads.ml
> i loop index unused ?
>
> I don't know if it's useful or not.

Yes, very useful. Obviously, the printed warning prevents findlib from
detecting posix threading. This is a bug in findlib-1.1.

You can work around this by setting the variable OCAML_THREADS=posix in
Makefile.config.

Gerd
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany
ge...@gerd-stolpmann.de http://www.gerd-stolpmann.de
------------------------------------------------------------

Stefano Zacchiroli

unread,
Nov 23, 2005, 4:12:40 AM11/23/05
to caml...@yquem.inria.fr, caml...@inria.fr
On Wed, Nov 23, 2005 at 09:56:37AM +0100, Gerd Stolpmann wrote:
> Yes, very useful. Obviously, the printed warning prevents findlib from
> detecting posix threading. This is a bug in findlib-1.1.
>
> You can work around this by setting the variable OCAML_THREADS=posix in
> Makefile.config.

Is this a fair choice on on all Linux based systems?

/me wondering to set this in the findlib Debian package ...

--
Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. -!-

Thomas Petazzoni

unread,
Nov 23, 2005, 4:12:47 AM11/23/05
to Gerd Stolpmann, caml...@inria.fr
Hi,

Gerd Stolpmann wrote:

> Yes, very useful. Obviously, the printed warning prevents findlib from
> detecting posix threading. This is a bug in findlib-1.1.

Ok, thanks for investigating this problem. Note that the problem was
also present in findlib-1.0.4 (same warning).

> You can work around this by setting the variable OCAML_THREADS=posix in
> Makefile.config.

Ok, I'll try that.

Thanks !

Thomas
--
Thomas Petazzoni
thomas.p...@enix.org

_______________________________________________

Gerd Stolpmann

unread,
Nov 23, 2005, 7:12:51 AM11/23/05
to Stefano Zacchiroli, caml...@yquem.inria.fr, caml...@inria.fr

Stefano Zacchiroli said:
> On Wed, Nov 23, 2005 at 09:56:37AM +0100, Gerd Stolpmann wrote:
>> Yes, very useful. Obviously, the printed warning prevents findlib from
>> detecting posix threading. This is a bug in findlib-1.1.
>>
>> You can work around this by setting the variable OCAML_THREADS=posix
in
>> Makefile.config.
>
> Is this a fair choice on on all Linux based systems?

Yes.

Gerd

>
> /me wondering to set this in the findlib Debian package ...
>
> --
> Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Ital
y
> zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack
/
> If there's any real truth it's that the entire multidimensional infinit
y
> of the Universe is almost certainly being run by a bunch of maniacs. -!
-
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>

------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany
ge...@gerd-stolpmann.de http://www.gerd-stolpmann.de
------------------------------------------------------------

0 new messages