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 E6A63BC0A for ; Mon, 14 May 2007 15:46:45 +0200 (CEST) Received: from mailironport.loria.fr (mailironport.loria.fr [152.81.144.100]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4EDkjNF018172 for ; Mon, 14 May 2007 15:46:45 +0200 Received: from zen.loria.fr (HELO localhost.localdomain) ([152.81.6.135]) by mailironport.loria.fr with ESMTP; 14 May 2007 15:46:45 +0200 X-IronPort-AV: i="4.14,531,1170630000"; d="scan'208"; a="13568473:sNHT15752149" Received: from seb by localhost.localdomain with local (Exim 4.67) (envelope-from ) id 1Hnasw-0000k6-GL for caml-list@yquem.inria.fr; Mon, 14 May 2007 15:46:46 +0200 Date: Mon, 14 May 2007 15:46:46 +0200 From: =?iso-8859-1?Q?S=E9bastien?= Hinderer To: caml-list@yquem.inria.fr Subject: Re: Compiling a library with findlib Message-ID: <20070514134646.GA2839@zen> Mail-Followup-To: caml-list@yquem.inria.fr References: <20070514100005.459F6BC70@yquem.inria.fr> <002d01c79615$ea3d3d30$6a7ba8c0@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <002d01c79615$ea3d3d30$6a7ba8c0@treble> X-Miltered: at concorde with ID 46486845.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ens-lyon:01 findlib:01 lib:01 lib:01 bytecode:01 stub:01 cmo:01 stub:01 ocamlopt:01 cmxa:01 makefiles:01 ocamlmklib:01 ocamlmklib:01 -verbose:01 ocamlc:01 Dear David, dear all, > > 1. Is it necessary to compile/install the lib;a and lib.so files ? > Yes they are both needed: > lib.so is the bytecode stub library --- so needed for any .cmo file that > uses the C module > lib.a is the native stub library --- linked in when you compile with > ocamlopt for the same purpose Okay, thanks a lot for this clarification. > > 2. How can these files be produced (in addition to the .cma and .cmxa > > files) on a system where ocamlfindlib is installed ? > I'm a Windows native port user so detest Makefiles that use ocamlmklib > because the Windows port doesn't include it! Too bad :) > The automation provided by ocamlmklib is IMHO pretty simplistic (see #18.10 > in the manual). ocamlmklib -verbose will tell you the commands it uses for > your project - all the ocamlc/ocamlopt commands can then be prefixed with > ocamlfind to import any packages you may need. To me, the work done by ocamlmklib is not _that_ simplistic. Indeed, the use of -verbose reveals that is calls commands like ar and ranlib, which I'd prefer not tocall directly in the Makefile. Also, I'd rather avoid depending on OCamlMakefile, to try to minimize the dependencies and keep the compilationprocess assimple as possible. > When doing ocamlfind install, you just need to include lib.so and lib.a with > the files (r17.html#OCAMLFIND.INSTALL of the findlib docs explains how stub > libraries are dealt with). I will have a look to this section, thanks ! Cheers, Sébastien.