From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 33E29BB84 for ; Mon, 9 Feb 2009 23:45:49 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao0BAH9AkEnRVdsQkGdsb2JhbACTfD8BAQEBCQkMBxEDrjKOEgEDAQOEFwaEIYFW X-IronPort-AV: E=Sophos;i="4.37,407,1231110000"; d="scan'208";a="22728237" Received: from mail-ew0-f16.google.com ([209.85.219.16]) by mail3-smtp-sop.national.inria.fr with ESMTP; 09 Feb 2009 23:45:48 +0100 Received: by ewy9 with SMTP id 9so2533817ewy.3 for ; Mon, 09 Feb 2009 14:45:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=ko4n+iwhQsbH5JRIuyPWkVluhi0QAK3Dy/SD5icWkv8=; b=Mb7u5sl5FdThiOHB3+UPJrSas+jBBX8qzH9BqiqKHk0ZqYqnHInvbIv95a1U8MLF+Q 24yLQ/JH3074U0XubD4Lzo/UDvrcFOyIaAQl6wTUWd5w0l8N1tbEZvDIXhgZbRQagsI/ TdZuunKyYRUI0fTm63NDpLtUHjC/qepm/X8/Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=LiBS7HtEVSFklqL0EsmB3u8dewx66Km8vq54RRk/jTt+Yp7Kv9TjEMx+zgWLPBEfBG uYXJVSuvez7Qv3JoDfZxVH6R7q+frvCI9DzAi3M9p8XLJ/rLUcNifSnN/dZMrdtj4Reb 7hMZq6WNZPCQ7ercXdgIpj/qITz7etfx0Hq5w= MIME-Version: 1.0 Sender: mikkelfj@gmail.com Received: by 10.210.91.17 with SMTP id o17mr868935ebb.28.1234219548158; Mon, 09 Feb 2009 14:45:48 -0800 (PST) In-Reply-To: References: <1233936696.6216.65.camel@Blefuscu> <200902071458.45000.jon@ffconsultancy.com> <498FF839.6090901@lri.fr> Date: Mon, 9 Feb 2009 23:45:48 +0100 X-Google-Sender-Auth: 18e484e02002df90 Message-ID: Subject: Re: [Caml-list] Re: [ANN] OCaml Batteries Included, alpha 3 From: =?UTF-8?Q?Mikkel_Fahn=C3=B8e_J=C3=B8rgensen?= To: Peter Hawkins Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 mikkel:01 rgensen:01 mikkel:01 lri:01 wiki:01 ocaml:01 dependencies:01 wiki:01 ocamlfind:01 ocamlfind:01 compiler:01 lib:01 compiler:01 camlp:01 2009/2/9 Peter Hawkins : > Hi... > > On Mon, Feb 9, 2009 at 1:32 AM, Romain Bardou 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