caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Alexander Bottema" <Alexander.Bottema@mathworks.com>
To: <caml-list@yquem.inria.fr>
Subject: RE: [Caml-list] Dynamic linking
Date: Tue, 4 Oct 2005 08:47:37 -0400	[thread overview]
Message-ID: <DB873318D1A41648BEAC4B5AAB63B3E10AC3ABDF@MESSAGE-AH.ad.mathworks.com> (raw)

As a developer of the MathWorks we are shipping a product containing
C/C++ code, Java code, Fortran, etc. The infrastructure that drives
everything is written in C++ and we're talking about a code base that
has been developed for more than 20 years. Every module that is based on
top of the core is written as a DLL and that's the way everything is
organized. Changing this infrastructure would be a task that would not
be reasonable by any means. It would cost the company a tremendous
amount of money and there would be no clear benefits from it. Actually,
I like the way it is being organized where every "leaf" product is just
a DLL.

Now, as a developer it would be nice if it was possible to write certain
parts in OCaml. The foreign language interface is good enough to be used
in conjunction with C/C++, but the lack of support to use it in DLLs
makes it impossible for us to have any OCaml code in our leaf product.

Nevertheless, I really tried to make it work (and I almost did). It's
only Linux/AMD64 that I couldn't solve and I really tried to modify the
AMD64 emitter.

-- Alexander Bottema
   The MathWorks

-----Original Message-----
From: Jon Harrop [mailto:jon@ffconsultancy.com] 
Sent: Tuesday, October 04, 2005 6:57 AM
To: Alexander Bottema
Subject: Re: [Caml-list] Dynamic linking

On Wednesday 28 September 2005 13:44, you wrote:
> I managed to get dynamic linking for OCaml (i.e. making OCaml
producing
> DLLs that could then be used by other native code/binaries) to work on
> almost all our supported platforms (Linux x86, Windows (2000/XP),
> Solaris 2, Mac OS X).
> The only platform which I couldn't get to work was Linux AMD64. I
tried
> to modify the OCaml emitter for AMD64 to accommodate position
> independent code using the offset tables, but it was too hard. If
anyone
> picks up this task, please let us know. As it stands today we cannot
use
> OCaml for production code.

May I ask what other approaches you have tried? In particular, why not 
statically link in the OCaml code?

I'd have thought it would then be a case of either calling everything
else 
from OCaml, or initialising the OCaml runtime and calling OCaml from 
"everything else".

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists


             reply	other threads:[~2005-10-04 12:47 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-04 12:47 Alexander Bottema [this message]
2005-10-04 14:47 ` skaller
  -- strict thread matches above, loose matches on Subject: below --
2007-06-18  4:18 Jeffrey Loren Shaw
2007-06-15 16:03 Alain Frisch
2007-06-15 16:47 ` [Caml-list] " Joel Reymont
2007-06-15 16:52 ` Brian Hurt
2007-06-15 18:24   ` Alain Frisch
2007-06-15 18:59     ` Jon Harrop
2007-06-15 20:57       ` Alain Frisch
2007-06-15 22:38     ` Quôc Peyrot
2007-06-16  7:23       ` Alain Frisch
2007-06-16 17:33     ` Jon Harrop
2007-06-16 17:59       ` skaller
2007-06-16 20:13         ` Christophe TROESTLER
2007-06-16 23:10         ` Philippe Wang
2007-06-15 22:37 ` skaller
2007-06-15 22:45   ` Christophe TROESTLER
2007-06-15 22:58     ` skaller
2007-06-20 13:40 ` Alain Frisch
2007-06-24 11:35 ` Jon Harrop
2005-10-05 13:11 Alexander Bottema
2005-10-04 15:56 Alexander Bottema
2005-10-05  8:14 ` skaller
2005-09-28 12:44 Alexander Bottema
2005-09-26  3:09 Jonathan Roewen
2005-09-26  4:26 ` skaller
2005-09-26  5:14 ` Jacques Garrigue
2005-09-26  5:20   ` Jonathan Roewen
2005-09-28  9:05   ` Jacques Garrigue
2005-04-05 21:12 Emir Pasalic
2005-04-05 22:02 ` [Caml-list] " Igor Pechtchanski

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=DB873318D1A41648BEAC4B5AAB63B3E10AC3ABDF@MESSAGE-AH.ad.mathworks.com \
    --to=alexander.bottema@mathworks.com \
    --cc=caml-list@yquem.inria.fr \
    /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).