I have been reading up on Open Source licensing, but there is this one term that I think needs clarification: when is work derivative?

If I have an image viewer that accepts a ZIP file and I decompress it with an open source library under Creative Commons licensing, then I see two possible interpretations of the terms:

  • Adaptations that I make to the ZIP file library should be shared with the world.
  • I need to share my entire application with the world.

Before answering with "copyleft owns all" or marking this as a duplicate, I would like to stress that the point of the question is that the remainder of the application is not attempting to solve a ZIP problem. The domain changes. It is assumed that if I have to solve some ZIP bugs in the original library, then those bug fixes should be shared.

For instance, here on Stack Overflow, every submitted code is licensed under Creative Commons license. However, if I have a problem and then get a response containing code, but find that I have to tweak it a bit in order to properly solve the stated problem, I think it would be practical that the "ShareAlike" caveat be solved by me sharing the end result in the same thread. Not my entire application, but the best possible answer to the problem.

I think clarification of these terms is the key question regarding open source licensing, and I can't see it addressed anywhere. If I use a matrix transformation math library and I expand upon it and then use it in a biology categorization algorithm, I would say that my extension to the matrix library is "building upon"/"derivative" work (and subject to licensing terms), whereas the biology code isn't.

Have I missed somewhere where this specific question has been addressed?

  • 1
    As the existing answers don’t go into this, as a warning: Your interpretation of the ShareAlike requirement when tweaking code from Stack Overflow answers is incorrect. 1) You aren’t required to share your fix in the answer. 2) You are required to license your application under CC BY-SA 3.0 if you have integrated the code (whether unmodified or modified) (and if you distribute it), assuming that the code from the answer is eligible for copyright protection.
    – unor
    Jan 15, 2018 at 16:47
  • "If I have an image viewer that accepts a zip file and I decompress it with an open source library under creative commons licensing..." - An easy answer is not to use software under Creative Commons in your program. Use software licensed under a license that is designed for software and makes it clear what the agreement is. For example, an LGPL library makes it clear what you need to do to use that .zip library in your (e.g. proprietary) product without causing your product to be considered a derivative work (according to the authors of the GPL license).
    – Brandin
    Jan 16, 2018 at 10:15

4 Answers 4


The concept of a derivative work isn't a software concept, nor a Creative Commons one - it's fundamental to the idea of copyright, preceding the invention of programmable computers by many years. The Imperial Copyright Act of 1911, for example, reserved (inter alia) to composers the sole right of adapting their compositions for use upon mechanical instruments, which to me is a clear example of control of derivative works. The question of what constitutes a derivative work is also not one with a single, settled answer, as it varies from jurisdiction to jurisdiction, and it varies over time as case law helps to nail down the edges. Also, IANAL/IANYL.

That said, it's reasonably clear and well-accepted that if you start from someone else's codebase to build your code, or you include a substantial chunk of someone else's code in your code, your work in its entirety becomes a derivative of theirs. You will need permission to do this, and if you get that permission by means of a copyleft licence, you may need to fulfil certain conditions.

If you write code that forms part of an executable program by statically linking into someone else's library, the question of whether your work is a derivative of theirs is less clear-cut. If the linking is dynamic, it is even less clear; we have summaries of the arguments for and against. But if your work is a derivative of theirs, then it is so in its entirety.

You ask whether you create derivative works

if I use a matrix transformation math library and I expand upon it and then use it in a biology categorization algorithm

I agree that your improved library is very likely a derivative of the original library code, but since you don't say how you would use it in the biology algorithm (by which I assume you mean an implementation of an algorithm, since algorithms themselves probably aren't copyrightable) it's impossible to speculate about derivative status.

  • The history lesson was clarifying in why something so central to software development lacks a clear software definition. This has seemed very counter productive to me. So thank you for that. My math example was meant to illustrate a clear cut distinction in problem domain. Me expanding upon matrix library by adding implementation of mathematical matrix operations would seem "derivative work" to me. Not the biology application. Consider music in a movie. Assume there is an objective standard for improving music. I improve music for my movie. The music is derivative. The movie, AFAICT, isn't.
    – Tormod
    Jan 15, 2018 at 17:24
  • I accept this isn't obvious to you, but the subject distinction has no bearing on whether the work is derivative: the biology application is derived from the matrix library if it includes non-trivial amounts of code from the library. It may also be derivative if it merely links to the library; I would certainly consider it so. But since you still haven't told us how the library code is used in the biology application, it's hard to give any further advice. I'm glad you found the historical perspective useful!
    – MadHatter
    Jan 15, 2018 at 22:22

The question of what legally counts as a single derivative work, as opposed to a collection of separate works, is in fact mostly a red herring in this case. The reason for this is that, as long as your software includes any part that has been created by another person, or recognizably derived from something created by another person, you will need that person's permission to distribute it.*

Usually, in the Open Source world, that permission will come in the form of a written license — and the license will specify the conditions that you must abide by, in order to be allowed to distribute your software (or, rather, the parts of your software whose copyright belongs to the licensor and is covered by the license):

  • If the license requires you to credit the original author of the code, you must do so, or not distribute the code covered by the license.

  • If the license requires you to release some of your own code under the same license, you must do so, or not distribute the code covered by the license.

  • If the license requires you to release all of your own code under the same license, you must do so, or not distribute the code covered by the license.

  • If the license requires you to translate your documentation into Lojban and post it on Usenet, you must do so, or not distribute the code covered by the license.

  • If the license requires you to stand on your head for 5 minutes every Friday, while meditating upon the meaning of the word foobar, you must do so, or not distribute the code covered by the license.

Of course, some of those demands are more reasonable than others, but the person who holds the copyright to the code you're using is allowed to make any of them,** as a condition of allowing you to redistribute their code (or a derivative of it). Your options, meanwhile, are basically Hobson's choice: take it or leave it.

If the original author has released their code under multiple alternative licenses, then of course you only need to comply with (at least) one of them. And even if they haven't, you do always have the option of contacting the copyright holder (or their heirs, should they have become, um, permanently unreachable) and asking to negotiate a new license agreement with terms you find more agreeable. Of course, they always have the option of saying no.

*) The main exception to this is that, if your use of the other person's work is covered by fair use or other similar permissions granted directly by applicable law, then you're not actually infringing the other person's copyright, and therefore do not need their permission.

**) Depending on local laws, a court might rule some requirements in a license to be illegal or unenforceable. For example, I'm pretty sure that a license that only allowed e.g. white heterosexual males to use and redistribute the software would fall foul of anti-discrimination laws in many if not most jurisdictions. What actually would happen at that point is a complex matter of local law, license wording and judicial discretion, but basically, while it's possible that the court would simply strike out the offending restriction, it's just as likely that they might rule the whole license to be void, thereby preventing anyone (except the original author) from legally distributing works licensed under it.

"Copyleft", "ShareAlike" or "viral" licenses, which require your work to be released under the same license terms as the original work you've used as part of it, generally define more or less explicitly how broadly this requirement is meant to be interpreted. For example, the GPLv3 contains the following wording:

5. Conveying Modified Source Versions.

You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: […]

  • c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.

[…] A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

This does not actually explicitly define what counts as a "work" (and no such explicit definition appears elsewhere in the license, either), but the last paragraph does explicitly exempt "aggregates" of independent programs from the Copyleft aspect of the GPL, which strongly implies that the authors of the GPL did intend it to cover any combined works that include a GPLed component and which do not meet the definition of an "aggregate" quoted above.

In particular, while IANAL, I'm fairly sure that the "separate and independent" and "not combined with it such as to form a larger program" clauses are enough to disqualify your image viewer from being an aggregate as defined by the GPL. Thus, using a GPLed zip library (with or without modifications) in your image viewer would force you to abide by the terms of the GPL (including, but not limited to, its Copyleft requirements) when distributing your image viewer.

The GPL FAQ also includes some relevant statements (which, while not actually part of the license, a judge might well take into account in interpreting the intent of its authors), including the following:

What is the difference between an “aggregate” and other kinds of “modified versions”? (#MereAggregation)

An “aggregate” consists of a number of separate programs, distributed together on the same CD-ROM or other media. The GPL permits you to create and distribute an aggregate, even when the licenses of the other software are nonfree or GPL-incompatible. The only condition is that you cannot release the aggregate under a license that prohibits users from exercising rights that each program's individual license would grant them.

Where's the line between two separate programs, and one program with two parts? This is a legal question, which ultimately judges will decide. We believe that a proper criterion depends both on the mechanism of communication (exec, pipes, rpc, function calls within a shared address space, etc.) and the semantics of the communication (what kinds of information are interchanged).

If the modules are included in the same executable file, they are definitely combined in one program. If modules are designed to run linked together in a shared address space, that almost surely means combining them into one program.

By contrast, pipes, sockets and command-line arguments are communication mechanisms normally used between two separate programs. So when they are used for communication, the modules normally are separate programs. But if the semantics of the communication are intimate enough, exchanging complex internal data structures, that too could be a basis to consider the two parts as combined into a larger program.

Of course, some people may find this requirement of the GPL too onerous, specifically in situations like yours. For that reason, the FSF also created the LGPL, which is a modification of the GPL that explicitly permits linking an LGPLed software library with other code (under specific conditions) without requiring the other code to be (L)GPLed as well.

If the zip library you were using was released under the LGPL, you could release your image viewer using it under any license terms you wanted, provided that you still followed all the requirements that the LGPL does impose on you, such as 1) to release any actual modifications you made to the zip library under the (L)GPL and make their source code available, 2) to include the copyright notice of the library among any such notices displayed by your program, and 3) to make it possible for users to re-link your software with modified versions of the library (e.g. by using dynamic run-time linking).

As for Creative Commons licenses, the legal text of the CC-By-SA 4.0 Unported license defines "Adapted Material" as follows:

Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.

Except for the specific case of synching audio with video, this definition seems to mostly punt the question back to local law, as the Creative Commons FAQ confirms:

When is my use considered an adaptation?

Whether a modification of licensed material is considered an adaptation for the purpose of CC licenses depends primarily on the applicable copyright law. […]

This basically means that no globally valid answer can be given without considering the details of every country's copyright law (and relevant precedents in case law). And even then, the answer in many cases would likely be that it would be up to the judge to decide, were the issue to ever come before one.

Ps. Curiously, the earlier version 3.0 of CC-By-SA does explicitly exclude "Collections" of independent works, as defined in section 1 of the license, from being "Adaptations" (to which the ShareAlike license element applies). Looking at the CC 4.0 draft pages on the Creative Commons wiki (specifically, in the collapsed sections on Drafts 1 & 2), it seems that this definition was deemed redundant and unnecessary, and thus removed from the CC 4.0 licenses. In any case, this does not seem to constitute a substantive change between the licenses, nor to have been intended as one.

  • I'm not asking whether or not to abide by the license agreement, but a clarification of what it entails. Since "derivative work" is a common occurrence, it would help if "derivative" work had a clear software definition. In my example, my matrix library would include OS code, and clearly be derivative. However, my main application is only using that library to solve a completely different problem. My question is: would the copy-left stop at my expanded matrix library. Since static/dynamic linking boundaries affect the status of copy-left already, I would assume this is the key distinction.
    – Tormod
    Jan 15, 2018 at 17:34
  • 4
    @Tormod: And the point I'm trying to make is that it depends on the license (or, if the license does not define it explicitly, on local copyright law and ultimately on a judge's discretion in interpreting it). The GPL makes no distinction based on the purpose of the code, other than that, for a collection of programs to count as an "aggregate", they must be "separate and independent" and "not combined […] such as to form a larger program." Neither does CC-By-SA, as far as I can tell. Jan 15, 2018 at 17:47
  • @Tormod "for example, my matrix library would include OS code, and clearly be derivative" - No. If you mean the OS kernel, you do not distribute that with your application, and even if you did, the GPL, at least, defines its own concept of "mere aggregation" that would likely apply in that case (e.g. commercial Linux distributions). If you mean standard library definitions, then read the license of, say, Glibc, as it specifically allows distributing that library code linked into your program, without affecting the license options of your program.
    – Brandin
    Jan 17, 2018 at 9:15
  • @Brandin I meant OS = Open Source.
    – Tormod
    Jan 22, 2018 at 13:49

I am not familiar with all those different Creative Commons license variants, but usage of CC is actually discouraged for software. So most open source libraries I know of, where the term "derivative work" or "build upon" is relevant, are under GPL or LGPL, and since your question is probably not meant to be for CC only, I think you might be interested what your case means in context of those two licenses.

In laymens terms, if your image viewer links against a library, then

  • if the lib is under some GPL license, your image viewer needs to be under GPL as well (or a GPL compatible lincense, see here). This apparently counts as a derivative work in the sense of the GPL.

  • if the lib is under some LGPL license, your image viewer does not have to be open sourced, only changes to the lib itself

That is actually the most important difference between those two license categories, and that is why lots of people (including myself) do not make any use of GPL libs for closed source software.

