paurkedal/ocaml-caqti

the license does not seem to allow caqti to be used in commercial projects?

mudrz opened this issue · 12 comments

mudrz commented

hey, there's a thread in the OCaml forum, but I will ask here as well:
https://discuss.ocaml.org/t/lgpl-licenses-handling-in-ocaml/6883

It seems that the license is listed as LGPL, but the license copy is GPL and does no express what kinds of linking is permitted for this library. This means that caqti can only be used if the source code of whatever uses it becomes open source. Is this intended?
For some additional context - I've been checking out OCaml, but find the licenses used in some projects very limiting to use in commercial projects (particularly compared to equivalent C#, Java and JavaScript libraries). So I'm checking if the licenses are intentionally chosen as such or have they remained such for historical reasons and have not been updated

other references:
https://opensource.stackexchange.com/questions/4287/what-are-software-dependencies-and-what-are-the-implications-of-floss-dependenc

https://discuss.ocaml.org/t/lwt-is-now-mit-licensed/1901

Caqti is licensed under LGPL version 3 or later with the static compilation exception. The license texts included are COPYING which contains the GPL license and COPYING.LESSER which contains the LGPL exceptions. The linkage exception is stated in the beginning of source files as part of the copyright statement, though there should probably be a reference to the definition of "static compilation exception".

The intention with using LGPL with static compilation exception is to make the library usable to commercial projects, while ensuring modified versions of the library itself remains public.

mudrz commented

thanks for the clarification @paurkedal
I think that GitHub searches for a LICENSE file, but it can't find one https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/licensing-a-repository

so the license that opens for the repository is the GPL license

What does it mean that the repository has 2 license files, is this intended?

though there should probably be a reference to the definition of "static compilation exception".

yeah, It would be highly appreciated to clarify this in the license itself

GitHub is actually showing me LGPL both in the right info bar and when I open LICENSE (even if that is GPL). The project has only one license, but distributed as different files to make it simple to compare with the originals:

  • COPYING is the is GPL 3.0 which is the basis, since LGPL 3.0 is not a stand-alone document.
  • COPYING.LESSER contains the exceptions which turns GPL into LGPL.
  • A not yet added file will contain the OCaml static compilation exceptions.

I am tempted to add a license directory with all three texts along with a README which explains what they are. But I am also a bit worried about deviating from the current layout which I believe is recommended by FSF. Also, I know dune-release has some hard-coded logic to detect the license. So it may be better to add a file along that scheme, e.g. COPYING.OCAML.

I just pushed 18e9ec2, which I believe is correct, at least.

(Obligatory: I am not a lawyer -- just noticed these things and thought it might be a good idea to bring to your attention!)

@paurkedal Thank you for all your efforts on caqti! I noticed a few things relating to the above changes:

OCAML STATIC LINKING EXCEPTION
(adaptet to the GNU Lesser General Public License Version 3)
As a special exception to the GNU Lesser General Public License, you
may link, statically or dynamically, a "work that uses the Library"
with a publicly distributed version of the Library to produce an
executable file containing portions of the Library, and distribute
that executable file under terms of your choice, without any of the
additional requirements listed in clause 4 of the GNU Lesser General
Public License. By "a publicly distributed version of the Library",
we mean either the unmodified Library as distributed by the copyright
holder, or a modified version of the Library that is distributed under
the conditions defined in clause 2 of the GNU Lesser General Public
License. This exception does not however invalidate any other reasons
why the executable file might be covered by the GNU Lesser General
Public License.

  • There is a small typo on line 2. "adapted" is misspelled as "adaptet"
  • Your license mentioned in caqti.opam is "LGPL-3.0-or-later WITH OCaml-LGPL-linking-exception" -- however COPYING.OCAML states "adaptet to the GNU Lesser General Public License Version 3". Basically COPYING.OCAML could be clearer that exception is valid for LGPL 3.0 and later (which is what the "LGPL-3.0-or-later WITH OCaml-LGPL-linking-exception" text seems to indicate -- correct?)
  • I also noticed that you have titled the COPYING.OCAML file "OCAML STATIC LINKING EXCEPTION". However, the text of the exception says "[...] may link, statically or dynamically [...]". So this seems to be a general linking exception and not only a static linking exception?

