7

I'm trying to understand exactly when a work becomes a "derivative work," and how it affects licensing of my project. In my situation, we have a scientific code that we have written which is licensed under the MIT license. It uses the GNU Scientific Library (GSL) which is licensed under the GPLv3 (specifically not the LGPL). It is obvious to me that, once compiled and statically linked, the resulting binaries (and subsequently their source) must be distributed under the more restrictive GPLv3. However, we never distribute any binaries or any source licensed under the GPL. Therefore my question is:

Can I license and distribute source code under the MIT license which requires a GPL'd library to compile if I do not include anything derived from the GPL'd library? That is, does the dependency on a GPL'd library only "kick in" once compiled/linked into a binary? Or does the dependency itself mean that all source files which need to be linked with the GPL'd library need to be under the GPL as well?

I found the following questions before but they don't seem to quite answer my question:

1
  • Your 5th link is not actually related to this question - all the licenses in that question are permissive, and the attribution requirements only kick in if the library is distributed.
    – Max Xiong
    Sep 18, 2020 at 2:08

3 Answers 3

2

While other posts here make excellent points, the FSF's line is not that your code, written to be linked to a GPL library, must be released under the GPL. They require only that (a) the combined work, if released, be released under the GPL in its entirety, and (b) your work, if released separately, be released under the GPL or a GPL-compatible licence. They have always been clear that you can give away more rights to your work if you wish to, for example here, when they write

If a library is released under the GPL (not the LGPL), does that mean that any software which uses it has to be under the GPL or a GPL-compatible license?

Yes, because the program actually links to the library. As such, the terms of the GPL apply to the entire combination. The software modules that link with the library may be under various GPL compatible licenses, but the work as a whole must be licensed under the GPL.

So while your work is (to my mind) definitely a derivative of the GPL library, when it is distributed on its own I would argue strongly that you are fine to distribute it under a permissive free licence if that is what you wish to do.

I note that there is then some danger that a third party comes along, removes the GSL calls from your code and replaces them with their own, then locks up the resulting product with a proprietary licence. If you use the GPL for your code it avoids that risk.

0

The FSF (owners of the GPL licenses) take the stand that by writing programs to the API of the libary creates a derivative work, that thus must be distributed under GPL. As far as I know (IANAL, even less one versed in copyright law and open source licensing), there are no legal precedents on the point.

Case in point is the (GPLed) readline libary. For quite some time, linking to it from non-GPLed programs was forbidden, until the drop-in replacement (BSD licenced) editline showed up.

4
  • I guess this is what people mean about the GPL being “viral” — since someone somewhere might download my code and link it to something GPL-licensed, I am required to license my own sources under the GPL rather than something more permissive.
    – kc9jud
    Sep 19, 2020 at 3:20
  • @kc9jud, that is by GPL's design.
    – vonbrand
    Oct 8, 2020 at 7:43
  • 1
    when did the situation change with readline? Now it just requires a GPL-compatible license, rather than specifically the GPL.
    – kc9jud
    Oct 9, 2020 at 2:09
  • 2
    "since someone somewhere might download my code and link it to something GPL-licensed, I am required to license my own sources under the GPL" nobody here has said that. If it were true, nothing could ever be released under any free licence other than GPL, which is patently not the case.
    – MadHatter
    Jun 29, 2022 at 7:46
0

The makers of GSL are clear about their intentions. GSL is licensed under GPL v3 and they explain clearly how and why they want to have it.

The way GSL is integrated and works in programs is intimate, anything that builds on GSL is a 'covered work' as defined in GPLv3. The makers of GSL have not added a 'Linking Exception' to the license.

The fact that you are not distributing the GSL yourself, but you are depending on it --in the absence of a Linking Exception-- does not provide you with a way out of your obligations. Your software will also have to be licensed under GPLv3 as soon as it is compiled. I do not see any way out, these are the terms, take it or leave it.

If you only distribute the source code of your software and you see the need for licensing it under a license other than GPL, then I suggest you dual-license it with GPL (making it clear that the compiled software would be) and another license of your choice which fits your additional needs on top of what GPL can do for you. Please be aware that this addnl license might add confusion among the recipients, and a simple GPL license statement would be much clearer.

If the code is all yours, and you are concerned about your own usage of your code after you published it under GPL, then you can be relaxed. You can re-license your own work at any time, see the questions here and here.

4
  • Can you address how a GPLv3-compatible license is insufficient? @MadHatter helpfully points to the FSF's FAQ: gnu.org/licenses/gpl-faq.html#IfLibraryIsGPL
    – kc9jud
    Jun 29, 2022 at 14:13
  • @kc9jud I believe this detail does not add meaningful options for you. When you look at the typical code examples here you see the statement #include and when you use this --BINGO-- you have a combined work as soon as a compiler looks at it. So why care? It is easy to use GPL. If you actually see the need for another license other than GPL, then I suggest you look at dual-licensing. I will add a note to my answer. Jun 30, 2022 at 8:46
  • Yeah, I have no doubt that, immediately upon compilation/linking, the combined work is derivative of the GSL. Why I care? Many HPC vendors have a policy that they refuse to work on code which is GPL licensed, so licensing my code under the GPL means forgoing any support from the supercomputing centers where I need to run my code. The supercomputing centers' staffs themselves are forbidden from contributing to GPL code as well.
    – kc9jud
    Jun 30, 2022 at 17:21
  • Again, I have no doubt that the combined work is necessarily licensed as GPLv3 -- the question is whether every compilation unit, whether or not it calls GSL, needs to be individually licensed as GPLv3, or simply something compatible with GPLv3, if it may eventually be linked to GSL.
    – kc9jud
    Jun 30, 2022 at 17:25

Your Answer

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

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