There are ways which allow to circumvent the viral aspect of the GPL under some conditions (for example, by not linking directly against the lib in stake, but by using or creating a wrapper program which then communicates with the using program "at arms length"). Have a look into this section of the GPL FAQ for more details.

  • This can't be right. You're claiming that linking creates a derivative work? But how can that be? A derivative work must, by definition, contain new protectable expression that is creatively derived from the original work. Where is this creativity coming from? The linker is not creative. Who would hold copyright to the new protectable expression created by linking? The linker? Jan 16, 2018 at 9:08
  • Do you thing that stapling two DVDs together creates a derivative work? If so, then what would create an aggregate work? If not, then how is linking different from stapling for copyright purposes? They're both ways of combining two works that don't involve any creative elements. Jan 16, 2018 at 9:09
  • @DavidSchwartz: please read the sections of the GPL FAQ I linked to, they are pretty clear about this. "Stapling two DVD together" has nothing to do how different pieces of software communicate with each other. Linking, however, has.
    – Doc Brown
    Jan 16, 2018 at 10:44
  • Linking has nothing to do with how different pieces of software communicate with each other either. It's just a mechanical process of combining two works. That section of the FAQ you linked to says nothing about what is or is not a derivative work. (Are you assuming that the only way the GPL could apply to a work is if it's a derivative work? That's certainly wrong. It could be, for example, an aggregate work or a wholly new work.) Jan 16, 2018 at 10:58
  • @DavidSchwartz: maybe you have a different definition of "linking" in mind than me. But if your image viewer is linked against a GPL zip library, your image viewer will probably communicate with the zip library in a way which makes it a combined work in the sense of the GPL. You may not like this (I don't like it, too), but that is IMHO what the GPL means.
    – Doc Brown
    Jan 16, 2018 at 11:09

A derivative work is a concept under copyright law. Whether or not a work is a derivative work determines whether another work's license applies to it at all, so it cannot be set out in a license. Licenses don't set their own scope, the law does.

A derivative work is:

  1. A work. That is, it must contain protectable expression in a fixed medium.

  2. A new work. That is, it must contain some protectable expression that is not found in a prior work.

  3. Derivative. That is, it must contain sufficient protectable expression from a prior work such that distributing it without the permission of the author (or rights holder) of the prior work would violate their copy.

Things that do not create a derivative work:

  1. Copying a work -- does not create a new work.
  2. Compiling a work -- does not contain new protectable expression.
  3. Compiling and linking other works -- no new protectable expression as compilers and linkers can't hold copyright and the protectable expression from the two works must be creative combined.

Things that do create a derivative work:

  1. Writing a sequel to a novel using its world or characters.
  2. Modifying a program such that the resulting program contains sufficient protectable expression that is new and sufficient protectable expression that is taken from the original.
  3. Writing a program that is specifically designed to work with another program, so long as sufficient protectable expression from that other program is in the new program. Note that including a header file cannot do this because then the combination occurs in the compiler or linker and so there is no creative combination.

Note that even if your work is not a derivative work, it may still be an aggregate work and you may still need permission (or comply with the license) to create or distribute it. For example, if I tape a DVD of The Phantom Menace to a DVD of my family Christmas, that is not a derivative work (no creative combination). But I certainly can't copy and distribute it without permission from whoever holds the rights to The Phantom Menace.

  • "Linking other works does not create a derivative" is not as clear as you make it out to be, see answers here passim. As for "writing a program that is specifically designed...", given that APIs have recently started to be ruled uncopyrightable, and you've ruled out header files, how might this happen apart from the inclusion of actual code, which you've already covered?
    – MadHatter
    Jan 16, 2018 at 8:04
  • I think it's quite clear. If linking created a derivative work, who would hold copyright to the new protectable expressive elements created by the linking? The linker? To answer your second question, incorporation of protectable expression, for example in how you use the things in the header file. (But generally speaking, including a header file can't create a derivative work, only an aggregate work. There's no creative combination.) The crux is that a derivative work can only be created by creative combination (not counting a few narrow statutory exceptions that don't apply here). Jan 16, 2018 at 9:05
  • Your rhetorical question assumes that only one copyright interest can vest in any particular work, which is not true. My contention is that everyone with a copyright interest in any element from which a work is derived has a copyright interest in the derived work. As for the second question, I'm asking you how a program specifically designed to work with another program can be a derivative thereof, given that a) reimplementation of the API doesn't so make it, b) you say including header files wouldn't do it, without c) simply copying code from the other work.
    – MadHatter
    Jan 16, 2018 at 9:15
  • No, it doesn't assume any such thing. And I agree with your contention, but you still didn't answer my question. Alice links a program written by Jeff with a program written by Mark. If linking can create a derivative work and does in this case, who would hold copyright to the new protectable expression created by the linking process? If no new protectable expression is created, how can a derivative work have been created since that's what it takes to create a derivative work. Jan 16, 2018 at 9:25
  • Again, as for your second question: Either it contains elements of creative combination from the work or it doesn't. I agree if all you do is include a header file (and your code doesn't look anything like the other work) then compiling/linking almost certainly would create an aggregate work, not a derivative. But I could imagine that somewhere in the new code there's elements of protectable expression creatively employed from the old work, and that would create a derivative work. That's the test. Jan 16, 2018 at 9:27

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.