From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id C1E9ABC69 for ; Mon, 30 Jul 2007 07:40:56 +0200 (CEST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l6U5eur2021943 for ; Mon, 30 Jul 2007 07:40:56 +0200 Received: by nf-out-0910.google.com with SMTP id g13so178753nfb for ; Sun, 29 Jul 2007 22:40:56 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:date:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:from; b=GNK67qSEqtttC0ILeouUj7hLPaaRaG1r4FcH3hfJF18W7GHFcTBfpEl0Xgb+nkyIpZOyNdIcpPY+XXeH+rLNASG5vrNchAuTqVBLp4jILPRiiTeZl3drYVoCEmgklc58IKEMUd4nIhagwNBQzW9dVADlgbRwPaPCPwDDfWBRvu8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:from; b=tpPIeC2nphKyoL2R9JEyxTpPPoDYTS8lyYfXZw3WZCW3yO/9W8Y20kVT3u4O5YCI5STsYpW07ICgt7wH0cgWQ1b/qshuBez3IliJ12dqpt+ZF/Kiqkmwr1fDBf4VAXrnbfI3JS2TMcq/3y70GPIjJtJ1L5q9lctA4G5LTsUAhcs= Received: by 10.86.89.4 with SMTP id m4mr3627375fgb.1185774056132; Sun, 29 Jul 2007 22:40:56 -0700 (PDT) Received: from localhost ( [86.211.2.178]) by mx.google.com with ESMTPS id i5sm12470484mue.2007.07.29.22.40.51 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 29 Jul 2007 22:40:53 -0700 (PDT) Received: by localhost (sSMTP sendmail emulation); Mon, 30 Jul 2007 07:40:48 +0200 Date: Mon, 30 Jul 2007 07:40:48 +0200 To: Kaspar Rohrer Cc: caml-list@inria.fr Subject: Re: [Caml-list] Native multithreaded LablGTK2? Message-ID: <20070730054047.GA11678@jiyu.gnu> Mail-Followup-To: Julien Moutinho , Kaspar Rohrer , caml-list@inria.fr References: <950BC328-B571-4736-A779-8E3EE9CF6F3E@student.ethz.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <950BC328-B571-4736-A779-8E3EE9CF6F3E@student.ethz.ch> User-Agent: Mutt/1.5.16 (2007-06-11) From: Julien Moutinho X-j-chkmail-Score: MSGID : 46AD79E8.001 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46AD79E8.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; lablgtk:01 0200,:01 ocaml:01 lablgtk:01 lablgl:01 ocaml:01 lib:01 gtkthread:01 cmx:01 lib:01 gtkthread:01 cmx:01 dependences:01 byte:01 ocamlc:01 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.