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 discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 3689EBC6B for ; Wed, 27 Jun 2007 15:56:55 +0200 (CEST) Received: from smtp.janestcapital.com (www.janestcapital.com [66.155.124.107]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5RDurcs001109 for ; Wed, 27 Jun 2007 15:56:54 +0200 Received: from [172.25.131.129] [38.96.172.125] by janestcapital.com (SMTPD-9.10) id ACB601CC; Wed, 27 Jun 2007 09:57:10 -0400 Message-ID: <46826CA4.4010308@janestcapital.com> Date: Wed, 27 Jun 2007 09:56:52 -0400 From: Andrew Warshaver User-Agent: Thunderbird 2.0.0.0 (X11/20070505) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: compiling a clib from further away Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-IMAIL-SPAM-VALFROM: (6cb6014a00000c82) X-IMAIL-SPAM-VALREVDNS: (6cb6014a00000c82) X-Miltered: at discorde with ID 46826CA5.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 lib:01 lib:01 stubs:01 sexp:01 stubs:01 usr:01 ocamlmklib:01 const:01 usr:01 exited:01 ocamlc:01 029:98 029:98 02.:98 I am trying to compile a clib (with the eventual hope of it making its way into a compiled ocaml lib). It is working fine if I am in the specific directory; but if I move too far out it fails. My directories are like /../janebase/lib/cephes/ The c files live in cephes. $ cat lib/cephes/libjane_stubs.clib bdtr.o btdtr.o chbevl.o ... $ cat _tags or : include $ cat myocamlbuild.ml open Ocamlbuild_plugin open Command let headers = ["lib/cephes/mconf.h"; "lib/cephes/protos.h"];; dispatch begin function | After_rules -> dep ["compile"; "c"] headers; | _ -> () end $ ocamlbuild lib/cephes/libjane_stubs.a + /usr/local/home/godi310/godi/bin/ocamlmklib -o /cephes/libjane_stubs lib/cephes/bdtr.o lib/cephes/btdtr.o lib/cephes/chbevl.o lib/cephes/chdtr.o lib/cephes/const.o lib/cephes/drand.o lib/cephes/expx2.o lib/cephes/fdtr.o lib/cephes/gamma.o lib/cephes/gdtr.o lib/cephes/igam.o lib/cephes/igami.o lib/cephes/incbet.o lib/cephes/incbi.o lib/cephes/kolmogorov.o lib/cephes/main.o lib/cephes/mtherr.o lib/cephes/nbdtr.o lib/cephes/ndtr.o lib/cephes/ndtri.o lib/cephes/pdtr.o lib/cephes/polevl.o lib/cephes/stdtr.o lib/cephes/unity.o /usr/bin/ld: cannot open output file /cephes/dlllibjane_stubs.so: No such file or directory collect2: ld returned 1 exit status Command exited with code 2. However, when I move one directory closer, $ cd lib [awarshaver@nyc-qws-029 lib]$ cat myocamlbuild.ml open Ocamlbuild_plugin open Command let headers = ["cephes/mconf.h"; "cephes/protos.h"];; dispatch begin function | After_rules -> dep ["compile"; "c"] headers; | _ -> () end [awarshaver@nyc-qws-029 lib]$ ocamlbuild cephes/libjane_stubs.a + /usr/local/home/godi310/godi/bin/ocamlc.opt -c cephes/main.c cephes/main.c: In function ‘main’: cephes/main.c:9: warning: control reaches end of non-void function Finished, 49 targets (0 cached) in 00:00:02. Any ideas? Thanks, Andrew