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 85C917F734 for ; Wed, 23 Sep 2015 10:39:12 +0200 (CEST) IronPort-PHdr: 9a23:Ud4w3Rdsg45Glb+XebJBmP8zlGMj4u6mDksu8pMizoh2WeGdxc6yYh7h7PlgxGXEQZ/co6odzbGG7+a8AydYut6oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLDuvcGJKF0TzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRuJN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IeezAcq85Vb1VCig9eyBwvZWz9EqLcQzaw3ITVHgN2iZIDhLD7Rf1FsP0uyT8q/FVxCmXJ8v3S79yXi6tufRFUhjt3QgOPSQ4/WWfscdwgbhWulr1qBV12Y/ZZMeOP/pzZK7HVdwfTGtFGM1WUnoSUcuHc4ITAr9Zbq5jpI7nqg5L9EPmCA== Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=gabriel.scherer@gmail.com; spf=Pass smtp.mailfrom=gabriel.scherer@gmail.com; spf=None smtp.helo=postmaster@mail-wi0-f182.google.com 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.212.182; 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.212.182 as permitted sender) identity=mailfrom; client-ip=209.85.212.182; 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-wi0-f182.google.com) identity=helo; client-ip=209.85.212.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-wi0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DfAwBvZAJWlLbUVdFdg0M1YwYGqnuGYI1qhX0CgUUHOxEBAQEBAQEBARABAQEBBwsLCR8wQQOBWYIIAQEEEhEdARsdAQMMBgULDQICJgICIgERAQUBHAYTIod2AQMSCKh/gTA+MYtGgWyCeYlsChknDVaEIAEBAQEBBQEBAQEBFwEFDoEUhVGEfYQqEQFRB4JpgUMFlWeFEYd4ghWRRhSFaxIjgRc3gjCBfzwzg3eEN4E/AQEB X-IPAS-Result: A0DfAwBvZAJWlLbUVdFdg0M1YwYGqnuGYI1qhX0CgUUHOxEBAQEBAQEBARABAQEBBwsLCR8wQQOBWYIIAQEEEhEdARsdAQMMBgULDQICJgICIgERAQUBHAYTIod2AQMSCKh/gTA+MYtGgWyCeYlsChknDVaEIAEBAQEBBQEBAQEBFwEFDoEUhVGEfYQqEQFRB4JpgUMFlWeFEYd4ghWRRhSFaxIjgRc3gjCBfzwzg3eEN4E/AQEB X-IronPort-AV: E=Sophos;i="5.17,577,1437429600"; d="scan'208";a="148298387" Received: from mail-wi0-f182.google.com ([209.85.212.182]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 23 Sep 2015 10:39:11 +0200 Received: by wicgb1 with SMTP id gb1so194693106wic.1 for ; Wed, 23 Sep 2015 01:39:11 -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=SsPtJxKwx0EkByny7UvFvEM7IU7YZACOGIDmw3PWnQk=; b=tMRvbNyfxgTUQzLe69bzDYtAt+20uyU1U0RDEt3QQswcNbu1r8VH4faf8UYyWkM/3V G3DxowmLnGxYo/Cxi9+tS81z1aN57rJD0HbY11CKxUW2IQmISnimWEbjQt8l1ztMyOQb ZVCHXZdXJf2YP7dgja9Fzc0utU9DgQWtU1eif4flKZXfFDNnSCyCYc5lI3VZUuRcsggv yC11SmX+apiQs16IlmoNw9kNkj4bAzt9Dn/ef9Tm2eOFxc3DRmWNxKCIi2qatsC/A6Zk PjMOM2nvr1FFMfO2Jy3HiFgwrg10Z67dRFweqG+vzWG8y78bnVx0oP956Bw03DTGcFWx IEcg== X-Received: by 10.180.8.200 with SMTP id t8mr2725076wia.34.1442997550939; Wed, 23 Sep 2015 01:39:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.148.212 with HTTP; Wed, 23 Sep 2015 01:38:31 -0700 (PDT) In-Reply-To: <20150923081916.GE22004@sobel.cipherstone.com> References: <20150922211237.GA22711@tatooine> <20150923081916.GE22004@sobel.cipherstone.com> From: Gabriel Scherer Date: Wed, 23 Sep 2015 10:38:31 +0200 Message-ID: To: Magnus Therning Cc: Anil Madhavapeddy , OCaml List , Sylvain Le Gall Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] oasis building out-of-src and camlp4 Thanks for the reproducible information. I just tried and could reproduce the issue. The problem comes from the fact that, with the command-line invocation you use oasis generates the build description files (_tags, myocamlbuild.ml, setup.data) in the build directory, not in the source directory, but ocamlbuild when invoked (from the source directory) will look for them in the source directory. In particular, I could "fix" the build by doing ... ocaml setup.ml -C $PWD/../oasis-camlp4 -configure for f in {myocamlbuild.ml,_tags,setup.data}; do ln -s $PWD/$f ../oasis-camlp4; done ocaml setup.ml -C $PWD/../oasis-camlp4 -build -build-dir $PWD/build It looks like oasis's behavior with "-C $DIR -configure" is problematic: it should generate its files in $DIR -- except maybe setup.ml, or then people would have to run (ocaml $DIR/setup.ml -C $DIR ...). TL;DR: this appear to be an oasis issue, rather than a issue with CMake or ocamlbuild. On Wed, Sep 23, 2015 at 10:19 AM, Magnus Therning wrote: > On Wed, Sep 23, 2015 at 09:48:43AM +0200, Anil Madhavapeddy wrote: >> On 22 Sep 2015, at 23:12, Magnus Therning wrote: >> > >> > ~~~ >> > + /usr/bin/ocamldep.opt -modules src/main.ml > src/main.ml.depends >> > File "src/main.ml", line 12, characters 4-8: >> > Error: Syntax error >> > Command exited with code 2. >> > Compilation unsuccessful after building 1 target (0 cached) in 00:00:00. >> > E: Failure("Command ''/usr/bin/ocamlbuild' src/main.byte -tag debug -build-dir /home/magnus/devo/tmp/oasis-camlp4-build/build' terminated with error code 10") >> > ~~~ >> > >> > What am I missing here, how do I get the second example to build? >> >> The ocamldep invocation here is not passing the -pp parameter to run >> the source code through camlp4. I'm not sure how you fix that in >> CMake, but add the relevant lines (which should be the same as those >> passed to ocamlc/ocamlopt) to ocamldep and it should get further... > > Ah, OK, I'll have to look into that. > > I should point out though that I've not started using CMake yet. The > examples I showed use just `oasis` (with `ocamlbuild` as its tool). I'm > still trying to work out the incantations to use, the integration with > CMake comes later :) > > /M > > -- > Magnus Therning OpenPGP: 0xAB4DFBA4 > email: magnus@therning.org jabber: magnus@therning.org > twitter: magthe http://therning.org/magnus > > LeBlanc's law: Later equals never.