I have a library that I want to offer under a dual license: GPLv3 and commercial. GPL so others can read, maintain and modify if they share their changes. And commercial for businesses making money with the library, so I can sustain its development.

For normal libraries, this would be perfectly captured by the above dual license. Because businesses don't want to open source their code, which the GPL would force them to do, they will buy the commercial license.

The problem is, due to the special nature of my library, there is a loop hole: My library does not require its users to sprinkle references to it all over their source code. They can easily separate those parts that link to my library from the rest of their application, which does not. The reason this works is that the "rest" part does not link to the "library" part. Only the other way round.

The easiest solution would be if I could say "You may use this library under the GPL for non-commercial purposes. For all other uses, a commercial license is required."

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

"My library does not require its users to sprinkle references to it all over their source code." - This does not matter at all. If someone copies parts of your code into their product, or makes a derivative work from parts of your source code (e.g. compiling source code into a binary), then they must follow your license. On the other hand, simply referring to something does not create a derivative work. E.g. I could say "import microsofts_closed_source_proprietary_library" in a Python script, for example, but not redistribute said library.
– BrandinSep 28 '18 at 4:46

@Brandin It doesn't matter for another reason. If something is required to use a work then it cannot possibly infringe on the work's copyright. Fair use includes ordinary use which includes anything necessary for ordinary use.
– David SchwartzNov 1 '18 at 9:39

2 Answers
2

The GPL does not allow you to add a non-commercial restriction.[1] While you can create such a license it will not be the GPL and incompatible with the GPL and possibly other licenses. In particular, such restrictions go against the Open Source Definition and the Free Software Definition. As a consequence, your library will not be usable by the open source ecosystem.

Defining commerciality.

Aside from philosophical concerns about what free and open source software is supposed to be, a non-commerical restriction has the practical problem that it is really hard to define commercial use. Any definition will either be too vague or too specific, will leave loopholes or accidentally outlaw intended uses.

A classic example for the commercial – non-commercial distinction is use by a non-profit organization. Consider these examples:

The software provides spreadsheet functionality, and is used internally by a charity for children with cancer to organize their fundraiser. Is this use commercial?

The software implements an Amazon Dash style button, but for donations to the Red Cross. Is selling and using this button non-commercial?

There are existing non-FLOSS license attempts to define non-commercial use.

The Creative Commons BY-NC 4.0 license defines non-commericial as “not primarily intended for or directed towards commercial advantage or monetary compensation” which is fairly vague and possibly outlaws intended uses, such as users being allowed to profit from their own modifications.

“Sell” means practicing any or all of the rights granted to you under the License to provide to third parties, for a fee or other consideration (including without limitation fees for hosting or consulting/ support services related to the Software), a product or service whose value derives, entirely or substantially, from the functionality of the Software.

While this is less vague this is extremely broad. For example, getting paid to contribute to your software might be disallowed. On the other hand this still allows products that do not derive their value “entirely or substantially” from your software, and it allows internal use by a for-profit entity.

Because of these difficulties, it is important to think very carefully about your licensing goals. Possibly, open source licensing or a pseudo-open license is not a good fit for your requirements. You may be more interested in an explicitly non-free “shared source” model where other people can read the code, but development stays under your control. In contrast, the (A)GPL can be summarized as “any use is permitted, as long as the source code of any published version is available (possibly with modifications), and downstream users are not deprived of these rights.”

It turns out that the (A)GPL is very unattractive for many commercial use cases so that you can sell commercial licenses. Consider Qt and iText for projects with this strategy. Note that those are libraries. In contrast, commercial use of unmodified applications is not hindered by the (A)GPL.

One reasonable opinion is that using a GPL library in a software project cannot extend the GPL license to the complete software, because the other source code in that software is not derived from the GPL'ed code. However, the resulting software is derived from both GPL and non-GPL code.

To distribute this software you must comply with the GPL license, which requires the Corresponding Source of the software to be available under the GPL. This indirectly requires any other components to be available under the GPL or a compatible license (such as MIT). This e.g. implies that a GPL'ed software cannot use proprietary libraries, unless the copyright holders of the GPL'ed software provide an exception for that library.

With this argument, it is irrelevant whether a GPL library is called by other software, or a GPL framework calls a differently-licensed plugin. However, no obligations if the GPL'ed code isn't distributed. For example, it is possible to build proprietary software with a GPL'ed build system such as autotools, as the built artifacts do not contain any GPL'ed code.

Some people disagree with this argument, but insist that a software that includes GPL'ed code is not derived from the GPL'ed code. Then, no obligations arise to publish any code except for the GPL'ed parts themselves. Under that interpretation the GPL and LGPL are equivalent, possibly even weaker. While this interpretation has merit it is not mainstream in the open source community. From a risk-management perspective, it would be unwise for a company to rely on this argument.

[1]: In section 7 of the GPLv3: “All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term.”

That is not possible in the United States. In the United States, everyone who lawfully acquires a lawfully-made copy of a work has the right to use it however they want as a right of lawful possession. You cannot offer someone a license that takes away rights they already have, they'll simply refuse the offer and use the software however they want because they already have that right as a right of possession. See 17 USC 106 for the things that require a license such as modification, distribution, and public performance. You'll see that mere use of a work is not on that list.

Imagine if you bought a book and inside it was a "license" page that said that you could not read the book on Thursdays. You would simply refuse to agree to this license. You already have the right to read the book because that is ordinary use of the book and is a right of lawful possession. An offer you don't accept can't take away any rights you have or impose any obligations on you. So you'd need some mechanism other than a copyright license.

Note that many uses of software, especially software libraries, involve creating derivative works which is prohibited without a copyright license.
– Bart van Ingen SchenauSep 29 '18 at 8:16

@BartvanIngenSchenau This is not correct under US law. As I explained in the answer you are replying to, the right to the ordinary use of a work is a right you have merely by lawfully possessing a lawfully-made copy under US law. A copyright holder cannot try to claim that ordinary use can be prohibited without a license, it necessarily flows with lawful possession. The choice not to require a license for the ordinary use of a work is fundamental to the way copyright law works in the United States, regardless of what that ordinary use consists of.
– David SchwartzSep 30 '18 at 2:04

Please give a reference to where a judge ruled that one of the exclusive rights mentioned in 17 USC 106 was superseded by a claim to "ordinary use" without a license grant. Without such a ruling, I stand by my belief that "ordinary use" can not include one of those exclusive rights.
– Bart van Ingen SchenauSep 30 '18 at 8:48

There's a long of cases holding that the ordinary, expected use of a work by the owner of a lawfully-made copy is always fair use. If ordinary, expected use isn't fair, what is? You can see this thread running through cases like Sega v. Accolade, Atari v. Nintendo, and Assessement Tech v. WIREdata. There is at least one case that explicitly says that ordinary use is necessarily fair use, but I don't have the cite offhand. Can you find any case where ordinary, expected use of a work by the holder of a lawfully copy was held to infringe?
– David SchwartzOct 1 '18 at 13:53