Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

LGPL requires that it if a program uses LGPL-ed library, users must be able to re-link the program with a different version of the library:


d) Do one of the following:

0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.

1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.


However in some cases, this can pose considerable difficulties. In particular, Haskell programs are almost always statically compiled. Moreover, the compiler does cross-module optimizations so its not possible to take a part of the code out and replace it with another. So it's very hard to satisfy this condition. (See this link at Haskell Wiki.)

Dynamic linking would be a solution, but in many cases, this isn't possible. For example:

  • Some platforms may not have dynamic linking at all.
  • Some languages don't have the possibility of dynamic linking. Or, it's not possible to make modules multi-platform.
  • In some cases dynamic linking would prevent important optimizations. While I'd say this is rarely a serious problem, in languages like Haskell the performance loss could be considerable.

Therefore, I'm looking for a standard LGPL-like license that wouldn't require the possibility of re-linking (and I understand that that removes a bit of freedom given to users). Some projects use their own modification of LGPL, for example wxWidgets. But I'd rather use some standard license that is somewhat more official, perhaps checked by some law experts, and (L)GPL compatible. Is there some like that?

(Also I'd be interested to know if are there some unforeseen consequences of such a modification of LGPL.)

share|improve this question
You can't dynamically link outside libraries in Haskell? That must be damned inconvenient. – Robert Harvey Dec 11 '12 at 19:01
If your entire project is FOSS, then this might be a non-issue. Point them at the sources and let them sort it out! :-) – Peter Rowell Dec 11 '12 at 19:08
What would distinguish that license from non-copyleft licenses? – delnan Dec 11 '12 at 19:16
@delnan There are many other things in LGPL that are often desirable. For example, it requires any modification to be (L)GPL, or prohibits tivoization. – Petr Pudlák Dec 11 '12 at 20:15
The wxWindows license is about as official as it gets, given that it's approved by the OSI. – Joachim Sauer Dec 12 '12 at 8:27

wxwidgets is licensed under essentially = LGPL + static linking

...essentially the L-GPL (Library General Public Licence), with an exception stating that derived works in binary form may be distributed on the user's own terms. This is a solution that satisfies those who wish to produce GPL'ed software using wxWidgets, and also those producing proprietary software.

wxWidgets is Certified Open Source Software Participants in the discussion that led to this decision include the folk from Abisource, Robert Roebling, Julian Smart, Markus Fleck, Karsten Ballueder, and some advice from Richard Stallman. Richard has confirmed that the new licence is compatible with GPL'ed applications. However, there are no significant restrictions on proprietary applications.

The wxWindows Licence has been approved by the Open Source Initiative, and you can find the licence on their site here...

share|improve this answer
0mq is also licensed under LGPL with an explicit static linking exception. – Trevor Powell Dec 21 '12 at 19:32

IANAL, but I have been led to believe, that one solution is to provide object files for non-LGPL parts. That way user can re-link the program and so is free to change the LGPL part, fulfilling requirements of LGPL.

In other words, you need to have source package, with LGPL sources and compiled object files of non-LGPL code. Obviously you then need to provide object files for every different architecture you release the binaries for, but I don't think this is much of an issue.

From development point of view, simplest might be to just have the build system also build the source package at the same time, when building the binary for distribution.

share|improve this answer
do you have any real scenario in which this has has been done? – knocte Sep 4 '13 at 16:15

I'm surprised nobody's mentioned the Mozilla Public License. It's similar to the LGPL except it allows static linking. MPL version 2 is compatible with the GPL/LGPL.

Mozilla Public License (MPL 2.0) vs Lesser GNU General Public License (LGPL 3.0)

share|improve this answer

I found one with Google: OpenScales license

OpenScales is released under version 3 of the GNU Lesser Public License (LGPL, available here), with an exeption related to static linking exception (see below)...

In addition to the LGPL license text, the exception to the LGPL conditions apply to OpenScales:

As a special exception to the GNU Lesser General Public License version 3, you may convey to a third party an executable file from a Combined Work that links, statically or dynamically, portions of this Library in the executable file, conveying the Minimal Corresponding Source but without the need to convey the Corresponding Application Code under section 4d0 of the GNU Lesser General Public License, so long as you are using an unmodified publicly distributed version of the Library. This exception does not invalidate any other reasons why the executable file might be covered by the GNU Lesser General Public License or the GNU General Public License.

It's not standard though, and I don't know if one exists.

share|improve this answer

How would you continue to guaranty user freedom? I believe the "correct" answer is to statically link a shim that dynamically loads the library.

share|improve this answer
Yes, that is the best solution. But in some cases, dynamic linking isn't possible. Some languages don't have this possibility. Or some platforms don't have this possibility. – Petr Pudlák Dec 12 '12 at 7:23
Actually linkers do exactly this, when you dynamically link to library. – Calmarius Sep 23 '15 at 14:46

protected by gnat Mar 25 '15 at 6:40

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.