caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dario Teixeira <darioteixeira@yahoo.com>
To: Sylvain Le Gall <sylvain@le-gall.net>,
	"caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Re: Conditional BuildDepends in OASIS
Date: Thu, 1 Nov 2012 08:18:41 -0700 (PDT)	[thread overview]
Message-ID: <1351783121.24914.YahooMailNeo@web111506.mail.gq1.yahoo.com> (raw)
In-Reply-To: <slrnk90mq5.7tq.sylvain@gallu.homelinux.org>

Hi,

> Having pgocaml.batteries and pgocaml.extlib is the best solution,

> depending on a flag is perfect. Congrat to have find it yourself ;-)
> (don't forget to CC me directly if you want a quicker response, I am a
> little bit overloaded and don't spend much time reading caml-list).
> 
> Concerning FindlibParent that complains about non-existing pgocaml, you
> should use FindlibContainers rather than FindlibParent.

Thank you Sylvain and Anil for your suggestions!

Using FindlibContainers does solve the virtual package problem, but
in the meantime I've run into a perplexing issue involving Camlp4.
Here's the relevant fragment from the _oasis file:

BuildTools:             ocamlbuild, camlp4o

Flag "batteries"
  Description: Use Batteries
  Default: true

Library "pgocaml_batteries"
  Build$:               flag(batteries)
  Install$:             flag(batteries)
  Path:                 src
  Modules:              PGOCaml
  BuildDepends:         calendar, csv, pcre, batteries, camlp4.macro
  FindlibContainers:    pgocaml
  Findlibname:          batteries
  ByteOpt+:             -ppopt -DUSE_BATTERIES
  NativeOpt+:           -ppopt -DUSE_BATTERIES

Library "pa_pgocaml_batteries"
  Build$:               flag(batteries)
  Install$:             flag(batteries)
  Path:                 src
  Modules:              Pa_pgsql
  BuildDepends:         pgocaml.batteries, camlp4.macro, camlp4.quotations.o, camlp4.extend
  FindlibContainers:    pgocaml.batteries
  FindlibName:          syntax
  ByteOpt+:             -ppopt -DUSE_BATTERIES
  NativeOpt+:           -ppopt -DUSE_BATTERIES

The problem occurs during the compilation of pa_pgocaml_batteries.
OCamlbuild issues the command below to determine dependencies,
which is manifestly wrong, since there is a "-syntax camlp4o" missing.

ocamlfind ocamldep -package pcre -package extlib -package csv -package camlp4.quotations.o -package camlp4.macro -package camlp4.extend -package calendar -package batteries -modules src/pa_pgsql.ml > src/pa_pgsql.ml.depends

What I find perplexing is that the compilation of pgocaml_batteries had succeeded,
so the required "-syntax camlp4o" must have had been given then, though at first
glance I can see no applicable difference in their declarations.

Any idea on what's going on?

Thanks again for your time!
Cheers,
Dario

  reply	other threads:[~2012-11-01 15:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-25 13:57 [Caml-list] " Dario Teixeira
2012-10-25 20:12 ` Anil Madhavapeddy
2012-10-26 17:56   ` Dario Teixeira
2012-10-26 21:34     ` Anil Madhavapeddy
2012-10-30 22:57     ` [Caml-list] " Sylvain Le Gall
2012-11-01 15:18       ` Dario Teixeira [this message]
2012-11-02  0:56         ` Anil Madhavapeddy
2012-11-02 18:08           ` Dario Teixeira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1351783121.24914.YahooMailNeo@web111506.mail.gq1.yahoo.com \
    --to=darioteixeira@yahoo.com \
    --cc=caml-list@inria.fr \
    --cc=sylvain@le-gall.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).