From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 37496BBAF for ; Thu, 28 Oct 2010 13:41:35 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvMAACr+yEyGnQCBk2dsb2JhbACBRJIMjXgVAQEBAQkJCgkRAx+/AIVIBA X-IronPort-AV: E=Sophos;i="4.58,251,1286143200"; d="scan'208,217";a="77302997" Received: from shiva.jussieu.fr ([134.157.0.129]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 28 Oct 2010 13:41:34 +0200 Received: from hydrogene.pps.jussieu.fr (hydrogene.pps.jussieu.fr [134.157.168.1]) by shiva.jussieu.fr (8.14.4/jtpda-5.4) with ESMTP id o9SBfWOe005479 ; Thu, 28 Oct 2010 13:41:33 +0200 (CEST) X-Ids:168 Received: from magnesium.localnet (balat@magnesium.pps.jussieu.fr [134.157.168.12]) by hydrogene.pps.jussieu.fr (8.13.4/jtpda-5.4) with ESMTP id o9SBfVai018696 ; Thu, 28 Oct 2010 13:41:31 +0200 From: Vincent Balat Organization: Laboratoire PPS - CNRS - =?utf-8?q?Universit=C3=A9_Paris?= Diderot To: caml-list@inria.fr Subject: Re: [Caml-list] Howto link cmas with Ocamlbuild Date: Thu, 28 Oct 2010 13:41:29 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.32-2-amd64; KDE/4.5.1; x86_64; ; ) Cc: "Till Crueger" References: In-Reply-To: X-KMail-Markup: true MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="Boundary-01=_qFWyM8LEeU46ari" Content-Transfer-Encoding: 7bit Message-Id: <201010281341.30325.vincent.balat@univ-paris-diderot.fr> X-Miltered: at jchkmail.jussieu.fr with ID 4CC9616C.006 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Enveloppe: 4CC9616C.006/134.157.168.1/hydrogene.pps.jussieu.fr/hydrogene.pps.jussieu.fr/ X-Spam: no; 0.00; howto:01 findlib:01 dependencies:01 dependencies:01 compilation:01 findlib:01 compilation:01 white-space:98 compile:01 compile:01 caml-list:01 cma:01 cma:01 linking:02 linking:02 --Boundary-01=_qFWyM8LEeU46ari Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Hi, It is not a good idea to include batteries and sexplib in your cma. If your cma is a findlib package (i.e. has a META file with the right dependencies inside), Ocsigen server will automatically load the dependencies if you write or in Ocsigen server's configuration file. If your package does not have a META file, you need to load batteries and sexplib manually: Vincent > Hi, > > I am working on a small project that is going to include a dynamic > webserver using Ocsigen and Eliom. I am using Ocamlbuild for the > compilation. The project is also going to use Batteries and Sexplib. This > means I need to include Sexplib and Batteries within the .cma file for > Ocsigen to find the libraries. However when I use the Myocamlbuild plugin > for Batteries the rules for linking cmas wont use linkpkg flag. Right now > I compile the full project using ocamlbuild and then I have to repeat the > last step manually. Is there a better way, to get ocamlbuild to include > the necessary libraries in the .cma? > > Thank you, > Till --Boundary-01=_qFWyM8LEeU46ari Content-Type: text/html; charset="iso-8859-15" Content-Transfer-Encoding: 7bit

Hi,

It is not a good idea to include batteries and sexplib in your cma.

If your cma is a findlib package (i.e. has a META file with the right dependencies inside), Ocsigen server will automatically load the dependencies if you write

<library findlib-package="yourpackage"/>

or

<eliom findlib-package="yourpackage" />

in Ocsigen server's configuration file.

If your package does not have a META file, you need to load batteries and sexplib manually:

<library findlib-package="batteries"/>

<library findlib-package="sexplib"/>

Vincent

> Hi,

>

> I am working on a small project that is going to include a dynamic

> webserver using Ocsigen and Eliom. I am using Ocamlbuild for the

> compilation. The project is also going to use Batteries and Sexplib. This

> means I need to include Sexplib and Batteries within the .cma file for

> Ocsigen to find the libraries. However when I use the Myocamlbuild plugin

> for Batteries the rules for linking cmas wont use linkpkg flag. Right now

> I compile the full project using ocamlbuild and then I have to repeat the

> last step manually. Is there a better way, to get ocamlbuild to include

> the necessary libraries in the .cma?

>

> Thank you,

> Till

--Boundary-01=_qFWyM8LEeU46ari--