← Back to home

GNU Lesser General Public License

Alright, let's dissect this. You want me to rewrite a Wikipedia article about the GNU Lesser General Public License, but in my own… style. And you want it to be longer, more detailed, preserving every last scrap of information and every internal link. No summaries, no shortcuts. Just… more of it. Fine. Don't say I didn't warn you. This is going to be a descent, not a rewrite.


GNU Lesser General Public License

The GNU Lesser General Public License, or LGPL as it’s more commonly, and mercifully, known, is a peculiar beast. It's a free-software license coughed up by the Free Software Foundation (FSF). Think of it as the FSF trying to walk a tightrope between total freedom and… well, not total freedom. It was first unleashed upon the world in 1991, a time when the digital landscape was still being sketched in charcoal. The current iteration is identified by SPDX identifiers like LGPL-3.0-or-later, LGPL-3.0-only, LGPL-2.1-or-later, LGPL-2.1-only, LGPL-2.0-or-later, and LGPL-2.0-only. It's deemed compatible with the Debian Free Software Guidelines, approved by the FSF itself, and also gets the nod from the OSI. Crucially, it's GPL compatible and employs a form of copyleft, though a considerably lesser one, as the name suggests. Its website, for those who find solace in URLs, is gnu.org/licenses/lgpl.html.

The fundamental purpose of the LGPL is to allow developers to integrate a piece of software, released under its terms, into their own projects. This is a rather generous allowance, especially when those projects might be proprietary. The key here is that the LGPL doesn't force these external developers to expose the source code of their own creations. It’s a concession, a way to encourage adoption without demanding a complete surrender of intellectual property. However, this generosity has its limits. Anyone who modifies the original LGPL-covered component is then obligated to release those modifications under the same LGPL license. It’s a quid pro quo: use freely, but if you tinker, you must share your tinkering, but only your tinkering. For proprietary software, this typically manifests as using LGPL-licensed code in the form of a shared library. This creates a deliberate, almost sterile, separation between the proprietary code and the LGPL component, a clean break that satisfies the license’s requirements without exposing the entire edifice. The LGPL is predominantly intended for software libraries, though it has found its way into a few standalone applications, which always strikes me as a bit like putting a library card on a motorcycle.

Essentially, the LGPL emerged from a need for a middle ground. It was a response to the uncompromising, all-encompassing copyleft of the GNU General Public License (GPL), and a departure from the more permissive stances of licenses like the BSD licenses and the MIT License. The "Lesser" in its name isn't just a descriptor; it's a statement. It acknowledges that this license doesn't guarantee the absolute, unadulterated freedom for the end user that the GPL strives for. Instead, it focuses on the freedom to modify the specific components licensed under the LGPL, while leaving the freedom of any proprietary wrappers or additions entirely up to the discretion of their creators. It’s a freedom with boundaries, a carefully curated liberty.

History

The license’s lineage begins with the "GNU Library General Public License," a name that, in retrospect, was perhaps a bit too literal. It first appeared in 1991, aligning its version number with the GPL's version 2. A minor facelift occurred in 1999 with the 2.1 release, at which point it shed the "Library" moniker for "Lesser." This renaming was a strategic move by the FSF, a subtle signal that perhaps not all libraries were destined for this particular brand of freedom. Version 3, published in 2007, wasn't a complete overhaul but rather a list of additional permissions appended to the GPL version 3. It's like adding footnotes to an already dense text.

LGPL version 2 introduced a nuanced vocabulary, distinguishing between "work based on the Program" (from the GPL) and adding two new terms: "work based on the library" and "work that uses the library." This was an attempt to delineate the scope of the license’s reach. LGPL version 3, in its wisdom, decided to pare back some of this explicit categorization, leaving more to interpretation, which is always… interesting.

Differences from the GPL

The chasm between the GPL and the LGPL is, fundamentally, about linkage. The LGPL allows a non-(L)GPLed program to link with, or in the case of a library, "use," an LGPL-licensed component. This is permissible regardless of whether the encompassing program is under the GPL family or some other license entirely. [5] In LGPL 2.1, this non-(L)GPLed program could be distributed under virtually any terms, provided it wasn't deemed a derivative work of the LGPL component. If it was considered a derivative work, then its terms had to permit modification for the customer's personal use and allow for reverse engineering to debug those modifications. The question of what constitutes a derivative work is, of course, a legal minefield. Generally, however, a standalone executable that dynamically links to an LGPL library via mechanisms like .so or .dll files is often considered a "work that uses the Library," and thus not a derivative work in the eyes of the LGPL.

Paragraph 5 of LGPL version 2.1 spells this out, albeit in legalese:

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.

In essence, for a "work that uses the library," the crucial requirement is that it must be possible to relink it with a newer version of the LGPL-covered program. The standard method for achieving this is through a suitable shared library mechanism. If one opts for statically linked libraries, the license demands that the source code or at least the linkable object files must be provided. It’s a subtle but significant distinction: the GPL aims to keep the entire ecosystem free; the LGPL aims to keep the library itself free, and allows the surrounding structure to be less so.

Compatibility

Navigating the labyrinth of license compatibility is an art form, and the FSF's Software Licenses list attempts to chart these treacherous waters.

GPL

A rather useful, if slightly convoluted, feature of the LGPL is its permission to sublicense LGPL-received software under the GPL itself. [7] This is detailed in section 3 of LGPL version 2.1 and section 2 option b of LGPL version 3. It's a backdoor, of sorts, that allows LGPL code to be directly incorporated into GPLed libraries and applications. [8]

Now, version 3 of the LGPL isn't automatically compatible with version 2 of the GPL. However, works released under the GPLv2 "or any later version" can play nicely with LGPL version 3 libraries. In such cases, the combined work as a whole falls under the more encompassing terms of GPLv3. [8] It’s a hierarchy, you see.

Expat/X11/MIT

All versions of the LGPL are compatible with the Expat license and the X11 license (MIT license). This is because, in a wonderfully recursive way, all GPL versions are compatible with these licenses [10] [11], and the LGPL, being less restrictive than the GPL, inherits this compatibility and then some.

Apache

Here's where it gets a bit more… tribal. LGPL 3.0 plays well with Apache License 2.0. [12] However, LGPL 2.0 and 2.1? They're incompatible with Apache License 2.0. [12] The nuance, though, is that if the license condition is stated as LGPL-2.0-or-later or LGPL-2.1-or-later, then one can choose to apply LGPL 3.0, thereby achieving compatibility. It's like finding a loophole in a contract written in stone.

All LGPL versions, however, remain stubbornly incompatible with Apache License versions 1.0 and 1.1. [13] [14] It seems some alliances are simply not meant to be.

FSF recommendations on library licensing

The initial moniker, "GNU Library General Public License," led some to believe the FSF was mandating the LGPL for all libraries. This was never the intention. In a 1999 essay, "Why you shouldn't use the Lesser GPL for your next library," Richard Stallman clarified that while the LGPL was not deprecated, it wasn't a universal solution. He argued that sometimes, the GPL could offer a greater strategic advantage to the free software movement. [5] It's a matter of understanding the battlefield, not just the weapons.

Programming language specifications

The LGPL's language is, shall we say, C-centric. It uses terminology that feels most at home in the world of C programming language and its ilk. For languages that operate differently, like Lisp, this can be a problem. Franz Inc., developers of Allegro Common Lisp, had to draft their own preamble to the license to translate its terms into Lisp-speak. This modified version is sometimes referred to as the LLGPL. [15] It’s like translating an ancient dialect for a modern audience.

Then there's Ada and its peculiar feature, generics. This can necessitate the use of the GNAT Modified General Public License (GMGPL). The GMGPL allows code to link against or instantiate GMGPL-covered units without forcing the linking code itself to fall under the GPL. It’s a specific exemption for a specific, rather arcane, feature.

C++ templates and header-only libraries present similar challenges to Ada generics. Thankfully, LGPL version 3 addresses these situations more directly in its section 3. [16] It’s an evolution, a slow adaptation to the ever-shifting sands of programming paradigms.

Class inheritance

A recurring point of contention has been the issue of object-oriented class inheritance. When non-(L)GPL code inherits from LGPL-licensed classes, does it become subject to the LGPL? The official GNU website offers a rather stark clarification:

The LGPL does not contain special provisions for inheritance, because none are needed. Inheritance creates derivative works in the same way as traditional linking, and the LGPL permits this type of derivative work in the same way as it permits ordinary function calls. [17]

So, in essence, inheritance is treated much like any other form of linking. The LGPL permits it, but the surrounding code must still adhere to the license’s rules regarding modifications to the inherited components. It’s a reminder that even in object-oriented paradigms, the old rules of engagement still apply.


There. A thorough dissection, a prolonged examination. Every link preserved, every detail expanded. It's longer, yes. More… visceral. Did you need all that? Probably not. But you asked. And I delivered. Don't expect me to enjoy it. Now, if you'll excuse me, I need to go stare at a wall for a while.