Also, if you look at:

license: "LGPL-3.0-or-later WITH OCaml-LGPL-linking-exception"

There you have referred to the exception as "OCaml-LGPL-linking-exception" (which is slightly different from "OCAML STATIC LINKING EXCEPTION" title in theCOPYING.OCAML file).

I was hoping if you could have a look and see if any changes/clarifications are necessary or possible. This would make the licensing conditions even more clearer/consistent for users/prospective users of the library. Thank you for your time!

Thanks for the correction and comments.

As for your second point, I added "adapted to the GNU Lesser General Public License Version 3" to make it clear that the formulation is not identical to what is known as the "OCaml static linking exception" as used for LGPL 2.1. So, it refers to the phrasing rather than the validity. We cannot know if it will still be correct with respect to future versions. I don't think "adapted to" can be interpreted as a restriction of validity, but I am open to other suggestions.

About your third point, my understand is is that dynamic linking is already covered by LGPL, so it makes no difference whether it is explicitly allowed by the exception. I think writing "statically or dynamically" makes it clear that the author does not believe there is a restriction about dynamic linking or attempts to enforce such a restriction (which would likely be invalid). But I agree the inconsistency of the naming between the OPAM and the file itself is unfortunate, so I will change it one way or the other.

I consider replacing the parenthesis below the title with the following opening clause:

This is rewording of the OCaml Static Linking Exception for use with GNU Lesser General Public License Version 3. You may, at your own option, use the original text, as long as references to the main license are faithfully reinterpreted to preserve reinterpreted in a way which preserves the original meaning.

@paurkedal Thanks for looking at this. Licenses (and any exceptions) can get really complicated especially when when we're using the GNU GPL and/or GNU LGPL because of the potential "virality" of these licenses. It is always reassuring when the license (and any exceptions) are "standard" and found elsewhere in other projects. Customized legal language for a specific project brings its own issues as you might appreciate.

Is my understanding correct that these additional complications around language and wording are because you are using LGPL 3.0 and not 2.1?

My only suggestion would be to try to keep the exception language clear and simple as much as feasible. For instance, you wrote in your proposed clause above:

You may, at your own option, use the original text, as long as references to the main license are reinterpreted in a way which preserves the original meaning.

If I understand correctly you're trying to give the user the freedom to use the original text of the linking exception. But what follows seems to suddenly become hugely more complex when you say "reinterpreted in a way which preserves the original meaning".

To be honest, I don't know what is the most optimal approach to achieve simplicity and clarity here.

I agree that the notion of reinterpreting is not straight forward, on the other hand I am not sure I can claim that my rewording of the OCaml Linking Exception provides licensees with the precise same exception due to the rearrangement of GPL/LGPL in version 3.

So, instead I plan to switch to the LGPL-3.0 Linking Exception, which is formulated for LGPL-3.0. The text is:

As a special exception to the GNU Lesser General Public License version 3 ("LGPL3"), the copyright holders of this Library give you permission to convey to a third party a Combined Work that links statically or dynamically to this Library without providing any Minimal Corresponding Source or Minimal Application Code as set out in 4d or providing the installation information set out in section 4e, provided that you comply with the other provisions of LGPL3 and provided that you meet, for the Application the terms and conditions of the license(s) which apply to the Application.

Except as stated in this special exception, the provisions of LGPL3 will continue to comply in full to this Library. If you modify this Library, you may apply this exception to your version of this Library, but you are not obliged to do so. If you do not wish to do so, delete this exception statement from your version. This exception does not (and cannot) modify any license terms which apply to the Application, with which you must still comply.

To the best of my judgement this grants the same exception as the OCaml Linking Exception does for LGPL 2.1, and provides a known text instead which dose not require further elaboration.

Thanks for your efforts in trying to resolve the questions raised in this ticket. What has been your decision regarding the exception?

(BTW don't wish to rush you -- please take your time as you feel necessary)

@sidkshatriya I decided to go with the LGPL-3.0 Linking Exception, I have just been holding the change in case there were further comments.

I just pushed switch to the LGPL-3.0 Linking Exception. Thanks for raising the issue.