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 EFC17BC69 for ; Mon, 25 Jun 2007 05:33:21 +0200 (CEST) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.177]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5P3XKlF025449 for ; Mon, 25 Jun 2007 05:33:21 +0200 Received: by wa-out-1112.google.com with SMTP id m34so1948299wag for ; Sun, 24 Jun 2007 20:33:20 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=Jlv2bEGeCe6cN8/QeV3XqCqF2qZCISUTNrV8+wpMXL9oPKdQ+6xTL+7P7e1IVpFuwjHOP9j67nQs03XiPA8GA9UQQY3apVd4T5imvb2djPTCHhafnX1wHHhTbNFY4iq5OpT/L+e6sPtGTk7l6Ol8Y6hfWycbm9QPlOUiBEHr+VQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=m/ZZaJKfm2PkM3OO+W2QoU8uA/p461+aIcdLY7Msj6KoNRmmM8X8wfNYmppnfslEhFdfZvFoCx7fxrmv1ViwFoTT9RJ7UfZ19BdozL6/O7SyplY0Lj9Bt3UDFT0aaMgvJGDaBtA5VSTgvXuf2yX4gLMS99HOiiqmVHIz4Lj5kvI= Received: by 10.114.134.1 with SMTP id h1mr5049092wad.1182742400144; Sun, 24 Jun 2007 20:33:20 -0700 (PDT) Received: by 10.115.76.7 with HTTP; Sun, 24 Jun 2007 20:33:20 -0700 (PDT) Message-ID: Date: Sun, 24 Jun 2007 23:33:20 -0400 From: "Jake Donham" Sender: jake.donham@gmail.com To: caml-list@inria.fr Subject: camlp4 -I and shared libs MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 7b461c3b1ed4d266 X-Miltered: at discorde with ID 467F3780.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 libs:01 camlp:01 ocamlc:01 ocamlfind:01 ocamlfind:01 ocamlc:01 pcre:01 cmo:01 -package:01 pcre:01 dllpcre:01 pcre-ocaml:01 runtime:01 lib:01 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: ocamlfind ocamlc -syntax camlp4o -ppopt pa_micmatch_pcre.cmo -package micmatch_pcre [...] 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. Thanks, Jake