Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Adrien Nader <adrien@notk.org>
To: "Török Edwin" <edwin+ml-ocaml@etorok.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Licenses - Confusion
Date: Wed, 22 May 2013 19:19:07 +0200	[thread overview]
Message-ID: <20130522171907.GA6073@notk.org> (raw)
In-Reply-To: <519CC1C8.3060502@etorok.net>

Hi,

I'll start with the usual IANAL (and I'm not the FSF either).

The thing to keep in mind is what the various license attempt to do,
roughly what their main goal is:
- GPL*: a program under the GPL* licenses allow people who execute the
  software to run it, study it, modify it and redistribute it under the
  same rules
- LGPL*: the same but for libraries and only for the libraries and not
  for the executable using the library
- AGPL*: same as GPL* but instead of people who execute it (i.e. on
  their _own_ machine), it's people who use it (remotely for instance)

If you chose the GPL, it's probably that you agreed with its goals so I
won't expand on that.

Now, the LGPL: it has been made mostly with C in mind. The modern way to
distribute software is dynamic libraries: libraries that are not part of
the main executable on disk, are loaded as needed into memory and are
shared among several programs.
Unfortunately, mostly for technical reasons, OCaml uses static and not
dynamic linking.

The LGPL requires the user to be able to swap one version of the library
that a main executable uses for another one (that is fully compatible).
That makes plenty of sense.  For dynamic linking, you have separate
files so that's easy. For static linking however, you only distribute
one file and you can't simply swap two files and be done with it.

That's the reason that many OCaml libraries uses the static linking
exception but at the same time it hasn't been thoroughly studied and its
terms might contradict. On the other hand, you can still rely on the
spirit of the license which is that it cares about the library itself,
not the program using it.

Static linking and LGPL are probably fairly doable however. What's the
big difference between static and dynamic linking? The LGPL requires
that at link-time one library version can be replaced with another: that
does require anything at compile time.
One way to allow replacing an LGPL-licensed library that has been
statically linked into a program would be to provide the set of .o files
that are linked together to create the main executable.

As Török said, OCaml's checksums can be annoying for such tasks.
However, *IIRC* (it's been some time), the checksums are on the
interface of the modules and the LGPL says that you need to allow
relinking with libraries that are (binary?) compatible and that's what
the checksums guarantee.

Anyway, the LGPL doesn't say you have to make that as easy as possible:
it simply says you have to make is possible. As far as I'm concerned, I
don't consider hacking the checksums in the object files as something
very difficult that prevents relinking (dangerous maybe, but definitely
not more than the ABI incompatibilities C has).

PS: *I* consider that BSD-style licenses cater for the needs of the
programmers while the GPL-style ones cater to the users
(that's my very own opinion)

PPS: I'm fairly sure I've forgotten stuff or been imprecise or ... but
rather than add more lines to this already-long email, I'd rather wait
for questions and answer as well as I can

-- 
Adrien Nader

  reply	other threads:[~2013-05-22 17:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22 12:34 oliver
2013-05-22 12:39 ` Anil Madhavapeddy
2013-05-22 16:40   ` Marek Kubica
2013-05-22 13:02 ` Török Edwin
2013-05-22 17:19   ` Adrien Nader [this message]
2013-05-23  6:36     ` Stéphane Glondu
2013-05-23  8:41       ` Daniel Bünzli
2013-05-23 21:07         ` Marek Kubica
2013-05-23 21:36         ` Stéphane Glondu
2013-05-23 22:28           ` Daniel Bünzli
2013-05-23 21:39         ` Ernesto Posse
2013-05-23 21:45         ` Chet Murthy
2013-05-23 22:11         ` Stefano Zacchiroli
2013-05-23 22:52   ` oliver

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=20130522171907.GA6073@notk.org \
    --to=adrien@notk.org \
    --cc=caml-list@inria.fr \
    --cc=edwin+ml-ocaml@etorok.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