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 C0E0481792 for ; Fri, 21 Jun 2013 03:01:06 +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.29.24; 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.29.24; 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@smtprelay02.ispgateway.de designates 80.67.29.24 as permitted sender) identity=helo; client-ip=80.67.29.24; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christoph@sticksel.info"; x-sender="postmaster@smtprelay02.ispgateway.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsUAACqlw1FQQx0YlGdsb2JhbABBGoM6rVWSKoEBFg4BAQEBBw0JCRQDJYIjAQEEATg2EAsLGAkEIQ8CNBITBgIBAQ6HagMJBgQIM7MaA4hcjxY6g2EDiSGFJIonhGwMjHuBVQ X-IPAS-Result: AsUAACqlw1FQQx0YlGdsb2JhbABBGoM6rVWSKoEBFg4BAQEBBw0JCRQDJYIjAQEEATg2EAsLGAkEIQ8CNBITBgIBAQ6HagMJBgQIM7MaA4hcjxY6g2EDiSGFJIonhGwMjHuBVQ X-IronPort-AV: E=Sophos;i="4.87,908,1363129200"; d="scan'208";a="22732060" Received: from smtprelay02.ispgateway.de ([80.67.29.24]) by mail2-smtp-roc.national.inria.fr with ESMTP; 21 Jun 2013 03:01:06 +0200 Received: from [128.255.45.210] by smtprelay02.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1Uppip-00027s-U8 for caml-list@inria.fr; Fri, 21 Jun 2013 03:01:04 +0200 Message-ID: <51C3A5CE.10806@sticksel.info> Date: Thu, 20 Jun 2013 20:01:02 -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> <51C36089.5060109@sticksel.info> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Df-Sender: Y2hyaXN0b3BoQHN0aWNrc2VsLmluZm8= Subject: Re: [Caml-list] ocamlbuild: problem building -for-pack targets with .p.native extension On 06/20/2013 05:02 PM, Gabriel Scherer wrote: > 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). Yes, that worked. Not too bad a workaround either, since everything gets recompiled when I add or omit the -tag profile flag. That means there is no mix-up between object files with or without profiling information. Thanks for the quick response. Christoph > 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 >