0

I have been searching the web for quite some time now, but the plethora of opinions/comments/articles about licensing questions make it difficult to verify how trustworthy the various sources are. Also, they're often contradictory which left me behind confused after my search. Since it's probably a common situation an open-source developer faces, I guess there are people who are less confused.

The scenario: development of a python code library hosted on github that requires two other libraries pip installed on the user's system in order to work. One of which is BSD licensed, one of which is GPLv3 licensed. No modifications of those libraries are required, we just need their core functionality as available in certain versions.

1) Am I right, that even if I don't pack the required GPLv3 library into our codebas, i.e. don't copy it into our git repo, the fact that we call this libraries' classes/methods from within our code, renders our code "derivative work" and hence we're obliged to also release our library under the GPLv3? Or is there a difference between requiring some other package to be installed and shipping (a potentially modified) GPLv3'ed library with our library?

2) We can just state that the BSD licensed library is required, but that does not impose further constraints on how we license our library itself?

In brief: The BSD library is easy to list as a requirement -- does us requiring the GPLv3'ed library fall under derivative work and hence requires us to license our code under the GPLv3 as well or not?

Ideally, we'd like not to license our code under the GPLv3 but we might be obliged to. Is there a way to disentangle such code requirement scenarios in order to be free to license our core code under any license we want? What happens if we not even state any license, does "please install this GPLv3 lib on your computer" automatically render our code GPLv3'ed?

(Since it's all libraries, so just codebases, this frontend/backend distinction which may allow different licenses, won't apply here, I guess? Or can we view our library as a frontend, since the user is not required to anyhow interact with the two required libraries, i.e. they're somehow 'backend'.)

3
  • 2
    I'm voting to close this question as off-topic because it is about legal advice, not conceptual questions about software development. Feb 21, 2016 at 14:02
  • I understand your concern. However, I thought it's an everyday problem for a programmer and also the availability of tags licensing/gpl/copyright/bsd-license made me think it may be ok to ask here. Feb 21, 2016 at 15:55
  • 1
    Voting to close as unclear because more details are required to answer your question. Jörg's concern that an attorney may be required is probably correct. GPL libraries have something known as the "system library" exception that exempts dependent projects from having to become GPL'd. Likewise, how you're invoking that GPL'd library affects the final determination.
    – user53019
    Feb 24, 2016 at 0:15

2 Answers 2

1

If your library A requires another library B to be present in order to provide (part of) its functionality, the library A is a derived work of library B. This is independent of how the libraries are licensed.
So, your library is a derived work of both the GPL library and the BSD library.

The main difference between the GPL and BSD licenses here is that the GPL license puts restrictions on how a derived work can be licensed whereas the BSD license does not have such restrictions.
The restrictions in the GPL license are simply that a derived work must be available under the same terms as the original, which effectively means that you have to use the same license.

For the GPL license, it does not matter how the end-user gets a copy of all required libraries. If one of the libraries is licensed with the GPL license, then all libraries and programs that depend on it for their functionality have to be licensed under the GPL as well.


To get out of the infectious nature of the GPL license, you have to communicate "at arms length" with the GPL code, which effectively means

  • you can't depend on internal details of the GPL code
  • there must be a (semi-)standardized protocol to communicate with the GPL code (calling a program with command-line arguments can already satisfy this).
  • The end-user must be able to replace the GPL code with a different (compatible) version or other equivalent code.

This almost always requires the GPL code to be running in a separate program.

4
  • Thanks for the clarification of what constitutes derivative work. So we would need to release our library with a non-GPL replacement (that may result in worse performance or less features of our library, as amon points out in his answer) that can easily be swapped for the GPL one by the user? However, to do so we would already need to develop that replacement before releasing our library for the first time, since we cannot later on replace that required GPL library and then change the license of our library to BSD or the like -- is this right? Feb 21, 2016 at 16:02
  • You can re-license your library if you remove the GPL dependency at a later time, but that will then only be for the versions released from then on. Once you have released something under license A, you can't retroactively change that. Feb 21, 2016 at 17:34
  • How come this can be done? Wouldn't the later version (non-dependent on the GPL anymore) be derivative work of the GPL'ed earlier version and hence be required to be released under GPL again? Or is there a difference between the copyright holder and some other doing this while everyone is allowed to reuse etc by the GPL, only the copyright holder can re-license? Feb 21, 2016 at 17:54
  • There is a difference between the copyright holder and others. Only the copyright holder is allowed to change the copyright license. Feb 21, 2016 at 19:26
1

The GPL is written with the understanding that code that links to the GPL code also falls under the GPL since it is a derivative work. This understanding might not be correct, but you probably don't want to be involved in a case where that is tested in a court. From the perspective of the GPL, it does not matter how you depend on the GPL code (e.g. if you deliver the dependencies or ask users to install the libraries). In any case, you depend on the GPL library and therefore have created a derivative work.

The “usual” solution is to break this dependency. Instead of relying on the GPL library, you create your own library that does the same thing (but might not be very good). You can then distribute your software with a dependency on this helper library. However, you can be clever and structure this dependency as a plugin. While by default you depend on the non-GPL plugin, you can also create a GPL plugin that uses the GPL library. This plugin can be distributed separately, and can be installed by users if they prefer it. While the GPL plugin may provide better performance or more features, your system will still have to be usable with the default non-GPL plugin, or you'd have an indirect dependency on the GPL code. Note that the plugin interface has to be sufficiently generic, and not just a rip-off of the GPL library interface!

The specifics of this are possibly difficult to work out, so it would make sense to re-read the GPL carefully and go over this plan with a lawyer (which I am not).

2
  • So the question basically becomes one of how much our libraries' functionality may be restricted by using only the (extra for this purpose coded) helper library, i.e. what exactly 'still usable' should mean for this 'trick' to circumvent GPL viral nature. Feels like a very grey area there, so I see why one would need a lawyer for the exact workings -- are there some prominent examples how this is done in practice? (Also see the comment to Bart van Ingen Schenau's answer that is somehow related.) Feb 21, 2016 at 16:06
  • @user3839103 The GPL FAQ has a section about GPL plugins to non-free programs and about non-free programs that are designed to load GPL plugins.
    – amon
    Feb 21, 2016 at 16:16

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