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](https://opensource.stackexchange.com/questions/1187/what-are-the-arguments-for-considering-dynamic-links-to-constitute-derivative-wo) 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.