sensorium / Mozzi

sound synthesis library for Arduino
https://sensorium.github.io/Mozzi/
GNU Lesser General Public License v2.1
1.07k stars 186 forks source link

Dual-license with GPL? #72

Closed mangtronix closed 4 months ago

mangtronix commented 5 years ago

Is it possible to make Mozzi available under GPL license? That would make it possible to combine with GPL licensed code. The CC-BY-NC-SA is not compatible with GPL.

Creative Commons itself "recommends and uses free and open source software licenses for software."

I want to publish ESP32 support for Mozzi using the ESP8266Audio library, which is GPL licensed. Mozzi could add the GPL as an option in addition to the existing license.

sensorium commented 5 years ago

My understanding is that if your application is non-commercial you can share Mozzi under CC-BY-NC-SA. What is the hurdle to combining with GPL code?

If you have a commercial application, we can negotiate a license.

tfry-git commented 5 years ago

I believe the problem is the following:

One way out would be, if Mozzi would optionally allow you to distribute your derived work under GPL. I'd be sympathetic to that idea, but clearly it's your call, alone, to make.

tfry-git commented 5 years ago

I will add that the GPL does not preclude commercial use. All it says is that you must offer your source code under the GPL.

DCooper-nz commented 5 years ago

Would be great if this could be worked out as esp32 support would be fantastic.

wyan commented 3 years ago

What's the reason for the ESP8266 port not requiring ESP8266Audio but the ESP32 requiring it?

tfry-git commented 3 years ago

That comment was before support for the ESP32 was added to Mozzi (very recently). Neither port requires ESP8266Audio. Only the code the OP seemed to have in mind, did. The problem about a license clash if using both libs in the same project still stands.

sensorium commented 3 years ago

Hi, it's taking a while but I've been looking at licenses and I don't really understand how a dual license works, or how to present it with a project. Is there an example somewhere? Thanks...

wyan commented 3 years ago

The cases I know are products which are dual licenced GPL and a commercial licence. In those cases the customer can decide to use the GPL version for free, or, if they need to use the product in a commercial product that they don't want falling under the GPL, pay a licencing fee to obtain a non-GPL version. Some GPL products are kind of dual licenced as well, as they are licenced under "Version 2 of the GPL or any later version", at the choice of the user.

tfry-git commented 3 years ago

I believe the standard procedure is to provide separate license files (i.e. LICENSE.GPL and LICENSE.CC-BY-NC-SA) for the respective "standalone licenses". Then you'd create a third file LICENSE which contains something like

This work is dual-licensed under the terms of the CC-BY-NC-SA or alternatively under the terms of the GPL 2.0 (or any later version). Copies of these are distributed with the Mozzi sources as LICENSE.GPL and LICENSE.CC-BY-NC-SA, or can be found at upstream-license-url. You may use Mozzi according to either of these licenses as is most appropriatefor your project. (For - paid - commercial licensing options contact @sensorium.)

That short text (refined at bit) what also be included in the places where the license is stated right now, importantly file headers and README.

See also https://softwareengineering.stackexchange.com/questions/181040/how-to-document-a-dual-open-source-license , which has further variants and links to examples.

eclab commented 11 months ago

I just posted here as well: https://github.com/sensorium/Mozzi/issues/208

In short: CC-BY-NC-SA is not only NOT a proper open source license, it is fully incompatible with GPL and almost certainly incompatible with LGPL. The Arduino top-level is LGPL and certain other elements are GPL.

This means that in all probability it is a license violation to use Mozzi in an Arduino project. That ain't good.

A dual license won't cut it: you simply cannot use CC-BY-NC-SA with the Arduino. Please relicense Mozzi with a proper open source license, I personally suggest Apache 2.0, but GPLv3 would work fine.

tfry-git commented 11 months ago

To clarify, I do not see a reason why it should be illegal to use an LGPL licensed lib from within Mozzi or to use both Mozzi and an LGPL lib in a project. The latter would then have to inherit CC-BY-NC-SA, though.

Things that do not currently work (and I agree, that is bad):

I will add that "non-commercial" may in fact not be the boundary that really counts: Suppose you want to sell a fully open (hardware+software) DIY-kit for a customizable synth based on Mozzi. That's not currently allowed. My feeling is that "open" is the important thing, not "non-commercial".

Finally, yes, dual-licensing (or triple-, quadruple-) does help. It allows the user to pick the suitable license among the offered options. Should any of the offered licenses not be usable in the resulting combined work, this is not a problem at all: Dual-licensing means to allow a logical "OR", not force a logical "AND".

