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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 2959B81792 for ; Thu, 20 Jun 2013 22:05:33 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of christoph@sticksel.info) identity=pra; client-ip=80.67.31.94; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christoph@sticksel.info"; x-sender="christoph@sticksel.info"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of christoph@sticksel.info) identity=mailfrom; client-ip=80.67.31.94; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christoph@sticksel.info"; x-sender="christoph@sticksel.info"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@smtprelay05.ispgateway.de designates 80.67.31.94 as permitted sender) identity=helo; client-ip=80.67.31.94; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christoph@sticksel.info"; x-sender="postmaster@smtprelay05.ispgateway.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhwBAAdgw1FQQx9enGdsb2JhbABbgzqDTLwzfhYOAQEBAQEGDQkJFCiCJAEFIxVAESUCBRYLAgIJAwIBAgFFEwgBAYgKBKpukUaBJo4qFoI3gRQDiSGFJI8TDI5Q X-IPAS-Result: AhwBAAdgw1FQQx9enGdsb2JhbABbgzqDTLwzfhYOAQEBAQEGDQkJFCiCJAEFIxVAESUCBRYLAgIJAwIBAgFFEwgBAYgKBKpukUaBJo4qFoI3gRQDiSGFJI8TDI5Q X-IronPort-AV: E=Sophos;i="4.87,907,1363129200"; d="scan'208";a="22716493" Received: from smtprelay05.ispgateway.de ([80.67.31.94]) by mail2-smtp-roc.national.inria.fr with ESMTP; 20 Jun 2013 22:05:32 +0200 Received: from [128.255.45.210] by smtprelay05.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1Upl6o-0000Uv-US for caml-list@inria.fr; Thu, 20 Jun 2013 22:05:31 +0200 Message-ID: <51C36089.5060109@sticksel.info> Date: Thu, 20 Jun 2013 15:05:29 -0500 From: Christoph Sticksel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: caml-list@inria.fr References: <6ea38e78-0086-4e12-a168-2f0953acf0ee@googlegroups.com> In-Reply-To: <6ea38e78-0086-4e12-a168-2f0953acf0ee@googlegroups.com> X-Forwarded-Message-Id: <6ea38e78-0086-4e12-a168-2f0953acf0ee@googlegroups.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Df-Sender: Y2hyaXN0b3BoQHN0aWNrc2VsLmluZm8= Subject: [Caml-list] ocamlbuild: problem building -for-pack targets with .p.native extension 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