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 78A4D7F734 for ; Tue, 22 Sep 2015 23:12:42 +0200 (CEST) IronPort-PHdr: 9a23:A2r8zBEof/2tsw4quawkiJ1GYnF86YWxBRYc798ds5kLTJ75r86wAkXT6L1XgUPTWs2DsrQf27aQ7/irADFdqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLsh7z0p8WYOlgVzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRuJN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IeezAcq85Vb1VCig9eyBwvZWz9EqLcQzawVAVV2FethtTH0CR5xj/WtL1szDmnvtkxSSfe8zwV7E9Hzq4ufRFUhjt3QIOODgk6ynrisFqiqNdr1r1ohVwxZPPSJ2VOeB4f6XSO9QASjwSDY5qSyVdD9bkPMM0BO0bMLMd9tGlqg== Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=magnus@therning.org; spf=None smtp.mailfrom=magnus@therning.org; spf=None smtp.helo=postmaster@mail-la0-f47.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of magnus@therning.org) identity=pra; client-ip=209.85.215.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="magnus@therning.org"; x-sender="magnus@therning.org"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of magnus@therning.org) identity=mailfrom; client-ip=209.85.215.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="magnus@therning.org"; x-sender="magnus@therning.org"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-la0-f47.google.com) identity=helo; client-ip=209.85.215.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="magnus@therning.org"; x-sender="postmaster@mail-la0-f47.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AAAwAqwwFWlC/XVdFdg3hjBrQ0iTSBdodMORMBAQEBAQEBARABAQEBBwsLCR8wgh2CIIEjNAUgAQUBIhMiiAwEAQOnE4IFgTA+MZ9pAQsgCpAQEQGDcIEUBYx9iGqFEYdzVoFDhl6KZhSFazWBFyMBhEJviC6BPwEBAQ X-IPAS-Result: A0AAAwAqwwFWlC/XVdFdg3hjBrQ0iTSBdodMORMBAQEBAQEBARABAQEBBwsLCR8wgh2CIIEjNAUgAQUBIhMiiAwEAQOnE4IFgTA+MZ9pAQsgCpAQEQGDcIEUBYx9iGqFEYdzVoFDhl6KZhSFazWBFyMBhEJviC6BPwEBAQ X-IronPort-AV: E=Sophos;i="5.17,574,1437429600"; d="asc'?scan'208";a="148257140" Received: from mail-la0-f47.google.com ([209.85.215.47]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 22 Sep 2015 23:12:41 +0200 Received: by lacao8 with SMTP id ao8so5588714lac.3 for ; Tue, 22 Sep 2015 14:12:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=1Xo0aS+NdhZHSgb4QnZWqcLi4vK6LJdqQliPDHuI/OI=; b=gq4NVb5kTxUw747oRjXa+Srskvevs/vWOaudDZx9/nzmjQD+X3XGe4Mr/hAXNWwYpF 6pC5wNDLGkxwFC/1PRNkCUMffIbLdl2E0xhsIeLnE9oito0cHYV43cKYufDqr5ah98Zs sogCToVjegB205pX6cuXM121dHie7+3WK9GHc9siWs0fjdhSIbYL9vh1nK4/A/oU0SOm +GYINfP/qKY8caIu3Vcpz9bvpnlHNHsM7KvCmv+0sTSdkQKEnoIUMY4HrQWXvW6eA4hJ 8t8wmWEou5w6xWwc3ByHh3zWjRHDJ1HRCpNFc1xSReba7e+HtvXM8HvCVRgE2X5HRmu+ zMzw== X-Gm-Message-State: ALoCoQlUuKeqIGbsEZTqpPfilvju0aNEsUluQ7uRg7hg3RgGITMaY4qjxY+BW3V7iFJpayRwAnoh X-Received: by 10.25.154.19 with SMTP id c19mr3016100lfe.74.1442956360169; Tue, 22 Sep 2015 14:12:40 -0700 (PDT) Received: from tatooine (c83-248-179-50.bredband.comhem.se. [83.248.179.50]) by smtp.gmail.com with ESMTPSA id k12sm254018lfb.44.2015.09.22.14.12.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2015 14:12:39 -0700 (PDT) Date: Tue, 22 Sep 2015 23:12:37 +0200 From: Magnus Therning To: OCaml List Message-ID: <20150922211237.GA22711@tatooine> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Subject: [Caml-list] oasis building out-of-src and camlp4 --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I've been trying to get oasis to build completely out-of-source. Basically I want to use it as an ExternalProject in a C/C++ project that uses CMake. If I have the following files ~~~ oasis-simple/_oasis OASISFormat : 0.4 Name : oasis-simple Version : 0.0 Synopsis : A simple test of building oasis Authors : Magnus Therning License : BSD-3-clause Executable "oasis-simple" Path : src MainIs : main.ml BuildTools : ocamlbuild BuildDepends : oasis ~~~ ~~~ oasis-simple/src/main.ml let () =3D print_string "Hello, World!" ~~~ then I can build out-of-source using the following steps: % mkdir ../oasis-simple-build; cd ../oasis-simple-build % oasis setup -oasis ../oasis-simple/_oasis % ocaml setup.ml -C $PWD/../oasis-simple -configure % ocaml setup.ml -C $PWD/../oasis-simple -build -build-dir $PWD/build If I make it a little more complicated, by adding a syntax extension: ~~~ oasis-camlp4/_oasis OASISFormat : 0.4 Name : oasis-camlp4 Version : 0.0 Synopsis : A slightly more complicated test of building oasis Authors : Magnus Therning License : BSD-3-clause Executable "oasis-camlp4" Path : src MainIs : main.ml BuildTools : ocamlbuild BuildDepends : oasis, core, sexplib.syntax, threads ~~~ ~~~ oasis-camlp4/src/main.ml open Core.Std type colour =3D Red | Green | Blue with sexp let () =3D printf "Hello, World! (%s)\n" (sexp_of_colour Green |> Sexp.to_s= tring) ~~~ Then I follow the same formula as above: % mkdir ../oasis-camlp4-build; cd ../oasis-camlp4-build % oasis setup -oasis ../oasis-camlp4/_oasis % ocaml setup.ml -C $PWD/../oasis-camlp4 -configure % ocaml setup.ml -C $PWD/../oasis-camlp4 -build -build-dir $PWD/build Which results in an error: ~~~ + /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 c= ode 10") ~~~ What am I missing here, how do I get the second example to build? /M --=20 Magnus Therning OpenPGP: 0xAB4DFBA4=20 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus There does not now, nor will there ever, exist a programming language in which it is the least bit hard to write bad programs. -- Flon's Axiom --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEABECAAYFAlYBxD8ACgkQiMWTaatN+6QqdACfZyqSbZxG/w8XUhm3quHwyo6c sAcAnjMbgEbK4zgq8Dnz9srW9PZVvayN =RM6k -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/--