3

This question revolves around the (unresolved) question in the open source community, whether "dynamic linking" against a GPL-licensed library requires your software to be GPL-licensed, as well. I will first give some background on the GPL / copyleft, and then some technical background. Third, I give a concrete example of a program in which the problem arises. Finally, I try to formulate the actual question. Feel free to skip the first two or three sections.

Since jurisdiction often matters: I live in Germany, but would also be interested in how this plays out in US law.

GPL / Copyleft

One populare software license is the GPL ("General Public License"). The GPL is a copyleft licence, i.e., it contains the passage that any software "based on" the GPL-licensed software must also be GPL-licensed. There seems to be an agreement that this can be reformulated to "any derivative work" (although the term "derivative" does not appear in the license itself). One major open question is when exactly software A is "based on" software B (or a "derivative" of software B).

Technical Background: Dynamic Linking

Almost all programs we use are not written 'in one piece', but rather pull in many reusable pieces of software, so-called libraries. The way these libraries are 'pulled in' is often termed linking. There are two fundamentally different ways of linking: Static and dynamic linking. In static linking, the software library as a whole is copied into the program during translation from source code to an executable program. The software library is thus physically part of the binary program you distribute.

In dynamic linking, the binary programm instead contains a reference to the library. Think of it as a marker in the program that says "at this point in the program, execute function xyz from library abc". When you run the program, your operating system looks up library abc, loads it into memory, and when the main program reaches the marker, program execution jumps to the program code of function xyz in library abc.

A simple, yet complete example

This example constitutes a complete Python program that could be distributed as written (with a few omissions) here. Say I have a file the_program.py containing:

from the_library import some_function

some_function()

This is a complete, runnable python program that does nothing but execute the function some_function from some hypothetic python library the_library. If I send you this (plain text) file via e-mail and you have python and the_library on your computer, you can run it.

Of course, python programs are usually not distributed via e-mail but rather via some central repository (mainly "PyPi"). To do that, I create a second file called setup.py, roughly containing:

setup(
  name="my_program",
  install_requires="the_library"
)

I would then upload these two files (and nothing else) to such a repository. If you wanted to install my program, you would (in some automatic fashion via a packet manager) download the two files, and the setup.py file tells your packet manager that it also needs to download and install the_library for my program to work.

The Free Software Foundation (who created the GPL) and many open source advocates now argue that I need to license my two files above under the GPL (assuming that the_library is a GPL-licensed library), since it is a "derivative" of the_library.

Note that at no point do I myself distribute any part of the_library. All I (resp. my code) does is include a pointer that says "you need the_library to run this". To spin this further: I could have written my program without ever downloading or seeing any part of the_library myself. That I can do that is obvious: I was able to write above code without the hypothetical library the_library even existing, and of course I could also upload this code to a package repository.

The Question

In my understanding, a software license constitutes a contract between the person providing the software and the person accepting the license to download/use the software. However, since I can build my software without ever interacting with (i.e., downloading, installing, using, …) the GPL-licensed library myself, how can I have accepted a contract with the authors of the library? If such a contract has not been closed, how can I be bound by it to license my software in any way?

"But that does never really happen!"

One might argue that in practice, I will never be able to write a software that dynamically links to some library without actually using that library myself to test my program, figure out how the library works, etc. Thus, in practice, I will always have accepted the license of the library while installing it.

However, because of this peculiarity of GPL-licensed libraries, there are replacements for some of them being developed. People try to create other (less restrictively licensed) libraries with the same interface and the same functionality, which can act as a drop-in replacement.

I might now develop my software with such a replacement, but still offer the user of the software the possibility to install the "original" instead of the replacement. Maybe the original is faster, or safer, or just ships with more operating systems. Thus, the case "I never interacted with the GPL-licensed code, but they still require me to abide by their terms" does in fact arise in practice.

2

In the USA, the GPL license is a license, not a contract. It allows you to do certain things that would be copyright infringement if you did them without a license, as long as you follow the license terms. You cannot be sued for breach of contract, but for copyright infringement.

In Germany, the GPL license is considered a contract. The US argument that a one sided contract without considerations is invalid doesn’t apply in Germany, so this is fine. It’s a strange contract because one side doesn’t require any evidence that you agreed to the contract. If a case about GPL licensed software went to court, the judge could ask you “did you accept the license” and the answer would determine whether you are accused of copyright infringement or breach of contract.

In the USA, you don’t “accept” the GPL license. It just tells you what things you are allowed to do under which condition, beyond what copyright law allows you to do anyway. You can be sued for copyright infringement, and the questions then are: did you do something not within the rights you have due to copyright law? If no, you are not guilty. Did the GPL license give you permission? If not, guilty. Did you follow the conditions of the GPL license? Yes, not guilty. No, guilty.

3
  • Thanks for the clarification! However, my original point remains, right? Just as I never accepted a (German) contract when writing my software that uses the_library, in the US model, I never did anything that required me to accept a license, right? – Lukas Barth Mar 8 at 13:36
  • There is an argument that most open source licenses involve non-monetary consideration and are therefore contracts under US law. E.g. Chestek has made such an argument (lwn.net/Articles/747563). That open source license conditions are enforceable in the US is one of the takeaways from the Jacobsen v Katzer case. However, all of this is irrelevant: OP is incorrectly focused on license acceptance, and should instead consider whether the software is a derivative work of the GPL-covered software. – amon Mar 8 at 23:07
  • I'm not sure that a licenses isn't a form of contract. If someone breaches a licensing agreement that is a breach of contract action, not a statutory copyright violation. – ohwilleke Mar 9 at 0:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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