From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p75ANs1w015583 for ; Fri, 5 Aug 2011 12:23:54 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuYEAPDDO07V1xdi/2dsb2JhbABChEeUFIZyhzpQf4FAAQEBAQIBEgIPBFcLCQILNwICIhIBBQEcBhMih0sCpBAKi3GRVIU2gRAEkwGMTzyDXg X-IronPort-AV: E=Sophos;i="4.67,322,1309730400"; d="scan'208";a="115047675" Received: from gide-lanoue-23-98.cnt.nerim.net (HELO khaki.gide.net) ([213.215.23.98]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 05 Aug 2011 12:23:48 +0200 Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) (authenticated bits=0) by khaki.gide.net (8.13.8/8.13.8) with ESMTP id p75ANkfB030464 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 5 Aug 2011 12:23:48 +0200 Received: by qwc9 with SMTP id 9so2631071qwc.27 for ; Fri, 05 Aug 2011 03:23:46 -0700 (PDT) Received: by 10.229.117.232 with SMTP id s40mr517517qcq.252.1312539826150; Fri, 05 Aug 2011 03:23:46 -0700 (PDT) MIME-Version: 1.0 Reply-To: remi.dewitte@gide.net Received: by 10.229.135.11 with HTTP; Fri, 5 Aug 2011 03:23:26 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?Q?R=C3=A9mi_Dewitte?= Date: Fri, 5 Aug 2011 12:23:26 +0200 Message-ID: To: caml-list Content-Type: multipart/alternative; boundary=000e0cd5cc48175daf04a9bf7ee0 Subject: [Caml-list] Re: ocamlbuild issue --000e0cd5cc48175daf04a9bf7ee0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi again, I have created a myocamlbuild.ml which fixes the issue but I'm still interested to get your advice. open Ocamlbuild_plugin open Command let _ =3D dispatch begin function | After_rules -> flag ["ocaml"; "thread"; "compile"] (S[A "-thread"]); flag ["ocaml"; "thread"; "link"] (S[A "-thread"]); | _ -> () end R=C3=A9mi 2011/8/5 R=C3=A9mi Dewitte > Hello, > > I have an issue with ocamlbuild. > > I type : ocamlbuild -use-ocamlfind sdit.native > I get the following error : > ocamlfind: Error from package `postgresql': This library requires > multi-threading support > Command exited with code 2. > > I have checked this : > $ ocamlbuild -documentation | grep thread > flag {. byte, link, ocaml, program, thread .} "threads.cma -thread" > flag {. link, native, ocaml, program, thread .} "threads.cmxa -thread" > flag {. doc, ocaml, thread .} "-I +threads" > flag {. compile, ocaml, thread .} "-thread" > > I have checked _build/_log also : tag thread is active > # Target: sdit.native, tags: { dont_link_with, extension:native, > file:sdit.native, link, native, ocaml, package(extlib), package(gsl), > package(postgresql), package(pxp), package(str), program, quiet, thread, > traverse, use_menhir } > /usr/bin/ocamlfind ocamlopt -linkpkg -package extlib -package gsl -package > postgresql -package pxp -package str dependent.cmx sdit.cmx -o sdit.native > > I think there is a bug with -use-ocamlfind where -thread is not appended = to > the command. > > I use ocaml 3.12.0 > > What do you think ? > > Thanks, > R=C3=A9mi > --000e0cd5cc48175daf04a9bf7ee0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi again,

I have created a myocam= lbuild.ml which fixes the issue but I'm still interested to get you= r advice.

open Ocamlbuild_plugin
open Command

le= t _ =3D dispatch begin function
=C2=A0=C2=A0 | After_ru= les ->
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 flag ["ocaml"; "thread"; "compile"]=C2= =A0 (S[A "-thread"]);
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 flag ["ocaml"; "thread"; "link&quo= t;]=C2=A0=C2=A0=C2=A0=C2=A0 (S[A "-thread"]);
=C2=A0=C2=A0 | _ -> ()
end

R=C3= =A9mi

2011/8/5 R=C3=A9mi Dewitte <remi@gide.net>=
Hello,

I have an issue with ocamlbuild.

I type : ocamlbuild -use-ocamlfind sdit.native
I = get the following error :
ocamlfind: Error from package `postgresql'= : This library requires multi-threading support
Command exited with code 2.

I have checked this :
$ ocamlbuild -documentati= on | grep thread
flag {. byte, link, ocaml= , program, thread .} "threads.cma -thread"
flag {. link, native, oca= ml, program, thread .} "threads.cmxa -thread"
flag {. doc, ocaml, threa= d .} "-I +threads"
flag {. compile, ocaml, t= hread .} "-thread"

I have checked _build/_log also = : tag thread is active
# Target: sdit.native, tags: { dont_link_with, extension:native, file:sdit= .native, link, native, ocaml, package(extlib), package(gsl), package(postgr= esql), package(pxp), package(str), program, quiet, thread, traverse, use_me= nhir }
/usr/bin/ocamlfind ocamlo= pt -linkpkg -package extlib -package gsl -package postgresql -package pxp -= package str dependent.cmx sdit.cmx -o sdit.native

I think the= re is a bug with -use-ocamlfind where -thread is not appended to the comman= d.

I use ocaml 3.12.0

What do you think ?

Thanks,
R=C3=A9mi

--000e0cd5cc48175daf04a9bf7ee0--