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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 07E4ABC6B for ; Thu, 28 Jun 2007 23:02:24 +0200 (CEST) Received: from smtp.janestcapital.com (www.janestcapital.com [66.155.124.107]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5SL2MFW003275 for ; Thu, 28 Jun 2007 23:02:23 +0200 Received: from [172.25.131.129] [38.96.172.125] by janestcapital.com (SMTPD-9.10) id A1EE01E0; Thu, 28 Jun 2007 17:02:38 -0400 Message-ID: <468421DD.5040402@janestcapital.com> Date: Thu, 28 Jun 2007 17:02:21 -0400 From: Andrew Warshaver User-Agent: Thunderbird 2.0.0.0 (X11/20070505) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: missing library on .native using ocamlbuild Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IMAIL-SPAM-VALFROM: (21ee008700001c2f) X-IMAIL-SPAM-VALREVDNS: (21ee008700001c2f) X-Miltered: at concorde with ID 468421DE.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; runtime:01 bigarray:01 pcre:01 netstring:01 ocaml:01 utils:01 ocamlfind:01 ocamlfind:01 -package:01 ocaml:01 -thread:01 -linkpkg:01 -thread:01 ocamlc:01 ocamlopt:01 Hello, I'm trying to compile a program called live_query, to native code. After I finally got ocamlbuild to be happy, now when I run it I get a complaint of a missing library. I was under the (apparently false) impression that after one compiles to native code no more linking needs to be done. My error message: $ ./live_query.native ./live_query.native: error while loading shared libraries: liblbm.so.1: cannot open shared object file: No such file or directory I actually do have access to this library; it should not a problem to link it in, but I do not know how to tell ocamlbuild either to look at a specific spot at runtime for this library or to force it linked in at compile time. Please help if you might know why :) Thanks you! Andrew I also include my myocamlbuild.ml: $ cat myocamlbuild.ml open Ocamlbuild_plugin;; open Command;; let packages = "bigarray,pcre,res,netstring";; let janeheaders = ["janebase/lb/cephes/mconf.h"; "janebase/lb/cephes/protos.h"; "janebase/lb/ocaml_utils.h"];; let ocamlfind cmd = S [A "ocamlfind"; A cmd; A "-package"; A packages];; flag ["ocaml"; "compile"] (A"-thread");; flag ["ocaml"; "link"; "program"] (S[A"-linkpkg"; A"-thread"]);; dispatch begin function | After_options -> Options.ocamlc := ocamlfind "c"; Options.ocamlopt := ocamlfind "opt"; Options.ocamldep := ocamlfind "dep"; | After_rules -> ocaml_lib "janebase/lb/jane"; ocaml_lib "lbm/lb/lbm"; flag ["link"; "library"; "ocaml"; "byte"; "use_libjane"] (S[ A"-ccopt"; A"-Ljanebase/lb"; A"-dllpath"; A"janebase/lb"; A"-dllib"; A"-ljane"; A"-ccopt"; A"-ljane"]); flag ["link"; "library"; "ocaml"; "native"; "use_libjane"] (S[A"-cclib"; A"-Ljanebase/lb"; A"-cclib"; A"-ljane"]); flag ["link"; "library"; "ocaml"; "byte"; "use_liblbm"] (S[ A"-ccopt"; A"-Llbm/lb"; A"-ccopt"; A"-llbm_stubs"; A"-dllpath"; A"lbm/lb"; A"-dllib"; A"-llbm_stubs"; A"-cclib"; A"-L/opt/lbm-3.0/Linux-2.4-glibc-2.3-i686/lib"; A"-cclib"; A"-llbm"]); flag ["link"; "library"; "ocaml"; "native"; "use_liblbm"] (S[A"-cclib"; A"-Llbm/lb"; A"-cclib"; A"-llbm_stubs"; A"-cclib"; A"-L/opt/lbm-3.0/Linux-2.4-glibc-2.3-i686/lib"; A"-cclib"; A"-llbm"]); flag ["compile"; "liblbm_headers"] (S[A"-ccopt"; A"-I/opt/lbm-3.0/Linux-2.4-glibc-2.3-i686/include"]); dep ["link"; "ocaml"; "use_libjane"] ["janebase/lb/libjane.a"]; dep ["link"; "ocaml"; "use_liblbm"] ["lbm/lb/liblbm_stubs.a"]; dep ["sexp_pp"] ["janebase/sexp/lib/pa_sexp_conv.cmo"; "type-conv/pa_type_conv.cmo"]; dep ["compile"; "c"; "libjane_headers"] janeheaders; | _ -> () end