From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 0907381792 for ; Fri, 21 Jun 2013 00:03:36 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.214.43; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.214.43 as permitted sender) identity=mailfrom; client-ip=209.85.214.43; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-bk0-f43.google.com) identity=helo; client-ip=209.85.214.43; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-bk0-f43.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApgBADh7w1HRVdYrk2dsb2JhbABBGoM6Sa0Mkip4CBYOAQEBAQcLCwkUBCSCIwEBBUABGxILAQMMBgULDQ0hIgERAQUBChIGExKHaQEDDwwznkWMTYJ/hEYKGScDCliHdAEFDI89B4NhA5dDgSmONhYpgn6BOTo X-IPAS-Result: ApgBADh7w1HRVdYrk2dsb2JhbABBGoM6Sa0Mkip4CBYOAQEBAQcLCwkUBCSCIwEBBUABGxILAQMMBgULDQ0hIgERAQUBChIGExKHaQEDDwwznkWMTYJ/hEYKGScDCliHdAEFDI89B4NhA5dDgSmONhYpgn6BOTo X-IronPort-AV: E=Sophos;i="4.87,907,1363129200"; d="scan'208";a="18470773" Received: from mail-bk0-f43.google.com ([209.85.214.43]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 21 Jun 2013 00:03:35 +0200 Received: by mail-bk0-f43.google.com with SMTP id jm2so3139167bkc.16 for ; Thu, 20 Jun 2013 15:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=AILac/Ws2dZP9vVqtxBvJG+IUstnzZOPvAXccJTDBsU=; b=XX/G+/wpbZ5tF0Bswcxf1hDsm2KSfLES7AH0I5HyHa+zG83l695D8aSlZ+XHbC7gQZ pgREaDEDx5o/zFSJIbQKE04BZImHYzKDkTc77cHSlTqwOsiDood26QFTjMnRa72akJ18 wwdb58246SJC8IhWLVW4bTUYnofmkt79R0DmQI8r5RJAal7NiXB/sEdea2PQ+hcIwXIN PbV13nxI0v+2zAgo5c3u5NTW2khz4xF9MlFoXyDHLYbbmRIVHM/wwXBcYtAZHRriAg4k iiJl4rWkwbQp5ok99iJ9a82+CSUpZM58fPMvXlxY25RnMu9pRQmRKx7orwDNJPnS/DSJ vbyQ== X-Received: by 10.205.13.136 with SMTP id pm8mr1429714bkb.120.1371765814263; Thu, 20 Jun 2013 15:03:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.205.16.10 with HTTP; Thu, 20 Jun 2013 15:02:54 -0700 (PDT) In-Reply-To: <51C36089.5060109@sticksel.info> References: <6ea38e78-0086-4e12-a168-2f0953acf0ee@googlegroups.com> <51C36089.5060109@sticksel.info> From: Gabriel Scherer Date: Fri, 21 Jun 2013 00:02:54 +0200 Message-ID: To: Christoph Sticksel Cc: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] ocamlbuild: problem building -for-pack targets with .p.native extension This is a known bug due to the fact that the compiler looks for module of the exact name "foo.cmx", while ocamlbuild produces "foo.p.cmx". http://caml.inria.fr/mantis/view.php?id=4574 I suppose you can workaround this issue by using the usual ".native" target instead of ".p.native", adding (-tag profile) to the ocamlbuild invocation line (or "true: profile" in your tags). On Thu, Jun 20, 2013 at 10:05 PM, Christoph Sticksel wrote: > Hi all, > > I have an ocamlbuild project where I keep some modules in a package and that > compiles all fine as .native or .byte. However, once I want to compile it to > native profiling .p.native, it fails with > > | Error: File SExpr/stringSExpr.p.cmx was compiled without access > | to the .cmx file for module SExprBase, > | which was produced by `ocamlopt -for-pack'. > | Please recompile SExpr/stringSExpr.p.cmx with the correct `-I' > option > | so that SExprBase.cmx is found. > > although ocamlbuild does add -I SExpr to the compile commands. > > The only thing I could find is a six year old question on fa.caml, which > describes exactly the problem I am facing and includes a minimal example > that still fails for me, see below. > > Can anybody shed some light on that? Is this issue still open? > > Thanks, > Christoph > > > On Monday, November 19, 2007 3:59:52 PM UTC-6, rvanmelle wrote: > > We been happily (mostly) using ocamlbuild for our project, but we've > been running into this puzzling problem building .p.native targets > when the modules are packed using the -for-pack tag. > > I boiled it down to this relatively simple test case which exhibits > the problem. I was hoping that somebody might have seen this problem > and/or have a workaround or fix... or simply point out the silly > mistake we are making. The complete set of files for this simple > project are shown below, along with sample usage/output exhibiting the > problem: > > **************** > > foo/foo.ml : > let _ = > let x = Bar.bar () in > Printf.printf "%g\n%!" (x +. 3.0) > > foo/bar.ml : > let bar () = 5. > > foo/_tags: > : for-pack(Pho) > : for-pack(Pho) > > foo/pho.mlpack: > Foo > Bar > > $ ocamlbuild foo/foo.native > Finished, 7 targets (7 cached) in 00:00:00. > $ ./foo.native > 8 > $ ocamlbuild foo/foo.p.native > + /opt/local/bin/ocamlopt.opt -p foo/bar.p.cmx foo/foo.p.cmx -o foo/ > foo.p.native > File foo/foo.p.cmx was compiled without access to the .cmx file > for module Bar, which was produced by `ocamlopt -for-pack'. > Please recompile foo/foo.p.cmx with the correct `-I' option so that > Bar.cmx > is found. > Command exited with code 2. > Compilation unsuccessful after building 7 targets (6 cached) in > 00:00:00. > > > Hope somebody can help > > - Reid > > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs