I found a library which helps me implement something for a company: https://www.openmuc.org/sml/

Its license is LGPL. Unfortunately, I'd like to use this library for an Android project and there I have to use a different SerialPort-API. This means I had to change some lines of code.

Now I use "my" modified version of the code. What do I have to do to include it in a commercial (and proprietary) product? Is it just fine if I release the library on GitHub with LGPL? Or are there other side effects for the company which uses this library?

  • 1
    Please reconsider, and try not to create a new license. Because it will not be a standard license, the code could be mostly ignored (so not used on other projects, because of possible license incompatibilities, and very few users will try to really check the meaning of the license). Additionally, your license could be incompatible with most other copyleft license, so you should care not to include incompatible (but open source) libraries. Dec 2, 2016 at 19:44
  • 1
    @GiacomoCatenazzi: what made you think that the OP wants to create a new license?
    – Zimm i48
    Dec 8, 2016 at 21:40
  • Currently, however, it's under MPL (Mozilla Public License) 2.0. Apr 7, 2020 at 9:39
  • Submit your changes back to the original project in a form that they can use and then use their new code. Dec 9, 2022 at 7:45

3 Answers 3


jSML license is the LGPL 2.1 or a later version based on the source code notices:

jSML 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.

The underlying question that was not asked directly is this:

What is the impact and obligations attached to including a modified LGPL-licensed library in a proprietary product?

Beside the standard LGPL obligations of providing credits, license text, redistributing the source code, "re-buildability" when static linking is used, there are extra requirements related to modifications in particular Section 2. provides details for this case:

  1. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions [...]

This is not entirely clear to me, because:

  • Is it only the new modified library that becomes a "work based on the Library"?
  • Or, is it the whole software system that uses the modified library that becomes a "work based on the Library"?

In this later case, then eventually the LGPL copyleft could be interpreted to apply to the whole software using the library.

In particular Section 2.c would apply and might be problematic for a proprietary or commercial usage:

c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.

The rest of section 2. goes on to further elaborate on the topic of "based on the library" and what it means:

[...] But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. [...]

The net effect is that the copyleft of the LGPL 2.1 may be quite far reaching when the library is modified.

Therefore, I would seek legal advice to confirm this.

That said, another avenue could in this case to contribute your changes upstream such that they are incorporated in the jSML library. If this happens I could then use the library unmodified with relaxed requirements.

Now the entity that authored jSML seems to also provide commercial licensing and it may not be in their best business interest to incorporate such changes (but this is just speculation on my part).

  • 1
    Note that it appears to be licensed under LGPL 2.1-or-later, if you look at the notices in the source files. (I haven't inspected your answer carefully, I don't know if that changes your answer at all, but thought I'd call your attention to it, just in case.)
    – apsillers
    Dec 1, 2016 at 17:46
  • @apsillers good point. I would need to check if that could be another option Dec 1, 2016 at 18:15
  • 2
    @kevin-meier LGPL 3.0 is definitely another option and the requirements are rather different and eventually relaxed when compared to the LGPL 2.1 in this specific use case... I will update my answer Dec 1, 2016 at 18:30
  • 1
    This answer doesn't seem to take Section 6 of the LGPL 2.1 into account. Section 6 allows people to distribute applications which use a modified version of the library, without the LGPL being applied to the application code. This contradicts your statement that "the LGPL copyleft could be interpreted to apply to the whole software using the library". Dec 14, 2016 at 2:16
  • @TannerSwett Good point. I made this a community wiki so you can now edit and add additional answer elements. But section 6. may not apply in this case because the library has been modified so it is no longer a "work that uses the Library" but instead IMHO a "work based on the Library" Dec 14, 2016 at 10:46

While I think that in the modern world it SHOULD be acceptable to fulfill the source-disclosure requirement by releasing your library on GitHub it probably isn't. You either need to provide the source code along with the product or, again along with the product, provide a written offer of providing the source code on physical media on request.

Also, you need to make sure that it's possible for the end user to rebuild and install the library in the actual product. If this is not possible for whatever reason, such as the firmware needing to be signed by you, you could be in trouble.

  • The first part of your question is true only for LGPL < v3 (Since v3, (L)GPL allows sharing the code source via internet only, if the software was shared via internet.) Interestingly, the CHANGELOG of this library openmuc.org/sml/files/CHANGELOG.txt shows that in the last update (dating from 2014), the license was changed from LGPL 3.0 to LGPL 2.1, quite a surprising move!
    – Zimm i48
    Dec 1, 2016 at 12:46
  • 2
    @Zimmi48 But note that it was apparently a change from LGPL v3 to LGPL 2.1-or-later. (I know the CHANGELOG doesn't say that, but the license notice in the actual source files do include the 2.1-or-later language.) So, really they merely added 2.1 as an option, which is less baffling, and does mean that the 2.1 strictness in this answer's first paragraph doesn't apply if you chose to distribute the work only under LGPL v3 (or later, optionally). This would require changing all the source-file license notices, of course.
    – apsillers
    Dec 1, 2016 at 17:44

The LGPL provides the standard GPL provisions, but only extends the viral clause to the modifications you make to the library itself, not anything else you link to it. The terminology surrounding linking is closely tied to the specifics of C, but is generally understood to mean any sort of library import.

So you would need to make the source code to your modified version of the library available, but it should not affect the licensing of the rest of your application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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