In fact, should the decision be to move to GPL, dual-licensing will be mandatory, in order not to break existing (law-abiding) projects which are forced to use CC-BY-NC-SA, and may or may not be capable of switching. (Should the decision be to move to LPGL or APACHE/BSD, whatever, it would not be strictly necessary to keep CC-BY-NC-SA among the set of licence options).

eclab commented 11 months ago

The main problem with CC-BY-NC-SA (as a project) + LGPL(as a library) is not that LGPL is viral, but that CC-BY-NC-SA is viral, and also that CC-BY-NC-SA is not an open source software license and so does not properly use open source terminology. This winds up causing a major problem.

CC-BY-NC-SA summary says that if you "If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original."

The CC-BY-NC-SA license proper says "Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor." Because it doesn't address it, it's not clear if linking a library is adapting the project. (It does explicitly explain it in the context of movies and music though!)

Because it doesn't explain what "build upon" or "adapt" means in a coding context, we must interpret it broadly. A reasonable interpretation is that if you link an LGPL library -- such as the Arduino library -- to your CC-BY-NC-SA project, you have "built upon" or "adapted" the project. But that requires changing the LGPL code's license to CC-BY-NC-SA, which is not permitted.

GPL + LGPL work because there's a special cutout in LGPL for it.

Apache + LGPL or BSD + LGPL or MIT + LGPL or CC0 + LGPL work because they don't change LGPL.

As to dual licensing. I don't think it's fair to developers to say "you can accept either of these licenses, even though one of them violates Arduino's license". That's kind of like saying "you can buy a product at my shop, or you can shoplift and go to prison, either is fine." Well, only one is fine. It's a disservice to users who don't know better to suggest an invalid license as an option.

It is reasonable to say "this code is licensed under GPL (or whatever) but you can negotiate with me for a different license." But there are some gotchas that must be observed as I mentioned earlier.

Now both CC-BY-NC-SA 4.0 and CC-BY-SA 4.0 have options to relicense under a "compatible license". CC-BY-SA 4.0 can be relicensed to GPL. But at present there is no compatible license for CC-BY-NC-SA, because it is noncommercial.

tfry-git commented 11 months ago

I believe, we're drifting away from the (valid) topic, but:

But that requires changing the LGPL code's license to CC-BY-NC-SA, which is not permitted.

No, it does not. It requires using CC-BY-NC-SA as the license of the derived work, which is allowed by the LGPL (assuming no modifications in the LGPL-code, itself).

eclab commented 11 months ago

I appreciate the argument but respectfully disagree with it.

First to nitpick, CC-BY-NC-SA does not use the term "derived work", but uses the term "Adapted Material", notionally "derived from or based upon" the "Licensed Material" (unfortunate because "derived work" is well defined by the US Copyright Office).

In v3.0 of the licenses, there was an exception carved out for collections. That exception does not exist any more in 4.0, and instead it just says "translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor". This verbiage is clearly intended for things other than code. Indeed "Performances" and "Sound Recordings" are also considered adapted material.

In the process of compilation, the licensed code is translated and transformed, and in the process of linking, it is also arranged with the library code. Whether this falls under the Adapted Material clause is not clear, though the GPL has historically argued that linking is transformation.

The fundamental problem is that CC-BY-NC-SA was not meant for code, and so it has legally murky and unspecific language which can be interpreted in different of ways when it comes to linking etc. The common safety guidance for reading licenses is to assume the broadest scope. I argue that CC-BY-NC-SA should be considered incompatible with LPGL because of its viral nature and the murkiness of its text.

Mozzi simply needs a better license.

tfry-git commented 11 months ago

Mozzi simply needs a better license.

I don't disagree on that.

Regarding compatibility with (LPGL) Arduino core/license, see their FAQ: https://support.arduino.cc/hc/en-us/articles/4415094490770-Licensing-for-products-based-on-Arduino : "If you developed a sketch based on Arduino and you want to publish it as an open-source project in source code form, no restriction applies."

(As, however, Mozzi does impose restrictions, CC-BY-NC-SA is currently the only possible license available, in this case, as things stand. As for your - far reaching - theory that this would somehow need to extend to the upstream LGPL source code, too, do differentiate carefully, between what CC-BY-NC-SA calls "Adapted Material" and the more narrow scope of where "Adapter's License" is imposed.)

As for distribution in compiled form, this is in fact more complicated (but not impossible, IMO), and some (but not all) of this complexity would be eased by a different choice of license.

eclab commented 11 months ago

It's worth mentioning that the FAQ statement does not apply to Mozzi projects: CC-BY-NC-SA is not an open source license by OSI standards, and since it is viral, your project is likewise not open source. It may be free, but this FAQ item would not apply to it.

tfry-git commented 4 months ago

Mozzi 2.0 moved to LGPL. Closing.