But again, if my program doesn't directly include any code at all from a GPL work, but it does depend on such code to exist on the end-user system, knowing in what circumstances my code is a derived work and thus can only be distributed under the terms of the GPL is much harder.
This is exactly the case of the kernel modules: the people distributing the kernel modules are often NOT distributing Linux itself. But, can their modules be considered derived works of the Linux kernel?
Note that this kind of question can also arise in traditional copyright. I can make a play that very much resembles a novel, and depending on many ultimately subjective factors my play may or may not be considered a derived work of that novel. If I am directly including substantial parts of the novel, then the answer is pretty clear, but a work that doesn't have a single word of the original can still be a derived work (most obviously, a translation is a derived work, but it likely literally doesn't include a single word in common with the original work).
In the US, a derivative work has a legal definition in Title 17 of the United States Code, and anything that is purportedly a derivative work that doesn't clearly fall under the legal definition or established common law on the subject is of little matter. Lawyers love to engage in wishful thinking on behalf of their clients and rarely get anywhere because they are not neutral arbiters but rather advocates for a one sided position of one kind or another.
In this case FSF associated lawyers appear to be completely out of touch with reality, but are incredibly influential in persuading others to be equally out of touch. And what more could you ask of an advocate for your position than that? A reality distortion field for hire.
This used to be true, but arguably the GPL has been tested in court in the infamous Oracle v Google case. (Java is licensed under the GPL among other licenses)
It looks like the Supreme Court said "sure... whatever, Fair Use, I guess". Are APIs copyrightable in general? God knows. But at least you have a case from a top court deciding that in some cases you can actually copy all the APIs in a GPL'ed Java library.
Totally agree with FSF making stuff up though. The reality distortion field they have is pretty legit. I don't think people even realized how the Java case could have impacted the interpretation of GPL and that it was actually a high profile allegation of GPL violation.
Oh well shrug
If loading and running a program with dynamically linked modules with incompatible licenses creates a legally prohibited derivative work in memory, that is a reasonable claim that the author copyright holders of some of the code could pursue the users in question about. That is not what is controversial though.
The controversial claim is that by merely making a module that is link or use compatible with another module a legally prohibited derivative work has been created. Not by incorporating inline code, or copying the structure, sequence, or organization of another module, but merely by making something that is compatible in the abstract. Where is the legal basis for this claim? It is apparently nowhere, little more than wishful thinking.
That's part of my point actually. The question of API copyrightability in the Java case has a lot to do with whether copying APIs/ABIs in the code (whether from headers or binary symbol tables) is copyright infringement.
That said, it's unfortunately true that the conclusion is far from clear. (Sidenote -- given that the Supreme Court dodged the question, does it mean that the Court of Appeals decisions still hold? [I'm not familiar with the US legal system])
Court of Appeals decisions are only binding precedents within the corresponding regions, but they generally have persuasive force throughout the country until and unless the Supreme Court overrules them.
But then, it's the Supreme Court so nobody's gonna fail their papers...
The whole trial also stopped at the copyight-ability and fair-use grounds, it never looked at any license Google might have had (they didn't have any license to use the Java API, but the SC finally found that no license was needed, as even if the API may be copyrightable, Google's use would fall under fair use exemptions).
Why should anyone be persuaded by a legal position that has internal logic that has never been explicated anywhere? If lawyer A writes to lawyer B claiming that B's client is creating a derivative work but cannot explain why, lawyer B is more than justified in laughing them to scorn.
Even if B did create a derivative work according to some unknown and unheard of legal argument acceptable to the courts, fair use could apply anyway. But one can hardly begin to look at the fair use factors if lawyer A could not even identify how a legally cognizable derivative work is being created in the first place.
That is an interesting question that have a handful court case in the US, however the result has gone both way. The primary example of that has been cheat software that injects into copyrighted games, which both goes again the copyright and EULA of the game. In the example of blizzard, there is cases when they won against the cheat software on copyright grounds, as you can read here: (https://massivelyop.com/2020/02/28/lawful-neutral-cheating-c...).
Basically, the art of work that get created when you run software is also a kind of copyrighted work, and a bit like how movie character is copyrighted as well as an actually movie itself. If a second company make a new movie with the same characters, story and so on, even if its all "original" code, it is still a derivative work. The article above describe those as "non-literal elements", the graphics, sounds, animations and characters produced by the literal code.
So to answer the question "when is my program a derived work of a GPL work", it would seem to be when the non-literal elements of the GPL is changed in ways that require copyright permissions by the GPL author.
It should be noted however that in practically all cases involving the linux kernel, companies that distribute non-gpl kernel modules are also distributing the kernel as part of products.
Now let's say you do have a license, and the license is GPL. The license says that you have permission as long you do not combine the library using a linker with other programs that is not GPL. Do you have permission to copy the work if you disregard the conditions of the license? Likely answer: no.
Copyright do have a few exceptions. If you bought a copyrighted work like say Microsoft Word, there is an exception that says that you can also make a copy in memory in order to run it. Copyright law in some countries needed to be updated to do this, while in other places it occurred through precedents, but it was something that needed to occur. There might also exist a similar exception for running the program under Microsoft Windows, including using libraries called DLLs. Exceptions to the exclusivity of copyright is sometimes needed in order for the world to make sense.
The legal question then that remain is if the situation with FictitiousLibC has such an exception. That is less certain. There might be a copyright law exception, or there might not exist. What do you think?