In association with heise online

The combinatory problem

In the case of our author's application, it was under an MIT licence, so it would be GPL compatible, but as we have explained, the resulting combination of MIT and GPL licensed code would have to be licensed under the GPL. Libraries are, unlike applications, built to be reused by other peoples code to make applications which they will, typically, make available to others. If that is what you, as a library developer want, then the GPL is a good choice. But having the licensing requirements of a library cross over in the act of linking to that library can be problematic for others. The LGPL attempts to limit that effect by having the GPL requirements only apply to the code in the library under the LGPL. There are a lot of libraries under the LGPL because it does allow not only free and open source software to use the library, but also proprietary software.

But there is one requirement of the LGPL that is often overlooked by those using LGPL licensed libraries. Deep in the LGPL's text, in section 6, are the requirements for distributing binary applications which use the licence. These include, for example, that if your application displays a copyright notice, then the copyrights for the LGPL library used should also be displayed. Most importantly though, the intention of section 6 is to try and maintain the users' freedom by allowing them to replace an LGPL library with their own.

To that end, it asks that either the application be supplied in a form which would allow it to be rebuilt with a modified version of the library, or that the library in question is loaded using a shared library mechanism which allows the library to be replaced at runtime. The former option has the added caveat that if your application also uses proprietary libraries, and you don't have permission to distribute them, then you can't use them together with the LGPL code in an executable. It's worth noting these often overlooked requirements as they are core to making the freedom of the free licence tangible, and that should be the intent of the original developer if they selected the LGPL as a licence.

Our author, in this case, wasn't happy with the GPL requirements though, and there was no LGPL licensed version of the code available. When intentions clash, the result can be a developer's logjam; the frustration of finding a library of code which you can't use without giving up on a choice you've previously made. There is another solution, which the author in this case chose. As the data set was in the public domain and the algorithms widely published: implement the library yourself and place it under the licence of your own choosing. It isn't ideal, as it is a duplication of work, but it does expand the commons of code and reduces the possibility that someone else would need to make the same choice.

When creating a library, it is worth asking yourself just what is your intention in licensing the code. Go with the Apache, BSD or MIT/X licences if you want to be permissive and allow any and all to reuse your library. If you want only GPL-licensed software to use your code, go with the GPL licence. And if you want to get the dynamics of free software but allow a wider audience to use your code, look at the LGPL, but remember to educate people on what is expected of them when they use your LGPL code.

And always, always, read a licence completely before placing your code under it; and make sure you fully understand the intention of the licence, because by placing code under it, it effectively becomes your intention.

Print Version | Permalink: http://h-online.com/-1183349
  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit