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 78B227EEFD for ; Thu, 1 Oct 2015 08:47:06 +0200 (CEST) IronPort-PHdr: 9a23:GF9M+Rww6EwzlZHXCy+O+j09IxM/srCxBDY+r6Qd0eIUIJqq85mqBkHD//Il1AaPBtWHrawdwLOP7+jJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6OyZrunLnrp9X6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD89pozcNLUL37cqIkVvQYSW1+ayFmrPHs4DzKQg2S/TMgUmgMlBtODECR6Rj1WIrqmjf6u/B72S+Ve8rsQuZndy6l6vJQWRv2gSYBfxo0uE7ejsg42LlKpAyophpXx4ORb4iRMLx4c7+LLoBSfnZIQssED38JOYi7dYZaSrNZZes= Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=sylvain@le-gall.net; spf=Pass smtp.mailfrom=gildor478@gmail.com; spf=None smtp.helo=postmaster@mail-wi0-f175.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of sylvain@le-gall.net) identity=pra; client-ip=209.85.212.175; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gildor478@gmail.com"; x-sender="sylvain@le-gall.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gildor478@gmail.com designates 209.85.212.175 as permitted sender) identity=mailfrom; client-ip=209.85.212.175; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gildor478@gmail.com"; x-sender="gildor478@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-wi0-f175.google.com) identity=helo; client-ip=209.85.212.175; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gildor478@gmail.com"; x-sender="postmaster@mail-wi0-f175.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ChAAD71QxWm6/UVdFEGoN7ZwaDK7o8AQ2BfYV3gS84FAEBAQEBAQEBEAEBAQEBBgsLCSEugh2CBwEBAQMBEhEEUgULCQILDSoCAiISAQUBHAYTCBMHiAQICAU7mSmPRoEwPjGLR5RPAQoBAQEeCoVuhXiEKhEBTYJ0gUMFlXiFFod9gU9Gg3CNBnIQBoNOgiM1gRcRDgEBglMdgVQ+MwGIOoE/AQEB X-IPAS-Result: A0ChAAD71QxWm6/UVdFEGoN7ZwaDK7o8AQ2BfYV3gS84FAEBAQEBAQEBEAEBAQEBBgsLCSEugh2CBwEBAQMBEhEEUgULCQILDSoCAiISAQUBHAYTCBMHiAQICAU7mSmPRoEwPjGLR5RPAQoBAQEeCoVuhXiEKhEBTYJ0gUMFlXiFFod9gU9Gg3CNBnIQBoNOgiM1gRcRDgEBglMdgVQ+MwGIOoE/AQEB X-IronPort-AV: E=Sophos;i="5.17,616,1437429600"; d="scan'208";a="149213163" Received: from mail-wi0-f175.google.com ([209.85.212.175]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 01 Oct 2015 08:47:05 +0200 Received: by wicgb1 with SMTP id gb1so14142515wic.1 for ; Wed, 30 Sep 2015 23:47:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=zG+T++qfyfhm8cU5H0CIZzHuf9ydg+13DXoRgOhbSBE=; b=QMPCyMskzQwpOcJTqPKiStmX3vMgxpZ1d6ml2DCB1XQLtCt/6++O3tO57169MTXqKm pMJV1pxdKi6EtIY8xXM6CmFS/iTm21k3fTeDgJ6b/zG5PLiy+OVYm5HGP9urWyr2emo+ Hk4GiM7DGjMyYXiDAT8AJBfo0A73h6W5lhM5kvU8kyP/wlqrHycU8XhmEDAz+IoA1Khb o7cYLa/gVa2AzHngzuQrRiwtCEZnXd04/HSd7bO7/RuLC98V8bMFsFwDaB35X1qGwtzN VrG34OMwqdg3xCrSmkVWjrcEXkp4ifulUEK9GFK4UVZPYlInw70eGNDlFrVoB0tIKeZv CUxg== X-Received: by 10.180.86.100 with SMTP id o4mr1360669wiz.59.1443682025085; Wed, 30 Sep 2015 23:47:05 -0700 (PDT) MIME-Version: 1.0 References: <20150922211237.GA22711@tatooine> <20150923081916.GE22004@sobel.cipherstone.com> <20150923085405.GG22004@sobel.cipherstone.com> <20150923094414.GB25229@sobel.cipherstone.com> <20150930114947.GA21728@sobel.cipherstone.com> In-Reply-To: <20150930114947.GA21728@sobel.cipherstone.com> From: Sylvain Le Gall Date: Thu, 01 Oct 2015 06:46:55 +0000 Message-ID: To: Magnus Therning Cc: Gabriel Scherer , Anil Madhavapeddy , OCaml List Content-Type: multipart/alternative; boundary=f46d04428e244620a90521056af9 Subject: Re: [Caml-list] oasis building out-of-src and camlp4 --f46d04428e244620a90521056af9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, Le mer. 30 sept. 2015 =C3=A0 13:49, Magnus Therning a =C3=A9crit : > On Tue, Sep 29, 2015 at 10:59:49PM +0000, Sylvain Le Gall wrote: > > Please consider adding more comments to the following bug, which seems > > close to what you are discussing: > > > > > https://forge.ocamlcore.org/tracker/index.php?func=3Ddetail&aid=3D1473&gr= oup_id=3D54&atid=3D291 > > > > I must admit that I totally miss the whole point of the discussion, > > probably if you can make a summary of what you precisely need in the > > BTS, I will be able to understand the problem better. > > Unfortunately I don't know enough about `oasis` to understand that bug > report :( > > I'll try to explain how I'd like to use oasis/buildtool by looking how > Haskell's Cabal lets me do it: > > - Configure without generating anything in the current dir: > > % runhaskell Setup.hs --builddir /tmp/my_build_dir > > - Build using the just generated configuration, again without putting > anything in the current dir: > > % runhaskell Setup.hs --builddir /tmp/my_build_dir > > Comparing this to oasis/buildtool (assuming I've a pre-existing > `setup.ml` generated with `oasis setup -setup-update dynamic` to > minimize the amount of build-related stuff in the project): > > - Configure > > % ocaml setup.ml -configure > > This generates a file, `setup.data` in the current dir. I've found no > way to have it generated in a dedicated build dir. > > - Build > > % ocaml setup.ml -build -build-dir /tmp/my_build_dir -no-links > > This builds in the mentioned dir, but it also generates a `setup.log` > in the current dir! > > I thought that `-C` could offer a way to achieve this, but it doesn't: > > % mkdir /tmp/my_build_dir; cd /tmp/my_build_dir > % ocaml /path/to/setup.ml -h > Exception: Sys_error "_oasis: No such file or directory". > File "/path/to/setup.ml", line 1: > Error: Reference to undefined global `OASISDynRun' > > I'm not convinced `-C` *should* be the way to achieve what I want. > > Hopefully this makes it clearer what I mean. > > First, why not just copy everything in the new directory: % cp -R . /tmp/my_build_dir; cd /tmp/my_build_dir % ocaml setup.ml -configure % ocaml setup.ml -build Maybe I miss some context to understand why this simple solution is not enough. Going back at the other points. There are 3 categories of files: - the ones that are really generated at build time: setup.log, setup.data -> they probably need to follow the indication provided -C. This is a bug - the ones that are generated by the underlying build system: _build (ocamlbuild) -> as you wrote "-build -build-dir /tmp/my_build_dir -no-links" should be enough - the ones that are generated by the dynamic mode, which is a hack to prevent adding the files that other tools need: -> these ones are tricky because they should have been in the source directory right from the beginning and being able to apply -C to them is equivalent to make sure that "ocamlfind"/"ocamlbuild"/other build tools will use -C and the source directory... This is clearly not trivial to assume that all tools will do. My initial proposal to "cp" the files and build from the copy would probably solve your problem without assuming that all tools comply with -C. Tell me if it solves your problem. Regards Sylvain /M > > -- > Magnus Therning OpenPGP: 0xAB4DFBA4 > email: magnus@therning.org jabber: magnus@therning.org > twitter: magthe http://therning.org/magnus > > Any sufficiently advanced technology is indistinguishable from a rigged > demo. > -- Andy Finkel > --f46d04428e244620a90521056af9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

= Le=C2=A0mer. 30 sept. 2015 =C3=A0=C2=A013:49, Magnus Therning <magnus@therning.org> a =C3=A9crit=C2= =A0:
On Tue, Sep 29, 2015 at 10:59:= 49PM +0000, Sylvain Le Gall wrote:
> Please consider adding more comments to the following bug, which seems=
> close to what you are discussing:
>
> https://forge.ocamlcore.org/tracker/index.php?func=3Ddetail&= ;aid=3D1473&group_id=3D54&atid=3D291
>
> I must admit that I totally miss the whole point of the discussion,
> probably if you can make a summary of what you precisely need in the > BTS, I will be able to understand the problem better.

Unfortunately I don't know enough about `oasis` to understand that bug<= br> report :(

I'll try to explain how I'd like to use oasis/buildtool by looking = how
Haskell's Cabal lets me do it:

- Configure without generating anything in the current dir:

=C2=A0 =C2=A0 % runhaskell Setup.hs --builddir /tmp/my_build_dir

- Build using the just generated configuration, again without putting
=C2=A0 anything in the current dir:

=C2=A0 =C2=A0 % runhaskell Setup.hs --builddir /tmp/my_build_dir

Comparing this to oasis/buildtool (assuming I've a pre-existing
`setup.ml<= /a>` generated with `oasis setup -setup-update dynamic` to
minimize the amount of build-related stuff in the project):

- Configure

=C2=A0 =C2=A0 % ocaml
setup.ml -configure

=C2=A0 This generates a file, `setup.data` in the current dir.=C2=A0 I'= ve found no
=C2=A0 way to have it generated in a dedicated build dir.

- Build

=C2=A0 =C2=A0 % ocaml setup.ml -build -build-dir /tmp/my_build_dir -no-links

=C2=A0 This builds in the mentioned dir, but it also generates a `setup.log= `
=C2=A0 in the current dir!

I thought that `-C` could offer a way to achieve this, but it doesn't:<= br>
=C2=A0 =C2=A0 % mkdir /tmp/my_build_dir; cd /tmp/my_build_dir
=C2=A0 =C2=A0 % ocaml /path/to/setup.ml -h
=C2=A0 =C2=A0 Exception: Sys_error "_oasis: No such file or directory&= quot;.
=C2=A0 =C2=A0 File "/path/to/setup.ml", line 1:
=C2=A0 =C2=A0 Error: Reference to undefined global `OASISDynRun'

I'm not convinced `-C` *should* be the way to achieve what I want.

Hopefully this makes it clearer what I mean.


First, why not just copy everything in= the new directory:
% cp -R . /tmp/my_build_dir; cd /tmp/my_build_dir<= br>
% ocaml setup.ml=C2=A0-configure=C2=A0=C2=A0
=
% ocaml setup.ml -build

=
Maybe I miss some context to understand why this simple solution= is not enough.

Going back at the other points. Th= ere are 3 categories of files:
- the ones that are really generat= ed at build time: setup.log, setup.data
=C2=A0 -> they probabl= y need to follow the indication provided -C. This is a bug
- the = ones that are generated by the underlying build system: _build (ocamlbuild)=
=C2=A0 -> as you wrote "-build -build-dir /tmp/my_build_= dir -no-links" should be enough
- the ones that are generate= d by the dynamic mode, which is a hack to prevent adding the files that oth= er tools need:
=C2=A0 -> these ones are tricky because they sh= ould have been in the source directory right from the beginning and being a= ble to apply -C to them is equivalent to make sure that "ocamlfind&quo= t;/"ocamlbuild"/other build tools will use -C and the source dire= ctory... This is clearly not trivial to assume that all tools will do.

My initial proposal to "cp" the files and bu= ild from the copy would probably solve your problem without assuming that a= ll tools comply with -C. Tell me if it solves your problem.

<= /div>
Regards
Sylvain

/M

--
Magnus Therning=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 OpenPGP: 0xAB4DFBA4
email: magnus@ther= ning.org=C2=A0 =C2=A0jabber: magnus@therning.org
twitter: magthe=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0http= ://therning.org/magnus

Any sufficiently advanced technology is indistinguishable from a rigged
demo.
=C2=A0 =C2=A0 =C2=A0-- Andy Finkel
--f46d04428e244620a90521056af9--