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.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 2B55EBBAF for ; Sat, 22 Nov 2008 08:41:04 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AusAAJxGJ0lRZ90vkWdsb2JhbACNMYYsAQEBAQkLCgcRA8IDgnw X-IronPort-AV: E=Sophos;i="4.33,649,1220220000"; d="scan'208";a="20248732" Received: from mtaout01-winn.ispmail.ntl.com ([81.103.221.47]) by mail1-smtp-roc.national.inria.fr with ESMTP; 22 Nov 2008 08:41:03 +0100 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20081122074059.PPQR1869.mtaout01-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com>; Sat, 22 Nov 2008 07:40:59 +0000 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20081122074056.LZZL2093.aamtaout03-winn.ispmail.ntl.com@romulus.metastack.com>; Sat, 22 Nov 2008 07:40:56 +0000 Received: from Countertenor ([172.16.0.6]) (authenticated bits=0) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id mAM7enEb029217 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 22 Nov 2008 07:40:50 GMT From: "David Allsopp" To: "'Jon Harrop'" , References: <755814.6350.qm@web111514.mail.gq1.yahoo.com> <200811220119.38157.jon@ffconsultancy.com> In-Reply-To: <200811220119.38157.jon@ffconsultancy.com> Subject: RE: [Caml-list] Native dynlink on 3.11: a request for packagers Date: Sat, 22 Nov 2008 07:40:41 -0000 Organization: MetaStack Solutions Ltd. Message-ID: <00d301c94c75$9f676d90$de3648b0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AclMN6o/N3Z6Qku8Riu7H3qEg1jYewAPEp9g Content-Language: en-gb X-Scanned-By: MIMEDefang 2.64 on 81.102.132.74 X-Cloudmark-Analysis: v=1.0 c=1 a=vRE9qKJa3JYA:10 a=PuDxEwXTKwsA:10 a=hylJ7xBjcqAeiXvuBmYA:9 a=62U1zEKrDguVflmC814x0iaQx0EA:4 a=LY0hPdMaydYA:10 X-Spam: no; 0.00; dynlink:01 packagers:01 ocamlfind:01 ocaml:01 findlib:01 ocamlnet:01 pxp:01 cmxa:01 re-writing:01 dlopen:01 ocamlopt:01 cmx:01 cmxa:01 dynlink:01 afaik:01 On 22 November 2008 01:20 Jon Harrop wrote: > On Friday 21 November 2008 23:45:34 Dario Teixeira wrote: > > Hi, > > > > > Does ocamlfind support any of this? Since I'm now also > > > cross-compiling OCaml, I've certainly come to appreciate > > > findlib more than ever. > > > > Indeed it does. The current version of Ocsigen already > > makes use of this feature. However, because very few > > (none, actually, other than Ocsigen's) packages currently > > ship with cmxs files, an Ocsigen user who wants to play > > with native code is forced to manually generate them. > > (What impelled me to write the request was precisely > > having just gone through the process of producing the > > cmxs for a bunch of Ocamlnet and PXP libraries...) >=20 > This begs the question: what is the advantage of a .cmxa over a .cmxs, > and > what are the downsides of linking everything dynamically? That's reducible to the standard debate of static vs dynamic linking in = any language, surely? The only "impact" on performance presumably is the = re-writing of the symbol tables which flexlink/dlopen does as the .cmxs = file is loaded but that must be negligible. However, isn't ocamlopt able = to do some cross-module optimisation (which is why .cmx files are = usually shipped as well as .cmxa) - this presumably isn't possible when = linking dynamically... Short-term, native dynlink doesn't work on all platforms (AFAIK?) so = .cmxa is not dead, whatever your linking preference. David