4

Is there a weak copyleft license, that:

  • allows you to distribute the sources, as long as they are under the same license
  • allows you to do pretty much what you want if you do not distribute the sources

The main problem I have with the LGPL is that if I'm not mistaken you have to dynamically link it to your project, and I do not want this requirement: as far as I'm concerned, you can just compile it inside your main project.

I've been looking at the MPL and maybe that's more or less what I'm searching for, but I'm not sure I fully understand it.

Does the MPL match my requirements, or is there any other license available that does?

2
  • Have you considered the GPL with the GCC runtime exception? Commented Mar 18, 2017 at 7:04
  • 1
    Hey there! If you need to merge accounts, you're going to have to contact the Stack Exchange team as outlined in this help center article. Moderators don't have access to this ability, so you have to go through a community manager. Sorry for the inconvenience!
    – Zizouz212
    Commented Mar 20, 2017 at 1:32

3 Answers 3

2

The main problem I have with the LGPL is that if I'm not mistaken you have to dynamically link it to your project, and I do not want this requirement: as far as I'm concerned, you can just compile it inside your main project.

The MPL (Mozilla Public License) 2.0 does indeed allow static linking without complicated technical requirements contrary to LGPL. It is IMHO much easier to understand than LGPL. Maybe you would benefit from reading the FAQ.

However I'm a bit concerned by this requirement of yours:

you to do pretty much what you want if you do not distribute the sources

So if people fork your library and make it closed-source you don't care, but if they fork it and switch to an alternative open source license then you mind?

If this is really what you are asking for, then you might have better luck with Microsoft Public License.

3
  • Excellent suggestion! I've decided to go with MS-PL, that was exactly what I was searching for! Some details could be better, but still an excellent match!
    – GSsfl
    Commented Mar 21, 2017 at 14:32
  • I don't like this license too much and would discourage its use in the general case because it was made to be incompatible with GPL. But it seemed to me that it was satisfying your needs.
    – Zimm i48
    Commented Mar 21, 2017 at 14:35
  • 1
    Yes thank you, it definitely does, and if you don't like it, I appreciate even more you suggesting it anyway!
    – GSsfl
    Commented Mar 21, 2017 at 14:38
1

Note: this answer only looks at options with the LGPL, it doesn't go into other licenses.

I would highly recommend seeing this in depth-answer first.

The copyleft tutorial and gnu.org states - with regards to the LGPL - that:

Does the LGPL have different requirements for statically vs dynamically linked modules with a covered work?

For the purpose of complying with the LGPL (any extant version: v2, v2.1 or v3):

  1. If you statically link against an LGPL'd library, you must also provide your application in an object (not necessarily source) format, so that a user has the opportunity to modify the library and relink the application.

  2. If you dynamically link against an LGPL'd library already present on the user's computer, you need not convey the library's source. On the other hand, if you yourself convey the executable LGPL'd library along with your application, whether linked with statically or dynamically, you must also convey the library's sources, in one of the ways for which the LGPL provides.

What this means is that you are permitted to statically link with the LGPL'd library, but must then release enough of the application code to allow end users to modify how the code links with the library

Hope this helps.

1

The problem is your second requirement:

allows you to do pretty much what you want if you do not distribute the sources

can be used to defeat the first requirement:

allows you to distribute the sources, as long as they are under the same license

For example, suppose person A compiles your code with a compiler that includes so much debugging information that 1:1 copy of the source can be recovered. Because you want this compiled form to be distributable without restrictions, person A can give this binary to person B without restrictions, and person B can decompile it to recover the source, which can then be redistributed without restrictions because B got the compiled binary files without restrictions.

So if you want a license that restricts the right to distribute the source code, it is going to have to have provisions that restrict the rights to distribute binaries as well.

The main difference between LGPL and MPL is that LGPL stipulates that a combination with proprietary components must have a way to relink the LGPL parts, while MPL requires only disclosure of the source for the MPL parts, but does not require a practical way to relink. Certainly neither allows binary distribution without releasing the source for the copyleft part of the combined application.

2
  • Hi. I'm sorry, I'm no lawyer, but I don't think this argument makes any sense at all. If you distribute the sources, you have to respect the "source distribution" agreements, doesn't matter if you hide them into the binaries, for whatever reason.
    – GSsfl
    Commented Mar 21, 2017 at 14:34
  • @GSsfl Well you can play with the definitions and lay out the rules in your license. But then users might worry that, depending on the compilation process, you might end up with a binary subject to the source distribution rules. Commented Mar 21, 2017 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.