caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Mikkel Fahnøe Jørgensen" <mikkel@dvide.com>
To: Peter Hawkins <hawkinsp@cs.stanford.edu>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Re: [ANN] OCaml Batteries Included, alpha 3
Date: Mon, 9 Feb 2009 23:45:48 +0100	[thread overview]
Message-ID: <caee5ad80902091445w245fc99fg4fb1838a41fdd0f9@mail.gmail.com> (raw)
In-Reply-To: <b0b348900902091402u14b79fdavf147c5bcc093980@mail.gmail.com>

2009/2/9 Peter Hawkins <hawkinsp@cs.stanford.edu>:
> Hi...
>
> On Mon, Feb 9, 2009 at 1:32 AM, Romain Bardou <Romain.Bardou@lri.fr> wrote:
>> The wiki:

> The documentation on linking Ocaml programs to external C libraries or
> Ocaml libraries with C library dependencies is minimal at best. There
> are some examples in the wiki, but they come with little explanation
> and aren't adequate documentation by themselves.
>

Documention issues aside, external C linking is not at all well
supported in ocamlbuild, for one thing there is no dependency support
and C header files do not automatically get added to the build dir,
and there isn't any good support for different C tool chains - that is
why I wrote ocamlbuild-ctools. More generally ocamlbuild does no very
well support building C code without ocaml either. I hope some of this
could eventually be integrated with ocamlbuild itself or that
ocamlbuild adds module support so it becomes easier to include in ones
own build.

Regarding what is missing in ocaml build environment ... yes
documentation. But there are other issues. Usually these get answered
with - but you just have do ... like install unix tools, or use
ocamlfind with this argument, or something. Yes, it is possible. But
it is much more involved that in scripting languages. I don't have all
the answers. But for example: why is there a need for ocamlfind in the
first place. Couldn't the ocaml compiler tools do the same thing with
a lib path argument, a default location and an environment varible? Or
since it is more or less needed, why isn't it part of the default
installation of ocaml? Why is the path information mixed ocaml/C
libaries so hardcoded that I must copy C libraries to a new path
before creating an ocaml library so it doesn't hardcode some strange
path that makes the library uninstallable. Why is it so difficult to
create libraries with pack arguments - granted ocamlbuild solves many
of these issues. Why can't the compiler figure out the proper link
order of arguments - again ocamlbuild helps. Why can't a name a camlp4
syntax at the top of a file so other users have a chance to figure out
how to read the reminder of the file. Why do I have to link with a
library in the first place when I already referenced the library in
the source code. Again ocamlbuild solves  some of these issues.

There are probably many good reasons and priorities behind this, but
the end result is a more difficult build environment than your typical
scripting language, or even C/C++.

Mikkel


  reply	other threads:[~2009-02-09 22:45 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-06 16:11 David Rajchenbach-Teller
2009-02-07 14:21 ` [Caml-list] " Mikkel Fahnøe Jørgensen
2009-02-07 14:43   ` Sylvain Le Gall
2009-02-07 14:58     ` [Caml-list] " Jon Harrop
2009-02-07 15:13       ` Sylvain Le Gall
2009-02-07 16:13         ` [Caml-list] " Matthieu Dubuget
2009-02-07 19:30           ` David Rajchenbach-Teller
2009-02-07 21:13             ` Matthieu Dubuget
2009-02-09  9:36           ` Romain Bardou
2009-02-09 15:56             ` David Teller
2009-02-07 15:46       ` Paolo Donadeo
2009-02-09  9:32       ` Romain Bardou
2009-02-09 10:30         ` ocamlbuild documentation (was Re: [Caml-list] Re: [ANN] OCaml Batteries Included, alpha 3) Daniel Bünzli
2009-02-09 11:51           ` Romain Bardou
2009-02-09 12:30             ` Daniel Bünzli
2009-02-09 12:52               ` Romain Bardou
2009-02-09 13:07                 ` Daniel Bünzli
2009-02-09 13:22                   ` Romain Bardou
2009-02-09 13:36                     ` Daniel Bünzli
2009-02-09 13:59                       ` Romain Bardou
2009-02-09 14:04                         ` Romain Bardou
2009-02-09 14:37                           ` Daniel Bünzli
2009-02-09 17:26                             ` Kuba Ober
2009-02-09 18:28                         ` Jon Harrop
2009-02-09 21:24                           ` DooMeeR
2009-02-10 14:06                             ` ocamlbuild documentation Jan Kybic
2009-02-10 14:27                               ` [Caml-list] " Matthieu Dubuget
     [not found]                                 ` <87k57ywc0k.fsf@fel.cvut.cz>
2009-02-10 15:50                                   ` Matthieu Dubuget
2009-02-10 15:58                                     ` Daniel Bünzli
2009-02-09 18:38                     ` ocamlbuild documentation (was Re: [Caml-list] Re: [ANN] OCaml Batteries Included, alpha 3) David Teller
2009-02-09 22:02         ` [Caml-list] Re: [ANN] OCaml Batteries Included, alpha 3 Peter Hawkins
2009-02-09 22:45           ` Mikkel Fahnøe Jørgensen [this message]
2009-02-09 22:55             ` Mikkel Fahnøe Jørgensen
2009-02-10  7:48             ` Stefano Zacchiroli
2009-02-10 13:22               ` Mikkel Fahnøe Jørgensen
2009-02-07 20:04     ` Daniel Bünzli
2009-02-08 17:22   ` [Caml-list] " Richard Jones
2009-02-09  8:57     ` David Allsopp

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=caee5ad80902091445w245fc99fg4fb1838a41fdd0f9@mail.gmail.com \
    --to=mikkel@dvide.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=hawkinsp@cs.stanford.edu \
    /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).