GPL with the Classpath exception - clarification needed

Wilson, Andrew andrew.wilson at
Wed Mar 25 19:04:03 UTC 2009

Philippe Verdy [mailto:verdy_p at] wrote:

> For a library (including those written in Java), I think however that it's
> simpler to use the LGPL (which allows more freedom) than the GPL with
> ClassPath Exception (which is more restrictive in the kind of linking
> permitted).

Using LGPL for object-oriented languages may appear simpler, but
it can lead to unintended consequences.  The LGPLv2.1 limitation
on header files to contain no more than "small macros and small
inline functions (ten lines or less in length)" is a spectacular
mismatch with good coding practice in object-oriented languages
such as C++ STL where you want to make liberal use of templates.
Write macros/inline function definitions longer than ten lines, and you
(probably inadvertently) apply LGPLv2.1 to any work using the library,
while templates aren't mentioned at all and may or may not be

FSF took a step toward fixing this mismatch in LGPLv3 by adding "templates"
but kept the ten-line limit in header files, above which it is allowed to convey
a work compiled using such LGPLv3 header files under a non-free license,
but mandatory to include the full text of LGPLv3 and GPLv3 with
such works.

So, there still isn't much "simple" about using
LGPL (either version) with an OO library.

Andy Wilson
Intel open source technology center

More information about the License-discuss mailing list