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 5AA6CBC6C for ; Wed, 27 Jun 2007 16:08:50 +0200 (CEST) Received: from smtp.janestcapital.com (janestcapital.com [66.155.124.107]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5RE8m4F004234 for ; Wed, 27 Jun 2007 16:08:49 +0200 Received: from [172.25.131.129] [38.96.172.125] by janestcapital.com (SMTPD-9.10) id AF81023C; Wed, 27 Jun 2007 10:09:05 -0400 Message-ID: <46826F6F.6060009@janestcapital.com> Date: Wed, 27 Jun 2007 10:08:47 -0400 From: Andrew Warshaver User-Agent: Thunderbird 2.0.0.0 (X11/20070505) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] compiling a clib from further away References: <46826CA4.4010308@janestcapital.com> In-Reply-To: <46826CA4.4010308@janestcapital.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-IMAIL-SPAM-VALFROM: (6f81008d00000cf0) X-IMAIL-SPAM-VALREVDNS: (6f81008d00000cf0) X-Miltered: at discorde with ID 46826F71.000 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 bug:01 const:01 usr:01 exited:01 ocamlc:01 beginner's:01 ocaml:01 Andrew Warshaver wrote: > 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 by the way, obviously the culprit is in this -o, it should have lib/, is this a ocamlbuild bug? > 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 > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs