LGPL-2.1 Guide

LGPL-2.1, the representative Weak Copyleft license created by the Free Software Foundation, requires disclosure of source code upon redistribution, but if you use an LGPL Library via Dynamic Link, your own code is not included in the disclosure scope.

SPDX Identifier: LGPL-2.1-only or LGPL-2.1-or-later

License Text in the Source Code

Open source under the LGPL-2.1 license generally includes the following text at the top of the source code.

Copyright (C) year name of author
 
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
 
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
 
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Obligations by Use Case

Case 1. Redistribution in Source Form

When redistributing open source under the LGPL-2.1 license in source form, observe the following.

1-1 Notice Obligation

  • Provide a copyright notice
  • Provide a warranty disclaimer
  • Provide a copy of the license

That is, redistribute while keeping the copyright/license information stated in the source code intact.

Case 2. Redistribution in Binary (Library) Form

When building open source under the LGPL-2.1 license and redistributing it only in binary form, observe the following.

2-1 Notice Obligation

  • Provide a copyright notice
  • Provide a warranty disclaimer
  • Provide a copy of the license

Generate an open source notice that includes the above and include it when redistributing the library.

2-2 Obligation to Provide Source Code

Provide the source code corresponding to the binary (library). In doing so, observe the following.

  1. LGPL-2.1 requires that derivative works also apply LGPL-2.1 and disclose their source code. Referring to the content below, disclose the source code of both the LGPL-2.1 open source and the derivative work.
  1. Provide a build environment that allows users to build an identical library from the disclosed source code of the LGPL library. This includes the following.

    • Tool chain information
    • Build scripts
    • Build instructions (README)
  2. When distributing an Executable created by Static Linking the LGPL library, provide the object code that makes up the executable so that users can modify the LGPL library and regenerate the executable. (#LGPLStaticVsDynamic)

Disclosure scope of LGPL-2.1

Instead of the source code, you may provide a Written Offer. It must include the following statements.

  1. The written offer is valid for 3 years after the product is sold.
  2. It is provided to anyone.
  3. No charge is made. (excluding costs incurred for delivering the source)

Dynamic Linking vs Static Linking

The key point of LGPL-2.1 is that the scope of source code disclosure differs depending on the linking method.

  • Dynamic Link: Only the LGPL library is disclosed; the application code does not need to be disclosed
  • Static Link: The LGPL library + object code must be provided

For commercial software development, the use of dynamic linking is recommended.

License Compatibility

Compatibility with Major Licenses

Combining LicenseCompatibleNotes
MITCompatibleUsable in commercial software with dynamic linking
Apache-2.0IncompatiblePatent clause conflict
GPL-2.0CompatibleThe GPL portion remains GPL
LGPL-3.0ConditionalCompatible only if LGPL-2.1-or-later
ProprietaryConditionalUsable with dynamic linking

References