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=1.0 required=5.0 tests=AWL,HTML_MESSAGE,SPF_NEUTRAL 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 3A01ABC69 for ; Sun, 17 Jun 2007 14:36:33 +0200 (CEST) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5HCaWeV013245 for ; Sun, 17 Jun 2007 14:36:32 +0200 Received: by py-out-1112.google.com with SMTP id u52so2512129pyb for ; Sun, 17 Jun 2007 05:36:32 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=mAckkOP9fwLtfhOIGgEgl0JO/ZNBPdxtptOWrpq5h+KZE5DosZywgATH8FrFaYELHBLDOfpAcQj7Fpum2N0OdAiWghjYCbIez9hXKzZkyk4nnTiNYPwhtn4aCS3bAg079pW7eSf+AP7HN7IIXzOhEawGwJLrJHhztCMARShVi+s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=HXoQuzlGy0Xn7h/NFKu36ryMiRByD/zGNup2dN9kT5lWfIe3hhXV3mgj2cknBPBrXRozreeps7ZHTxmYBVRvac5E64PCiLs51VLCv1MqZcMIufM+23PV7qVMk31M5Akg6qzUbj6n4h2i/gTKZZxG0caMHITH9GfJ+e/XdEV99ks= Received: by 10.35.19.6 with SMTP id w6mr8732377pyi.1182083791389; Sun, 17 Jun 2007 05:36:31 -0700 (PDT) Received: by 10.35.17.20 with HTTP; Sun, 17 Jun 2007 05:36:31 -0700 (PDT) Message-ID: <6579f8680706170536g534c9577qa5fb73384ce7eb27@mail.gmail.com> Date: Sun, 17 Jun 2007 08:36:31 -0400 From: "Sean McLaughlin" Reply-To: seanmcl@cmu.edu To: "Caml List" Subject: ocamlbuild with pack MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_65406_12325781.1182083791363" X-j-chkmail-Score: MSGID : 46752AD0.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46752AD0.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; -pack:01 bytecode:01 lib:01 bytecode:01 lib:01 byte:01 ocamldep:01 ocamlc:01 cmo:01 ocamlc:01 -pack:01 cmo:01 byte:01 ocamlopt:01 cmx:01 ------=_Part_65406_12325781.1182083791363 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello I've run into a problem with ocamlbuild and -pack. It will build bytecode packages, but not native ones. E.g., I have 2 files: $ cat a.ml : type t = int $ cat lib.mlpack: A Then the bytecode package works $ ocamlbuild -classic-display lib.byte /sw/bin/ocamldep.opt -modules a.ml > a.ml.depends /sw/bin/ocamlc.opt -c -o a.cmo a.ml /sw/bin/ocamlc.opt -pack a.cmo -o lib.cmo /sw/bin/ocamlc.opt lib.cmo -o lib.byte but not the native code ~/tmp/tmp2 $ ocamlbuild -classic-display lib.native /sw/bin/ocamlopt.opt -c -o a.cmx a.ml touch lib.mli ; if /sw/bin/ocamlopt.opt -pack a.cmx -o lib.cmx ; then rm -f lib.mli ; else rm -f lib.mli ; exit 1; fi + touch lib.mli ; if /sw/bin/ocamlopt.opt -pack a.cmx -o lib.cmx ; then rm -f lib.mli ; else rm -f lib.mli ; exit 1; fi File a.cmx was not compiled with the `-for-pack Lib' option Command exited with code 1. What am I doing wrong? Thanks for your time, Sean ------=_Part_65406_12325781.1182083791363 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello

I've run into a problem with ocamlbuild and -pack.
It will build bytecode packages, but not native ones.
E.g.,

I have 2 files:

$ cat a.ml :

type t = int

$ cat lib.mlpack:

A

Then the bytecode package works

$ ocamlbuild -classic-display lib.byte
/sw/bin/ocamldep.opt -modules a.ml > a.ml.depends
/sw/bin/ocamlc.opt -c -o a.cmo a.ml
/sw/bin/ocamlc.opt -pack a.cmo -o lib.cmo
/sw/bin/ocamlc.opt lib.cmo -o lib.byte

but not the native code

~/tmp/tmp2
$ ocamlbuild -classic-display lib.native
/sw/bin/ocamlopt.opt -c -o a.cmx a.ml
touch lib.mli  ; if  /sw/bin/ocamlopt.opt -pack a.cmx -o lib.cmx  ; then  rm -f lib.mli  ; else  rm -f lib.mli  ; exit 1; fi
+ touch lib.mli   ; if  /sw/bin/ocamlopt.opt -pack a.cmx -o lib.cmx  ; then  rm -f lib.mli  ; else  rm -f lib.mli  ; exit 1; fi
File a.cmx was not compiled with the `-for-pack Lib' option
Command exited with code 1.


What am I doing wrong?

Thanks for your time,

Sean
------=_Part_65406_12325781.1182083791363--