From: Julien Moutinho <julien.moutinho@gmail.com>
To: Kaspar Rohrer <krohrer@student.ethz.ch>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Native multithreaded LablGTK2?
Date: Mon, 30 Jul 2007 07:40:48 +0200 [thread overview]
Message-ID: <20070730054047.GA11678@jiyu.gnu> (raw)
In-Reply-To: <950BC328-B571-4736-A779-8E3EE9CF6F3E@student.ethz.ch>
On Sun, Jul 29, 2007 at 09:16:08PM +0200, Kaspar Rohrer wrote:
> I'm trying to build a multithreaded application (my own, written from
> scratch) using Ocaml, Lablgtk2, and Lablgl. I use Omake as the build
> system, and the project consists of several different Ocaml libraries (my
> own as well as 3rd party).
>
> Here's the error I get when I try to compile the application:
>
> Files /Users/krohrer/godi/lib/ocaml/pkg-lib/lablgtk2/gtkThread.cmx
> and /Users/krohrer/godi/lib/ocaml/pkg-lib/lablgtk2/gtkThread.cmx
> both define a module named GtkThread
Sounds like you end up with a doubloon amongst the dependences.
> This only happens when I try to compile a native code application, as
> opposed to byte code.
That's because ocamlc removes doubloons for you, while ocamlopt does not.
$ echo "let f () = print_endline \"Namaste\"" > dep.ml
$ ocamlc -c dep.ml
$ ocamlopt -c dep.ml
$ echo "Dep.f ()" > file.ml
$ ocamlc -o file dep.cmo dep.cmo file.ml && ./file
Namaste
$ ocamlopt -o file.opt dep.cmx dep.cmx file.ml && ./file.opt
Files dep.cmx and dep.cmx both define a module named Dep
> Now, my knowledge of the ocaml library system is somewhat limited. So I
> thought I'd ask here, in the hope that if this is really a
> lablgtk2/godi/omake error, somebody will tell me.
> Any ideas on this one?
Check the META.lablgtk2 file:
$ ocamlfind query lablgtk2 -format "%A" -predicates native,mt
lablgtk.cmxa gtkThread.cmx
If you get this, lablgtk2 is not likely to be guilty.
For I have never used neither Omake nor Godi, cannot help more.
Nonetheless, if I were you I would dive into Omake...
> PS: Currently the application is single threaded, but due to output
> redirection using pipes, I get the occassional freeze. (Pipe gets flooded!)
Weird.
next prev parent reply other threads:[~2007-07-30 5:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-29 19:16 Kaspar Rohrer
2007-07-30 5:40 ` Julien Moutinho [this message]
2007-07-30 8:01 ` [Caml-list] " Kaspar Rohrer
2007-07-30 11:57 ` Julien Moutinho
2007-07-30 13:22 ` Kaspar Rohrer
2007-07-30 8:22 ` Kaspar Rohrer
2007-07-30 10:01 ` Julien Moutinho
2007-07-30 11:31 ` Kaspar Rohrer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070730054047.GA11678@jiyu.gnu \
--to=julien.moutinho@gmail.com \
--cc=caml-list@inria.fr \
--cc=krohrer@student.ethz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox