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


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:


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.


obtaining a licence Is, unless the state is involved, always some kind of contract. The licensing agreement if the rulling contract in this case.

You don't even have to use the software, often installation is the moment you are prompted with the terms, and continuing the installation at that point has you agreeing to the contract - which is binding.

The only way to not be bound by the GPL is by not using the GPL-bound software in any way: you may not, in any way, use any package, not download it, not even display the code and copy that. You may not use any of the code that is under that license.

  • Thanks. However, as I stated above, I can build "my" software without installing / downloading the GPL-licensed library. Am I right to assume that in this case, I am under no obligation to license my software under the GPL, since I never accepted any license agreement? – Lukas Barth Jun 10 '20 at 12:35
  • @LukasBarth No, you can form a binding contract by use of a software or a website. For example, you form a contract with Stack Exchange that grants SE a license to display your questions by using the website. – Trish Jun 10 '20 at 12:37
  • Sure - but if I never used any part of the library or its website myself, that should mean I am not obliged to abide by its license terms, right? – Lukas Barth Jun 10 '20 at 12:46
  • No, if you work with a derivate it is working with the original. – Trish Jun 10 '20 at 13:51
  • 1
    I think the difference here is that the download and install is done by the end user NOT by the OP, The end user has to agree to the GPL terms but the OP never has to. The OP is NOT working with the original, the end user is . There are three different parties to conisder here, so technically there are three different contracts (Library Provider <-> OP, OP->end customer, end customer <-> library provider). – Hilmar Jun 10 '20 at 18:41

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.