[erlang-questions] GNU GPL, MIT, BSD and compatibility

Richard Carlsson <>
Thu Apr 10 13:39:29 CEST 2008


Alceste Scalas wrote:
>> Really? Here's what the GPL (v2) says:
>>
>>      b) You must cause any work that you distribute or publish, that in 
>>         whole or in part contains or is derived from the Program or any part
>>         thereof, to be licensed as a whole at no charge to all third parties
>>         under the terms of this License.
>>
>> As far as I can see, this is rather clear: *if* you distribute the derived
>> work, then all of it *has* to be provided under the GPL ("this License"),
> 
> "As a whole" refers to the final product (as I called it in my previous
> email) taken in its entirety.  But it may be composed by parts (e.g.
> code portions) that, taken alone, have different (albeit GNU
> GPL-compatible) licenses.
> 
> In fact, as you report, the GNU GPL v2 also says that:
> 
>> "These requirements apply to the modified work as a whole. If identifiable 
>> sections of that work are not derived from the Program, and can be 
>> reasonably considered independent and separate works in themselves, then 
>> this License, and its terms, do not apply to those sections when you 
>> distribute them as separate works. But when you distribute the same sections 
>> as part of a whole which is a work based on the Program, the distribution of 
>> the whole must be on the terms of this License, whose permissions for other 
>> licensees extend to the entire whole, and thus to each and every part 
>> regardless of who wrote it."
> 
> The GNU GPL v3 has the same conditions with different wording.

Yes, and they mean that *if* you distribute the work, *including* the GPL
parts, then *all* parts, including those that come under non-GPL (but
compatible) licenses, must be made available *under the GPL*. (Assuming
all involved licenses allow the combination to be made.)

Hence, the only way a license can be GPL-compatible is if it allows
redistribution under GPL. Quoted from www.gnu.org GPL-faq:

  "What does it mean to say a license is “compatible with the GPL?”
   - It means that the other license and the GNU GPL are compatible; you
     can combine code released under the other license with code released
     under the GNU GPL in one larger program.

     All GNU GPL versions permit such combinations privately; they also
     permit distribution of such combinations provided the combination is
     released under the same GNU GPL version. The other license is compatible
     with the GPL if it permits this too."

Note: "provided the combination is released under the same GNU GPL version".
*Not* just any "GNU GPL-compatible licenses" as you wrote.

The EPL is not GPL-compatible, and Erlang modules are dynamically linked,
so it is not possible to use GPL:ed Erlang modules if you want to distribute
the result. LGPL should be ok for Erlang code, however.

>> The LGPL differs in that it does not consider code that merely links to
>> your program to be a derived work.
> 
> Well, not exactly.  Under the copyright law, a program that
> depends/links to a library *is* a derived work,

Which "the copyright law"? Quote, please.

> Unlike the GNU GPL, the GNU LGPL does *not* require that the derived product
 > is released "as a whole" under compatible licensing terms

No, in fact the LGPL quite explicitly says what a derived work is:

  'Pay close attention to the difference between a "work based on the
   library" and a "work that uses the library". The former contains code
   derived from the library, whereas the latter must be combined with the
   library in order to run.'

and

  'A program that contains no derivative of any portion of the Library,
   but is designed to work with the Library by being compiled or linked with
   it, is called a "work that uses the Library". Such a work, in isolation,
   is not a derivative work of the Library, and therefore falls outside the
   scope of this License.

   However, linking a "work that uses the Library" with the Library creates
   an executable that is a derivative of the Library (because it contains
   portions of the Library), rather than a "work that uses the library". The
   executable is therefore covered by this License.'

So, if something qualifies as a "derived work" under the LGPL, then it
*must* be licensed under LGPL. Examples are: 1) modifications/extensions
to the library itself, and 2) a statically linked/combined program.

Otherwise, the code is "a work that uses the Library", and in that case the
LGPL does not affect it: "...is not a derivative work of the Library, and
therefore falls outside the scope of this License". Example: code that
links dynamically to a separately compiled LGPL library. (E.g., tricks
like compile-time module merging are technically not allowed.)

The bottom line is that the GPL most definitely is "viral" (but in a good
way). It divides code into two distinct worlds: The GPL code is free
forever, and you can only build on it if you agree to keeping the results
free. Otherwise, you must go find some other code to build on if you want
a free ride. GPL is not what everyone wants, but there are other licenses.

     /Richard





More information about the erlang-questions mailing list