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.1 required=5.0 tests=AWL,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 4270ABC69 for ; Mon, 25 Jun 2007 16:19:59 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.238]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5PEJwgw000615 for ; Mon, 25 Jun 2007 16:19:58 +0200 Received: by nz-out-0506.google.com with SMTP id s18so1243013nze for ; Mon, 25 Jun 2007 07:19:57 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZD1pMu6Cu86dMigCd9cM3yRf3f6IUPlwmbH+qN6D5Ti0xghQE42wBgWSnn1jXqrygDC9nNTw5DkYngqq+qiMNQI46JWkb3bITQO2RowvQ11g14bqn9EuBIbx1vmMELM+RsqpMBuMD0SlJg2mnNENMi+KqtA5kB0okAqpP/XbZ3g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=D894/PCh8RmKAhrglslAdMmB8sbgTaBTSjfghZjB1UjiInQqFSUQlMMiO468CLHEUj7wqkaWqOacPhAohmyxN3rLfn35IaF2McvxgdhoLMpBoXW+B54KrrdDIZBWjMMk10DsI4+GmIC/44Cr279vOj2fwXTcIuaWNQ1+nW3dH7E= Received: by 10.115.72.1 with SMTP id z1mr5471734wak.1182781197473; Mon, 25 Jun 2007 07:19:57 -0700 (PDT) Received: by 10.114.181.8 with HTTP; Mon, 25 Jun 2007 07:19:57 -0700 (PDT) Message-ID: Date: Mon, 25 Jun 2007 16:19:57 +0200 From: "Nicolas Pouillard" To: "Martin Jambon" Subject: Re: [Caml-list] camlp4 -I and shared libs Cc: "Jake Donham" , caml-list@inria.fr In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-j-chkmail-Score: MSGID : 467FCF0E.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 467FCF0E.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 libs:01 ens-lyon:01 camlp:01 ocamlc:01 ocamlfind:01 ocamlfind:01 ocamlc:01 pcre:01 cmo:01 -package:01 pcre:01 -linkpkg:01 -package:01 -linkpkg:01 On 6/25/07, Martin Jambon wrote: > On Sun, 24 Jun 2007, Jake Donham wrote: > > > Hi, > > > > Should the -I flag to camlp4 add the directory to the shared library > > search path, as it does with ocamlc? > > > > I was trying to use Micmatch (very nice by the way) with ocamlfind, as > > follows: > > (thanks) > > > ocamlfind ocamlc -syntax camlp4o -ppopt pa_micmatch_pcre.cmo > > -package micmatch_pcre [...] > > It seems you forgot either -c or -linkpkg. > The following should work. > > ocamlfind ocamlc -c -syntax camlp4o -package micmatch_pcre toto.ml > ocamlfind ocamlc -o toto -syntax camlp4o -package micmatch_pcre -linkpkg toto.ml > > > > but I get an error that it cannot find dllpcre.so. What is happening > > is that ocamlfind has pcre-ocaml as a dependency of micmatch_pcre > > (even though this is needed only at runtime, not at preprocessing > > time), so it adds pcre.cma and -I $SITE_LIB/pcre to the camlp4 command > > line. Now pcre.cma needs dllpcre.so, which is in $SITE_LIB/pcre, but > > this path is not added to the shared library search path. (It's easy > > to work around this by constructing a camlp4 call directly, since > > pcre.cma is not needed.) > > > > This is with 3.09.3 but a glance at the 3.10.0 source suggests it has > > the same behavior. It's a one-line change (call Dll.add_path after > > Dynlink.init in camlp4/odyl/odyl_main.ml or > > camlp4/CamlP4/Struct/DynLoader.ml) to fix it. > > Note that the current version of micmatch does not work under ocaml/camlp4 > 3.10.0. I recommend using 3.09.3 until the new camlp4 is more mature. No major change is planned for Camlp4. I think that's reasonable to start translating extensions. -- Nicolas Pouillard